Michael Vogt лет назад: 13
Родитель
Сommit
472a91553b
3 измененных файлов с 4 добавлено и 2 удалено
  1. 1 1
      apt-pkg/acquire-item.cc
  2. 1 1
      cmdline/apt-get.cc
  3. 2 0
      debian/changelog

+ 1 - 1
apt-pkg/acquire-item.cc

@@ -1730,7 +1730,7 @@ bool pkgAcqArchive::QueueNext()
       {
 	 if(stringcasecmp(ForceHash, "sha512") == 0)
 	    ExpectedHash = HashString("SHA512", Parse.SHA512Hash());
-	 if(stringcasecmp(ForceHash, "sha256") == 0)
+	 else if(stringcasecmp(ForceHash, "sha256") == 0)
 	    ExpectedHash = HashString("SHA256", Parse.SHA256Hash());
 	 else if (stringcasecmp(ForceHash, "sha1") == 0)
 	    ExpectedHash = HashString("SHA1", Parse.SHA1Hash());

+ 1 - 1
cmdline/apt-get.cc

@@ -2395,7 +2395,7 @@ bool DoDownload(CommandLine &CmdL)
       HashString hash;
       if (rec.SHA512Hash() != "")
          hash = HashString("sha512", rec.SHA512Hash());
-      if (rec.SHA256Hash() != "")
+      else if (rec.SHA256Hash() != "")
          hash = HashString("sha256", rec.SHA256Hash());
       else if (rec.SHA1Hash() != "")
          hash = HashString("sha1", rec.SHA1Hash());

+ 2 - 0
debian/changelog

@@ -2,6 +2,8 @@ apt (0.9.7.8~exp2) UNRELEASEDexperimental; urgency=low
 
   * include two missing patches to really fix bug #696225, thanks to
     Guillem Jover 
+  * ensure sha512 is really used when available, thanks to Tyler Hicks
+   (LP: #1098752)
 
  -- Michael Vogt <michael.vogt@ubuntu.com>  Fri, 01 Mar 2013 18:50:17 +0100