summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2013-02-28 18:28:44 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2013-02-28 18:28:44 +0100
commita1b5561a036ebbe416cccfb2bd476a838ddb6286 (patch)
treec276385a0f4c097228f4c4fcb3158f765cea706f
parent3bbce699ee1a5dbbe37806aee7afcc615ecc6ebe (diff)
re-add compat pkgSrcRecords::File::MD5Hash
-rw-r--r--apt-pkg/deb/debsrcrecords.cc3
-rw-r--r--apt-pkg/srcrecords.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc
index 37d38ee5b..f5fb2da4a 100644
--- a/apt-pkg/deb/debsrcrecords.cc
+++ b/apt-pkg/deb/debsrcrecords.cc
@@ -157,6 +157,9 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &List)
SourceHashFields[i].first);
// assign full hash string
F.Hash = HashString(SourceHashFields[i].second, RawHash).toStr();
+ // API compat hack
+ if(SourceHashFields[i].second == "MD5Sum")
+ F.MD5Hash = RawHash;
// Parse the size and append the directory
F.Size = atoi(Size.c_str());
diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h
index 7cb490079..796d2e1bd 100644
--- a/apt-pkg/srcrecords.h
+++ b/apt-pkg/srcrecords.h
@@ -31,6 +31,7 @@ class pkgSrcRecords
// Describes a single file
struct File
{
+ std::string MD5Hash;
std::string Hash;
unsigned long Size;
std::string Path;