diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-11-25 15:51:21 +0100 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-02-22 16:53:45 +0100 |
commit | ab951bc3184d62d9bf9a94187468329e53ac0d0a (patch) | |
tree | e51a193eb479875704f403d5ecf153e83787b538 /apt-private | |
parent | 4034726bfa6d9835bca90c6b4cd276c2fba2aea8 (diff) |
let {dsc,tar,diff}-only implicitly enable download-only
That was the case already for tar-only and diff-only, but in a more
confusing way and without a message while dsc "worked" before resulting
in a dpkg-source error shortly after as tar/diff files aren't available…
(cherry picked from commit 58ebb3017baf46e33a9bb2c1779d6daede27d108)
Diffstat (limited to 'apt-private')
-rw-r--r-- | apt-private/private-source.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/apt-private/private-source.cc b/apt-private/private-source.cc index fab1b4532..39342d180 100644 --- a/apt-private/private-source.cc +++ b/apt-private/private-source.cc @@ -495,7 +495,7 @@ bool DoSource(CommandLine &CmdL) return _error->Error(_("Failed to fetch some archives.")); } - if (_config->FindB("APT::Get::Download-only",false) == true) + if (diffOnly || tarOnly || dscOnly || _config->FindB("APT::Get::Download-only",false) == true) { c1out << _("Download complete and in download only mode") << std::endl; return true; @@ -509,13 +509,9 @@ bool DoSource(CommandLine &CmdL) bool const fixBroken = _config->FindB("APT::Get::Fix-Broken", false); for (unsigned I = 0; I != J; ++I) { - std::string Dir = Dsc[I].Package + '-' + Cache.GetPkgCache()->VS->UpstreamVersion(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 || - Dsc[I].Dsc.empty() == true) + if (unlikely(Dsc[I].Dsc.empty() == true)) continue; + std::string const Dir = Dsc[I].Package + '-' + Cache.GetPkgCache()->VS->UpstreamVersion(Dsc[I].Version.c_str()); // See if the package is already unpacked struct stat Stat; |