From f0863b2140790b894049d4b3a96f5e021909946e Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:59:04 +0000 Subject: --print-uris works with update now. Closes: 57070 Author: jgg Date: 2002-04-02 07:16:24 GMT --print-uris works with update now. Closes: 57070 --- cmdline/apt-get.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index e7ac0b65e..a41c50b0a 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-get.cc,v 1.117 2002/03/27 05:26:24 jgg Exp $ +// $Id: apt-get.cc,v 1.118 2002/04/02 07:16:24 jgg Exp $ /* ###################################################################### apt-get - Cover for dpkg @@ -1176,11 +1176,21 @@ bool DoUpdate(CommandLine &CmdL) // Create the download object AcqTextStatus Stat(ScreenWidth,_config->FindI("quiet",0)); pkgAcquire Fetcher(&Stat); - + // Populate it with the source selection if (List.GetIndexes(&Fetcher) == false) return false; + // Just print out the uris an exit if the --print-uris flag was used + if (_config->FindB("APT::Get::Print-URIs") == true) + { + pkgAcquire::UriIterator I = Fetcher.UriBegin(); + for (; I != Fetcher.UriEnd(); I++) + cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << + I->Owner->FileSize << ' ' << I->Owner->MD5Sum() << endl; + return true; + } + // Run it if (Fetcher.Run() == pkgAcquire::Failed) return false; -- cgit v1.2.3