Added --no-download
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:53:49 +0000 (16:53 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:53:49 +0000 (16:53 +0000)
Author: jgg
Date: 1999-05-24 03:39:36 GMT
Added --no-download

apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h
apt-pkg/acquire.cc
cmdline/apt-get.cc
debian/changelog
doc/apt-get.8.yo
doc/examples/apt.conf

index f2fd0b8..1b683a3 100644 (file)
@@ -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                                   /*{{{*/
 // ---------------------------------------------------------------------
index 3079c68..6c5ecde 100644 (file)
@@ -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,
index 724c3cf..3065124 100644 (file)
@@ -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();
 }
                                                                        /*}}}*/
index 043cc35..f745b18 100644 (file)
@@ -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},
index 078582c..43b22ae 100644 (file)
@@ -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
index ed63766..3b7b909 100644 (file)
@@ -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
index a295e59..affe5d8 100644 (file)
@@ -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