Просмотр исходного кода

Added diff-only and tar-only options
Author: jgg
Date: 1999-09-09 06:23:52 GMT
Added diff-only and tar-only options

Arch Librarian лет назад: 22
Родитель
Сommit
17c0e8e1f9
3 измененных файлов с 23 добавлено и 4 удалено
  1. 16 1
      cmdline/apt-get.cc
  2. 5 1
      doc/apt-get.8.yo
  3. 2 2
      doc/apt.conf.5.yo

+ 16 - 1
cmdline/apt-get.cc

@@ -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 &&

+ 5 - 1
doc/apt-get.8.yo

@@ -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

+ 2 - 2
doc/apt.conf.5.yo

@@ -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