summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2013-03-01 12:14:42 +0100
committerMichael Vogt <egon@debian-devbox>2013-03-01 12:14:42 +0100
commitfd785e49fa017abbe1871f18af515fdedb3ad183 (patch)
treeee1080897ddda913436ab48dcd661aeeb3f2b31e
parent612300483371c0e53ed0000a838bbfbbc4b919e0 (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/changelog3
3 files changed, 4 insertions, 3 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 665dd427e..89ca6c670 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1741,7 +1741,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 36b5bd9d1..792b12094 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,8 +19,9 @@ apt (0.9.8~exp1) UNRELEASED; urgency=low
works for redirected stdin
- print error in log if tcgetattr() fails instead of writing
a empty file
+ * use sha512 when available (LP: #1098752)
- -- David Kalnischkies <kalnischkies@gmail.com> Mon, 09 Jul 2012 17:36:40 +0200
+ -- Michael Vogt <mvo@debian.org> Fri, 01 Mar 2013 12:12:39 +0100
apt (0.9.7.8) UNRELEASED; urgency=low