summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-worker.cc4
-rw-r--r--apt-pkg/contrib/configuration.cc2
2 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index 460f59961..739c9e32c 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -273,7 +273,9 @@ bool pkgAcquire::Worker::RunMessages()
if(!expectedHash.empty())
{
string hashTag = expectedHash.HashType()+"-Hash";
- RecivedHash = expectedHash.HashType() + ":" + LookupTag(Message, hashTag.c_str());
+ string hashSum = LookupTag(Message, hashTag.c_str());
+ if(!hashSum.empty())
+ RecivedHash = expectedHash.HashType() + ":" + hashSum;
if(_config->FindB("Debug::pkgAcquire::Auth", false) == true)
{
clog << "201 URI Done: " << Owner->DescURI() << endl
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 7914bd07b..3109fd7a5 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -507,7 +507,7 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional,
CurLine++;
// This should be made to work instead, but this is better than looping
if (F.fail() && !F.eof())
- return _error->Error(_("Line %d too long (max %lu)"), CurLine, sizeof(Buffer));
+ return _error->Error(_("Line %d too long (max %u)"), CurLine, sizeof(Buffer));
_strtabexpand(Buffer,sizeof(Buffer));
_strstrip(Buffer);