X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/3d8232bf97ce11818fb07813a71136484ea1a44a..d03b947b0ce4f87d7d5cc48d4d274ab3bd0b289a:/apt-pkg/deb/debrecords.cc?ds=sidebyside diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc index d78a7e2e0..a132f34a6 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -65,7 +65,13 @@ string debRecordParserBase::FileName() // RecordParserBase::Name - Return the package name /*{{{*/ string debRecordParserBase::Name() { - return Section.FindS("Package"); + string Result = Section.FindS("Package"); + + // Normalize mixed case package names to lower case, like dpkg does + // See Bug#807012 for details + std::transform(Result.begin(), Result.end(), Result.begin(), tolower_ascii); + + return Result; } /*}}}*/ // RecordParserBase::Homepage - Return the package homepage /*{{{*/ @@ -84,6 +90,9 @@ HashStringList debRecordParserBase::Hashes() const if (hash.empty() == false) hashes.push_back(HashString(*type, hash)); } + auto const size = Section.FindULL("Size", 0); + if (size != 0) + hashes.FileSize(size); return hashes; } /*}}}*/