summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-05-08 09:18:39 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-05-08 09:18:39 +0200
commitcaa8a9f1e777f351b911dc8c30a858a5f026fca3 (patch)
treea9cb3ce115a832245cd528237cb238c38bca86bc /apt-pkg
parentff94be47f5dbdcf99cea23fad8c9b992a8e5a67e (diff)
parentb41713efc8f37d62f078bea850ef0a74e0af0103 (diff)
Merge remote-tracking branch 'upstream/debian/sid' into bugfix/update-progress-reporting
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc2
-rw-r--r--apt-pkg/contrib/hashes.cc2
-rw-r--r--apt-pkg/contrib/hashes.h2
3 files changed, 5 insertions, 1 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 1443380a1..d347efa54 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -936,6 +936,8 @@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,
}
CompressionExtension = comprExt;
+ Verify = true;
+
Init(URI, URIDesc, ShortDesc);
}
pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner, IndexTarget const *Target,
diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc
index 1fce0d75f..15f83615d 100644
--- a/apt-pkg/contrib/hashes.cc
+++ b/apt-pkg/contrib/hashes.cc
@@ -133,7 +133,7 @@ bool Hashes::AddFD(int const Fd,unsigned long long Size, bool const addMD5,
bool const addSHA1, bool const addSHA256, bool const addSHA512)
{
unsigned char Buf[64*64];
- bool const ToEOF = (Size == 0);
+ bool const ToEOF = (Size == UntilEOF);
while (Size != 0 || ToEOF)
{
unsigned long long n = sizeof(Buf);
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h
index 5cd1af03b..7a62f8a8f 100644
--- a/apt-pkg/contrib/hashes.h
+++ b/apt-pkg/contrib/hashes.h
@@ -78,6 +78,8 @@ class Hashes
SHA256Summation SHA256;
SHA512Summation SHA512;
+ static const int UntilEOF = 0;
+
inline bool Add(const unsigned char *Data,unsigned long long Size)
{
return MD5.Add(Data,Size) && SHA1.Add(Data,Size) && SHA256.Add(Data,Size) && SHA512.Add(Data,Size);