]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/indexrecords.cc
remove unused and strange default-value for pins
[apt.git] / apt-pkg / indexrecords.cc
index bf1901e11c4ae947c8e633c831296f465feb3ed0..d65266f649a229e843401e8f6ebd0762ab2bfd8c 100644 (file)
@@ -116,14 +116,10 @@ bool indexRecords::Load(const string Filename)                            /*{{{*/
             indexRecords::checkSum *Sum = new indexRecords::checkSum;
             Sum->MetaKeyFilename = Name;
             Sum->Size = Size;
-#if __GNUC__ >= 4
-       #pragma GCC diagnostic push
-       #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
-            Sum->Hash = HashString(HashString::SupportedHashes()[i],Hash);
-#if __GNUC__ >= 4
-       #pragma GCC diagnostic pop
-#endif
+           std::string SizeStr;
+           strprintf(SizeStr, "%llu", Size);
+           Sum->Hashes.push_back(HashString("Checksum-FileSize", SizeStr));
+            APT_IGNORE_DEPRECATED(Sum->Hash = HashString(HashString::SupportedHashes()[i],Hash);)
             Entries[Name] = Sum;
          }
          Entries[Name]->Hashes.push_back(HashString(HashString::SupportedHashes()[i],Hash));
@@ -274,10 +270,23 @@ void indexRecords::SetTrusted(bool const Trusted)
       this->Trusted = NEVER_TRUSTED;
 }
 
+#if APT_PKG_ABI >= 413
 indexRecords::indexRecords(const string &ExpectedDist) :
    Trusted(CHECK_TRUST), d(NULL), ExpectedDist(ExpectedDist), ValidUntil(0),
    SupportsAcquireByHash(false)
 {
 }
+#else
+indexRecords::indexRecords() :
+   Trusted(CHECK_TRUST), d(NULL), ExpectedDist(""), ValidUntil(0),
+   SupportsAcquireByHash(false)
+{
+}
+indexRecords::indexRecords(const string ExpectedDist) :
+   Trusted(CHECK_TRUST), d(NULL), ExpectedDist(ExpectedDist), ValidUntil(0),
+   SupportsAcquireByHash(false)
+{
+}
+#endif
 
 indexRecords::~indexRecords() {}