]> git.saurik.com Git - apt.git/commitdiff
[ABI break] merged patch from Jonathan Thomas to have a new
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 28 Jul 2011 09:58:55 +0000 (11:58 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 28 Jul 2011 09:58:55 +0000 (11:58 +0200)
RecordField() function in the pkgRecorder parser. Many thanks
Thomas

apt-pkg/deb/debrecords.cc
apt-pkg/deb/debrecords.h
apt-pkg/pkgrecords.h
debian/changelog

index 1ca9ae1d2d602d83c6aedfe4c1b73f0cd8ffdff6..f323c03c2499982b23971c2cbdbb1f46dec3a963 100644 (file)
@@ -101,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               /*{{{*/
 // ---------------------------------------------------------------------
 /* */
index 9692ac94cfaf4ebd1fc5aa63b811c68fa4e87c7f..7868bfa3d5410b3f6f65ebb2ff2612a9489249e0 100644 (file)
@@ -50,6 +50,9 @@ class debRecordParser : public pkgRecords::Parser
    virtual string Name();
    virtual string Homepage();
 
+   // An arbitrary custom field
+   virtual string RecordField(const char *fieldName);
+
    virtual void GetRec(const char *&Start,const char *&Stop);
    
    debRecordParser(string FileName,pkgCache &Cache);
index 78e39e577cf0cf18af4d44921b7425cf619cec1b..ce92cacc48ee836d28a40ffd65f4d5a19505df99 100644 (file)
@@ -69,7 +69,10 @@ class pkgRecords::Parser                                             /*{{{*/
    virtual string LongDesc() {return string();};
    virtual string Name() {return string();};
    virtual string Homepage() {return string();}
-   
+
+   // An arbitrary custom field
+   virtual string RecordField(const char *fieldName) { return string();};
+
    // The record in binary form
    virtual void GetRec(const char *&Start,const char *&Stop) {Start = Stop = 0;};
    
index c8af59ab2e5a5d551511ad302db871adf6448030..08635cae77af422207fd13ca62ab4db1f1e5c93f 100644 (file)
@@ -14,6 +14,9 @@ apt (0.8.16~exp4) UNRELEASED; urgency=low
     - cleanup old ABI break avoidance hacks
   * [ABI break] apt-pkg/acquire-item.{cc,h}:
     - cleanup around OptionalIndexTarget and SubIndexTarget
+  * [ABI break] merged patch from Jonathan Thomas to have a new
+    RecordField() function in the pkgRecorder parser. Many thanks
+    Thomas
 
  -- Julian Andres Klode <jak@debian.org>  Wed, 20 Jul 2011 16:23:55 +0200