From 319810767180e5c57c296b06c93e3ebec9f36a8e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 18 Feb 2010 00:05:14 +0100 Subject: - 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) --- ftparchive/apt-ftparchive.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ftparchive/apt-ftparchive.cc') 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}}; -- cgit v1.2.3