[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

patch: --dsc-only



Apt-get is missing a piece of symmetry. While there's a --tar-only and a --diff-only, there hasn't been any --dsc-only. This patch adds --dsc-only.

--rich

diff -u -r apt-0.6.46.4/cmdline/apt-get.cc apt-new/cmdline/apt-get.cc
--- apt-0.6.46.4/cmdline/apt-get.cc	2006-12-04 06:37:35.000000000 -0800
+++ apt-new/cmdline/apt-get.cc	2007-04-01 14:06:21.000000000 -0700
@@ -1950,6 +1950,11 @@
 	     I->Type != "tar")
 	    continue;
 
+	 // Dsc only mode only fetches .dsc files
+	 if (_config->FindB("APT::Get::Dsc-Only",false) == true &&
+	     I->Type != "dsc")
+	    continue;
+
 	 // don't download the same uri twice (should this be moved to
 	 // the fetcher interface itself?)
 	 if(queued.find(Last->Index().ArchiveURI(I->Path)) != queued.end())
@@ -2531,7 +2536,8 @@
       {0,"force-yes","APT::Get::force-yes",0},
       {0,"print-uris","APT::Get::Print-URIs",0},
       {0,"diff-only","APT::Get::Diff-Only",0},
-      {0,"tar-only","APT::Get::tar-Only",0},
+      {0,"tar-only","APT::Get::Tar-Only",0},
+      {0,"dsc-only","APT::Get::Dsc-Only",0},
       {0,"purge","APT::Get::Purge",0},
       {0,"list-cleanup","APT::Get::List-Cleanup",0},
       {0,"reinstall","APT::Get::ReInstall",0},

Reply to: