diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:53:49 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:53:49 +0000 |
commit | ab559b358d7c390ac63bfcf8d526ca44761aafc5 (patch) | |
tree | f3e5de5cc903ac81f2df7b8992be8e780b707440 | |
parent | f436bdc5fdd0db812484774d701e7d98b1e76224 (diff) |
Added --no-download
Author: jgg
Date: 1999-05-24 03:39:36 GMT
Added --no-download
-rw-r--r-- | apt-pkg/acquire-item.cc | 13 | ||||
-rw-r--r-- | apt-pkg/acquire-item.h | 4 | ||||
-rw-r--r-- | apt-pkg/acquire.cc | 6 | ||||
-rw-r--r-- | cmdline/apt-get.cc | 10 | ||||
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | doc/apt-get.8.yo | 4 | ||||
-rw-r--r-- | doc/examples/apt.conf | 3 |
7 files changed, 35 insertions, 8 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index f2fd0b8b8..1b683a373 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire-item.cc,v 1.29 1999/04/28 22:48:44 jgg Exp $ +// $Id: acquire-item.cc,v 1.30 1999/05/24 03:39:36 jgg Exp $ /* ###################################################################### Acquire Item - Item to acquire @@ -541,6 +541,17 @@ void pkgAcqArchive::Failed(string Message,pkgAcquire::MethodConfig *Cnf) } } /*}}}*/ +// AcqArchive::Finished - Fetching has finished, tidy up /*{{{*/ +// --------------------------------------------------------------------- +/* */ +void pkgAcqArchive::Finished() +{ + if (Status == pkgAcquire::Item::StatDone && + Complete == true) + return; + StoreFilename = string(); +} + /*}}}*/ // AcqFile::pkgAcqFile - Constructor /*{{{*/ // --------------------------------------------------------------------- diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 3079c68ef..6c5ecde12 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire-item.h,v 1.19 1999/04/11 21:23:09 jgg Exp $ +// $Id: acquire-item.h,v 1.20 1999/05/24 03:39:37 jgg Exp $ /* ###################################################################### Acquire Item - Item to acquire @@ -66,6 +66,7 @@ class pkgAcquire::Item virtual void Start(string Message,unsigned long Size); virtual string Custom600Headers() {return string();}; virtual string DescURI() = 0; + virtual void Finished() {}; // Inquire functions virtual string MD5Sum() {return string();}; @@ -138,6 +139,7 @@ class pkgAcqArchive : public pkgAcquire::Item virtual void Done(string Message,unsigned long Size,string Md5Hash); virtual string MD5Sum() {return MD5;}; virtual string DescURI() {return Desc.URI;}; + virtual void Finished(); pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources, pkgRecords *Recs,pkgCache::VerIterator const &Version, diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 724c3cf05..306512436 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire.cc,v 1.33 1999/05/23 06:47:43 jgg Exp $ +// $Id: acquire.cc,v 1.34 1999/05/24 03:39:37 jgg Exp $ /* ###################################################################### Acquire - File Acquiration @@ -334,6 +334,10 @@ bool pkgAcquire::Run() for (Queue *I = Queues; I != 0; I = I->Next) I->Shutdown(); + // Shut down the items + for (Item **I = Items.begin(); I != Items.end(); I++) + (*I)->Finished(); + return !_error->PendingError(); } /*}}}*/ diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 043cc35bc..f745b18c2 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.60 1999/05/23 05:45:12 jgg Exp $ +// $Id: apt-get.cc,v 1.61 1999/05/24 03:39:37 jgg Exp $ /* ###################################################################### apt-get - Cover for dpkg @@ -589,8 +589,9 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,bool Saftey = } // Run it - if (Fetcher.Run() == false) - return false; + if (_config->FindB("APT::Get::No-Download",false) == false) + if( Fetcher.Run() == false) + return false; // Print out errors bool Failed = false; @@ -601,6 +602,8 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,bool Saftey = (*I)->Complete == true) continue; + (*I)->Finished(); + if ((*I)->Status == pkgAcquire::Item::StatIdle) { Transient = true; @@ -1397,6 +1400,7 @@ int main(int argc,const char *argv[]) {'f',"fix-broken","APT::Get::Fix-Broken",0}, {'u',"show-upgraded","APT::Get::Show-Upgraded",0}, {'m',"ignore-missing","APT::Get::Fix-Missing",0}, + {0,"no-download","APT::Get::No-Download",0}, {0,"fix-missing","APT::Get::Fix-Missing",0}, {0,"ignore-hold","APT::Ingore-Hold",0}, {0,"no-upgrade","APT::Get::no-upgrade",0}, diff --git a/debian/changelog b/debian/changelog index 078582cc1..43b22ae40 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,7 +15,8 @@ apt (0.3.6.1) unstable; urgency=low important note in the sources.list man page. * Accounted for resumed files in the cps calculation. Closes: #36787 * Deal with duplicate same version different packages. Closes: #30237 - + * Added --no-download. Closes: #38095 + -- Jason Gunthorpe <jgg@debian.org> Wed, 12 May 1999 09:18:49 -0700 apt (0.3.6) unstable; urgency=low diff --git a/doc/apt-get.8.yo b/doc/apt-get.8.yo index ed63766a0..3b7b90948 100644 --- a/doc/apt-get.8.yo +++ b/doc/apt-get.8.yo @@ -150,6 +150,10 @@ integrity check after retrieval (corrupted package files), hold back those packages and handle the result. Use of this option together with -f may produce an error in some situations. See bf(ignore-missing). +dit(bf(--no-download)) +Disables downloading of packages. This is best used with --ignore-missing to +force APT to use only the .debs it has already downloaded. + dit(bf(-q, --quiet)) Quiet; produces output suitable for logging, omitting progress indicators. More qs will produce more quiet up to a maximum of 2. You can also use diff --git a/doc/examples/apt.conf b/doc/examples/apt.conf index a295e59ea..affe5d8be 100644 --- a/doc/examples/apt.conf +++ b/doc/examples/apt.conf @@ -1,4 +1,4 @@ -// $Id: apt.conf,v 1.32 1999/04/19 06:03:09 jgg Exp $ +// $Id: apt.conf,v 1.33 1999/05/24 03:39:37 jgg Exp $ /* This file is an index of all APT configuration directives. It should NOT actually be used as a real config file, though it is a completely valid file. @@ -33,6 +33,7 @@ APT No-Upgrade "false"; Print-URIs "false"; Compile "false"; + No-Download "false"; }; Cache |