Added diff-only and tar-only options
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:54:44 +0000 (16:54 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:54:44 +0000 (16:54 +0000)
Author: jgg
Date: 1999-09-09 06:23:52 GMT
Added diff-only and tar-only options

cmdline/apt-get.cc
doc/apt-get.8.yo
doc/apt.conf.5.yo

index b56b441..2fcda28 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-get.cc,v 1.73 1999/09/05 20:27:37 jgg Exp $
+// $Id: apt-get.cc,v 1.74 1999/09/09 06:23:52 jgg Exp $
 /* ######################################################################
    
    apt-get - Cover for dpkg
@@ -1277,6 +1277,16 @@ bool DoSource(CommandLine &CmdL)
         if (I->Path.find(".diff.gz") != string::npos)
            Comp = "diff";
         
+        // Diff only mode only fetches .diff files
+        if (_config->FindB("APT::Get::Diff-Only",false) == true &&
+            Comp != "diff")
+           continue;
+        
+        // Tar only mode only fetches .tar files
+        if (_config->FindB("APT::Get::Tar-Only",false) == true &&
+            Comp != "tar")
+           continue;
+        
         new pkgAcqFile(&Fetcher,Last->Source()->ArchiveURI(I->Path),
                        I->MD5Hash,I->Size,Last->Source()->SourceInfo(Src,
                        Last->Version(),Comp),Src);
@@ -1354,6 +1364,11 @@ bool DoSource(CommandLine &CmdL)
       {
         string Dir = Dsc[I].Package + '-' + pkgBaseVersion(Dsc[I].Version.c_str());
         
+        // Diff only mode only fetches .diff files
+        if (_config->FindB("APT::Get::Diff-Only",false) == true ||
+            _config->FindB("APT::Get::Tar-Only",false) == true)
+           continue;
+        
         // See if the package is already unpacked
         struct stat Stat;
         if (stat(Dir.c_str(),&Stat) == 0 &&
index a0a8717..918d17b 100644 (file)
@@ -214,7 +214,11 @@ dit(bf(--list-cleanup))
 This option defaults to on, use bf(--no-list-cleanup) to turn it off.
 When on apt-get will automatically manage the contents of 
 /var/state/apt/lists to ensure that obsolete files are erased. The only 
-reason to turn it off is if you frequently change your source list.
+reason to turn it off is if you frequently change your source list. See
+bf(APT::Get::List-Cleanup)
+
+dit(bf(--diff-only), bd(--tar-only))
+Download only the diff or tar file of a source archive.
 
 dit(bf(-c, --config-file))
 Configuration File; Specify a configuration file to use. bf(apt-get) will
index 9483490..9c4c0e4 100644 (file)
@@ -67,8 +67,8 @@ Never Enable this option unless you -really- know what you are doing. It
 permits APT to temporarily remove an essential package to break a
 Conflicts/Conflicts or Conflicts/Pre-Depend loop between two essential
 packages. SUCH A LOOP SHOULD NEVER EXIST AND IS A GRAVE BUG. This option will
-work if the essential packages are not tar, gzip, libc, bash or anything that 
-those packages depend on.
+work if the essential packages are not tar, gzip, libc, dpkg, bash or 
+anything that those packages depend on.
 
 dit(bf(Get))
 The Get subsection controls the bf(apt-get(8)) tool, please see its