]> git.saurik.com Git - apt.git/blobdiff - ftparchive/cachedb.cc
improve https method queue progress reporting
[apt.git] / ftparchive / cachedb.cc
index da45eb8d25229b5364fe5be7fee9bedc498b37ba..1dc2685946684598e602b6f2ba7f3a1b781dd25f 100644 (file)
@@ -322,12 +322,12 @@ bool CacheDB::LoadSource()                                                /*{{{*/
    if (Dsc.Read(FileName) == false)
       return false;
 
-   if (Dsc.Data == 0)
+   if (Dsc.Length == 0)
       return _error->Error(_("Failed to read .dsc"));
-   
+
    // Write back the control information
    InitQuerySource();
-   if (Put(Dsc.Data, Dsc.Length) == true)
+   if (Put(Dsc.Data.c_str(), Dsc.Length) == true)
       CurStat.Flags |= FlSource;
 
    return true;
@@ -473,6 +473,10 @@ bool CacheDB::GetHashes(bool const GenOnly, unsigned int const DoHashes)
            hex2bytes(CurStat.MD5, hs->HashValue().data(), sizeof(CurStat.MD5));
            CurStat.Flags |= FlMD5;
         }
+        else if (strcasecmp(hs->HashType().c_str(), "Checksum-FileSize") == 0)
+        {
+           // we store it in a different field already
+        }
         else
            return _error->Error("Got unknown unrequested hashtype %s", hs->HashType().c_str());
       }