]> git.saurik.com Git - apt.git/blobdiff - ftparchive/writer.cc
cleanup the hash iteration. unfortunately there is no 1:1 mapping from Hashes::Suppor...
[apt.git] / ftparchive / writer.cc
index 02777713c5862a14e35b21aa9c37e9301e57895c..3065526ad396ab2d8aced022d8ac24bf005eca20 100644 (file)
@@ -318,7 +318,7 @@ PackagesWriter::PackagesWriter(string const &DB,string const &Overrides,string c
    DoMD5 = _config->FindB("APT::FTPArchive::Packages::MD5",DoMD5);
    DoSHA1 = _config->FindB("APT::FTPArchive::Packages::SHA1",DoSHA1);
    DoSHA256 = _config->FindB("APT::FTPArchive::Packages::SHA256",DoSHA256);
-   DoSHA256 = _config->FindB("APT::FTPArchive::Packages::SHA512",true);
+   DoSHA512 = _config->FindB("APT::FTPArchive::Packages::SHA512",DoSHA512);
    DoAlwaysStat = _config->FindB("APT::FTPArchive::AlwaysStat", false);
    DoContents = _config->FindB("APT::FTPArchive::Contents",true);
    NoOverride = _config->FindB("APT::FTPArchive::NoOverrideMsg",false);
@@ -941,12 +941,14 @@ ReleaseWriter::ReleaseWriter(string const &DB)
       AddPattern("Packages.bz2");
       AddPattern("Packages.lzma");
       AddPattern("Packages.xz");
+      AddPattern("Translation-*");
       AddPattern("Sources");
       AddPattern("Sources.gz");
       AddPattern("Sources.bz2");
       AddPattern("Sources.lzma");
       AddPattern("Sources.xz");
       AddPattern("Release");
+      AddPattern("Contents-*");
       AddPattern("Index");
       AddPattern("md5sum.txt");
    }
@@ -1035,7 +1037,7 @@ bool ReleaseWriter::DoPackage(string FileName)
    CheckSums[NewFileName].size = fd.Size();
 
    Hashes hs;
-   hs.AddFD(fd.Fd(), 0, DoMD5, DoSHA1, DoSHA256, DoSHA512);
+   hs.AddFD(fd, 0, DoMD5, DoSHA1, DoSHA256, DoSHA512);
    if (DoMD5 == true)
       CheckSums[NewFileName].MD5 = hs.MD5.Result();
    if (DoSHA1 == true)