]> git.saurik.com Git - apt.git/commitdiff
fix skipping of already downloaded files and add some FIXMEs
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 14 Jan 2013 06:59:52 +0000 (07:59 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 14 Jan 2013 06:59:52 +0000 (07:59 +0100)
apt-pkg/deb/debsrcrecords.cc
cmdline/apt-get.cc

index 45cc0ae82200d0bcb5b370c160fa9d1b1143c862..c620c229840543dd8034ecfabaaa95973221f7f0 100644 (file)
@@ -116,16 +116,21 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &List)
 {
    List.erase(List.begin(),List.end());
 
+   // FIXME: build string dynamically from 
+   //            Hashes::SupportedHashes
    const char *hash_field[] = { "Checksums-Sha512", 
                             "Checksums-Sha256",
                             "Checksums-Sha1",
                             "Files", // historic name
                             NULL,
    };
-   const char *hash_type[] = { "Sha512", 
-                            "Sha256",
-                            "Sha1",
-                            "md5sum",
+
+   // FIXME: use string from Hashes::SupportedHashes
+   // FIXME2: this is case senstivie
+   const char *hash_type[] = { "SHA512", 
+                            "SHA256",
+                            "SHA1",
+                            "MD5Sum",
                             NULL,
    };
    
index 68e7f829c7f50dd6b4edaaefeefacb530c0fb1fd..a2a19cd1156dbb635f4e04420babdba2dc7a9821 100644 (file)
@@ -2560,7 +2560,7 @@ bool DoSource(CommandLine &CmdL)
         if(!I->Hash.empty() && FileExists(flNotDir(I->Path)))  
         {
             HashString hash_string = HashString(I->Hash);
-            if(hash_string.VerifyFile(I->Path))
+            if(hash_string.VerifyFile(flNotDir(I->Path)))
            {
               ioprintf(c1out,_("Skipping already downloaded file '%s'\n"),
                        flNotDir(I->Path).c_str());