summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2013-03-01 19:04:15 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2013-03-01 19:04:15 +0100
commit472a91553b98873d36b05cc9af1471510b22879c (patch)
tree140f6a4f86425475271c5a50343c4cd99f7c52b5
parent32fa71a57dcf625c94207dce612175af49c93ce4 (diff)
parent75247742b762d5e8dc311600b8b053533695f36d (diff)
merged lp:~mvo/apt/hash-order
-rw-r--r--apt-pkg/acquire-item.cc2
-rw-r--r--cmdline/apt-get.cc2
-rw-r--r--debian/changelog2
3 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index a30e98858..a71886a87 100644
--- a/apt-pkg/acquire-item.cc
+++ b/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());
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 1bb981b20..e3c74a099 100644
--- a/cmdline/apt-get.cc
+++ b/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());
diff --git a/debian/changelog b/debian/changelog
index ff4988d63..b22712a4f 100644
--- a/debian/changelog
+++ b/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