summaryrefslogtreecommitdiff
path: root/ftparchive/apt-ftparchive.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-02-18 00:05:14 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-02-18 00:05:14 +0100
commit319810767180e5c57c296b06c93e3ebec9f36a8e (patch)
tree43501a1333473f035e63a52d9ee5357d37b9c1e6 /ftparchive/apt-ftparchive.cc
parent897165afb4681cff0e3a4bcb65f21b6d67718fbe (diff)
- add --arch option for apt-ftparchive packages and contents commands
- if an arch is given accept only *_all.deb and *_arch.deb instead of *.deb. Thanks Stephan Bosch for the patch! (Closes: #319710)
Diffstat (limited to 'ftparchive/apt-ftparchive.cc')
-rw-r--r--ftparchive/apt-ftparchive.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc
index 5b6b3940c..f1a182e52 100644
--- a/ftparchive/apt-ftparchive.cc
+++ b/ftparchive/apt-ftparchive.cc
@@ -333,7 +333,7 @@ bool PackageMap::GenContents(Configuration &Setup,
gettimeofday(&StartTime,0);
// Create a package writer object.
- ContentsWriter Contents("");
+ ContentsWriter Contents("", Arch);
if (PkgExt.empty() == false && Contents.SetExts(PkgExt) == false)
return _error->Error(_("Package extension list is too long"));
if (_error->PendingError() == true)
@@ -606,7 +606,7 @@ bool SimpleGenPackages(CommandLine &CmdL)
// Create a package writer object.
PackagesWriter Packages(_config->Find("APT::FTPArchive::DB"),
- Override, "");
+ Override, "", _config->Find("APT::FTPArchive::Architecture"));
if (_error->PendingError() == true)
return false;
@@ -629,7 +629,7 @@ bool SimpleGenContents(CommandLine &CmdL)
return ShowHelp(CmdL);
// Create a package writer object.
- ContentsWriter Contents(_config->Find("APT::FTPArchive::DB"));
+ ContentsWriter Contents(_config->Find("APT::FTPArchive::DB"), _config->Find("APT::FTPArchive::Architecture"));
if (_error->PendingError() == true)
return false;
@@ -910,6 +910,7 @@ int main(int argc, const char *argv[])
{0,"delink","APT::FTPArchive::DeLinkAct",0},
{0,"readonly","APT::FTPArchive::ReadOnlyDB",0},
{0,"contents","APT::FTPArchive::Contents",0},
+ {'a',"arch","APT::FTPArchive::Architecture",CommandLine::HasArg},
{'c',"config-file",0,CommandLine::ConfigFile},
{'o',"option",0,CommandLine::ArbItem},
{0,0,0,0}};