diff options
author | Michael Vogt <mvo@debian.org> | 2014-02-12 07:59:07 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-02-12 07:59:07 +0100 |
commit | 8f3594c3487800edc2a97af1f3290049776dc556 (patch) | |
tree | 3b6399c3e98856708e37914ad48f6ee9002011fb /cmdline | |
parent | 33b813ce44c7bafeb2a36b66fd004f8d94a2cbe4 (diff) |
Use a APT::VersionSet instead of a VersionList
Use a APT::VersionSet instead of a APT::VersionList in DoDownload()
to ensure that there is only one version in the set even if the
user passes multiple identical name/versions on the commandline
(Bug#738103)
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 1019ff325..4d609104c 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -630,8 +630,8 @@ bool DoDownload(CommandLine &CmdL) return false; APT::CacheSetHelper helper(c0out); - APT::VersionList verset = APT::VersionList::FromCommandLine(Cache, - CmdL.FileList + 1, APT::VersionList::CANDIDATE, helper); + APT::VersionSet verset = APT::VersionSet::FromCommandLine(Cache, + CmdL.FileList + 1, APT::VersionSet::CANDIDATE, helper); if (verset.empty() == true) return false; @@ -650,7 +650,7 @@ bool DoDownload(CommandLine &CmdL) std::string const cwd = SafeGetCWD(); _config->Set("Dir::Cache::Archives", cwd); int i = 0; - for (APT::VersionList::const_iterator Ver = verset.begin(); + for (APT::VersionSet::const_iterator Ver = verset.begin(); Ver != verset.end(); ++Ver, ++i) { pkgAcquire::Item *I = new pkgAcqArchive(&Fetcher, SrcList, &Recs, *Ver, storefile[i]); |