]> git.saurik.com Git - apt.git/commitdiff
use VersionSet in download to handle repeats
authorDavid Kalnischkies <david@kalnischkies.de>
Mon, 10 Feb 2014 17:06:28 +0000 (18:06 +0100)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 10 Feb 2014 17:10:53 +0000 (18:10 +0100)
Closes: 738103
cmdline/apt-get.cc
test/integration/test-apt-get-download

index 6bff6e7de5963d6097e976c2250f2a68b08aefb1..2a9964722093d1495bf20f66bfa41287da2f1367 100644 (file)
@@ -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]);
index c2a5c3d8eb263aae1fa46a17ecece5a844027612..ec809e0ce84b9fcaa6caeec0092d187b4a3d7536 100755 (executable)
@@ -34,8 +34,13 @@ testequal "'file://${DEBFILE}' apt_2.0_all.deb $(stat -c%s $DEBFILE) SHA512:$(sh
 # deb:677887
 testequal "E: Can't find a source to download version '1.0' of 'vrms:i386'" aptget download vrms
 
-# deb:736962 - apt-get download foo && 
-aptget download apt
-aptget download apt
+# deb:736962
+testsuccess aptget download apt
+testsuccess aptget download apt
+testsuccess test -s apt_2.0_all.deb
+
+rm -f apt_1.0_all.deb apt_2.0_all.deb
+
+# deb:738103
+testsuccess aptget download apt apt apt/unstable apt=2.0
 testsuccess test -s apt_2.0_all.deb
-rm -f apt_1.0_all.deb