]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debrecords.cc
* apt-pkg/contrib/configuration.cc:
[apt.git] / apt-pkg / deb / debrecords.cc
index 34ef0d8f25801e5c7f44804dab85a3c14d5607b2..f323c03c2499982b23971c2cbdbb1f46dec3a963 100644 (file)
@@ -19,7 +19,7 @@
 // ---------------------------------------------------------------------
 /* */
 debRecordParser::debRecordParser(string FileName,pkgCache &Cache) : 
-                  File(FileName,FileFd::ReadOnly), 
+                  File(FileName,FileFd::ReadOnlyGzip), 
                   Tags(&File, std::max(Cache.Head().MaxVerFileSize, 
                                       Cache.Head().MaxDescFileSize) + 200)
 {
@@ -77,7 +77,7 @@ string debRecordParser::SHA1Hash()
    return Section.FindS("SHA1");
 }
                                                                        /*}}}*/
-// RecordParser::SHA1Hash - Return the archive hash                    /*{{{*/
+// RecordParser::SHA256Hash - Return the archive hash                  /*{{{*/
 // ---------------------------------------------------------------------
 /* */
 string debRecordParser::SHA256Hash()
@@ -85,6 +85,14 @@ string debRecordParser::SHA256Hash()
    return Section.FindS("SHA256");
 }
                                                                        /*}}}*/
+// RecordParser::SHA512Hash - Return the archive hash                  /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+string debRecordParser::SHA512Hash()
+{
+   return Section.FindS("SHA512");
+}
+                                                                       /*}}}*/
 // RecordParser::Maintainer - Return the maintainer email              /*{{{*/
 // ---------------------------------------------------------------------
 /* */
@@ -93,6 +101,15 @@ string debRecordParser::Maintainer()
    return Section.FindS("Maintainer");
 }
                                                                        /*}}}*/
+// RecordParser::RecordField - Return the value of an arbitrary field       /*{{*/
+// ---------------------------------------------------------------------
+/* */
+string debRecordParser::RecordField(const char *fieldName)
+{
+   return Section.FindS(fieldName);
+}
+
+                                                                        /*}}}*/
 // RecordParser::ShortDesc - Return a 1 line description               /*{{{*/
 // ---------------------------------------------------------------------
 /* */