summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:54:44 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:54:44 +0000
commit17c0e8e1f979c0638c354614b29a8ec484e8f44e (patch)
tree83c69e0e67c9ee7a6ba0bf04a985d476a885f776 /cmdline/apt-get.cc
parentd61012232a583a2b91ca6d94defd494ea158ad19 (diff)
Added diff-only and tar-only options
Author: jgg Date: 1999-09-09 06:23:52 GMT Added diff-only and tar-only options
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc17
1 files changed, 16 insertions, 1 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 &&