* apt-pkg/acquire-item.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 31 Jul 2007 10:11:54 +0000 (12:11 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 31 Jul 2007 10:11:54 +0000 (12:11 +0200)
  - only verify checksum in pkgAcqFile if we actually have one

apt-pkg/acquire-item.cc

index c48502b..6e7c750 100644 (file)
@@ -1538,7 +1538,7 @@ void pkgAcqFile::Done(string Message,unsigned long Size,string CalcHash,
    Item::Done(Message,Size,CalcHash,Cnf);
 
    // Check the hash
-   if(ExpectedHash.toStr() != CalcHash)
+   if(!ExpectedHash.empty() && ExpectedHash.toStr() != CalcHash)
    {
       Status = StatError;
       ErrorText = "Hash Sum mismatch";