patch: --dsc-only (revised)
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.
This revised patch includes patches for the man page as well.
--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},
diff -u -r apt-0.6.46.4/doc/apt-get.8 apt-new/doc/apt-get.8
--- apt-0.6.46.4/doc/apt-get.8 2006-12-04 09:43:34.000000000 -0800
+++ apt-new/doc/apt-get.8 2007-03-30 15:23:56.000000000 -0700
@@ -342,10 +342,11 @@
APT::Get::Only\-Source.
.RE
.PP
-\fB\-\-diff\-only\fR, \fB\-\-tar\-only\fR
+\fB\-\-diff\-only\fR, \fB\-\-dsc\-only\fR, \fB\-\-tar\-only\fR
.RS 3n
-Download only the diff or tar file of a source archive. Configuration Item:
-APT::Get::Diff\-Only
+Download only the diff, dsc, or tar file of a source archive. Configuration Item:
+APT::Get::Diff\-Only,
+APT::Get::Dsc\-Only
and
APT::Get::Tar\-Only.
.RE
diff -u -r apt-0.6.46.4/doc/apt-get.8.xml apt-new/doc/apt-get.8.xml
--- apt-0.6.46.4/doc/apt-get.8.xml 2006-12-04 08:33:55.000000000 -0800
+++ apt-new/doc/apt-get.8.xml 2007-03-30 15:27:05.000000000 -0700
@@ -393,9 +393,9 @@
Item: <literal>APT::Get::Only-Source</literal>.</para></listitem>
</varlistentry>
- <varlistentry><term><option>--diff-only</option></term><term><option>--tar-only</option></term>
- <listitem><para>Download only the diff or tar file of a source archive.
- Configuration Item: <literal>APT::Get::Diff-Only</literal> and
+ <varlistentry><term><option>--diff-only</option></term><term><option>--dsc-only</option></term><term><option>--tar-only</option></term>
+ <listitem><para>Download only the diff, dsc, or tar file of a source archive.
+ Configuration Item: <literal>APT::Get::Diff-Only</literal>, <literal>APT::Get::Dsc-Only</literal>, and
<literal>APT::Get::Tar-Only</literal>.</para></listitem>
</varlistentry>
Reply to: