summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmdline/apt-get.cc17
-rw-r--r--doc/apt-get.8.yo6
-rw-r--r--doc/apt.conf.5.yo4
3 files changed, 23 insertions, 4 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index b56b441c4..2fcda2877 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.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 &&
diff --git a/doc/apt-get.8.yo b/doc/apt-get.8.yo
index a0a871722..918d17b1c 100644
--- a/doc/apt-get.8.yo
+++ b/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
diff --git a/doc/apt.conf.5.yo b/doc/apt.conf.5.yo
index 94834901f..9c4c0e4f1 100644
--- a/doc/apt.conf.5.yo
+++ b/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