]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
Merge branch 'debian/sid' into debian/experimental
[apt.git] / cmdline / apt-get.cc
index 1019ff3250c55ff90cde11e9e862d3e86761a897..6e9d3bf6800d8397c4b1ea5c023914bba57b9836 100644 (file)
@@ -15,7 +15,7 @@
       upgrade - Smart-Download the newest versions of all packages
       dselect-upgrade - Follows dselect's changes to the Status: field
                        and installes new and removes old packages
-      dist-upgrade - Powerfull upgrader designed to handle the issues with
+      dist-upgrade - Powerful upgrader designed to handle the issues with
                     a new distribution.
       install - Download and install a given package (by name, not by .deb)
       check - Update the package cache and check for broken packages
@@ -513,7 +513,7 @@ bool DoDSelectUpgrade(CommandLine &CmdL)
    }
 
    /* Resolve any problems that dselect created, allupgrade cannot handle
-      such things. We do so quite agressively too.. */
+      such things. We do so quite aggressively too.. */
    if (Cache->BrokenCount() != 0)
    {      
       pkgProblemResolver Fix(Cache);
@@ -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]);
@@ -829,13 +829,10 @@ bool DoSource(CommandLine &CmdL)
         queued.insert(Last->Index().ArchiveURI(I->Path));
 
         // check if we have a file with that md5 sum already localy
-        if(!I->MD5Hash.empty() && FileExists(flNotDir(I->Path)))  
+        if(!I->Hash.empty() && FileExists(flNotDir(I->Path)))  
         {
-           FileFd Fd(flNotDir(I->Path), FileFd::ReadOnly);
-           MD5Summation sum;
-           sum.AddFD(Fd.Fd(), Fd.Size());
-           Fd.Close();
-           if((string)sum.Result() == I->MD5Hash) 
+            HashString hash_string = HashString(I->Hash);
+            if(hash_string.VerifyFile(flNotDir(I->Path)))
            {
               ioprintf(c1out,_("Skipping already downloaded file '%s'\n"),
                        flNotDir(I->Path).c_str());
@@ -844,7 +841,7 @@ bool DoSource(CommandLine &CmdL)
         }
 
         new pkgAcqFile(&Fetcher,Last->Index().ArchiveURI(I->Path),
-                       I->MD5Hash,I->Size,
+                       I->Hash,I->Size,
                        Last->Index().SourceInfo(*Last,*I),Src);
       }
    }