Pass headerGet flags to extensions too (unused for now)
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 3 Jul 2009 11:21:01 +0000 (14:21 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 3 Jul 2009 11:21:01 +0000 (14:21 +0300)
lib/header.c
lib/tagexts.c

index eacd368..1afd4eb 100644 (file)
@@ -79,9 +79,10 @@ static const size_t headerMaxbytes = (32*1024*1024);
  *
  * @param h            header
  * @retval td          tag data container
+ * @param flags                modifier flags
  * @return             0 on success
  */
-typedef int (*headerTagTagFunction) (Header h, rpmtd td);
+typedef int (*headerTagTagFunction) (Header h, rpmtd td, headerGetFlags hgflags);
 
 extern void *rpmHeaderTagFunc(rpmTag tag);
 
@@ -1373,7 +1374,7 @@ static int intGetTagExt(Header h, rpmTag tag, rpmtd td, headerTagTagFunction tag
 {
     int rc;
     rpmtdReset(td);
-    rc = tagfunc(h, td);
+    rc = tagfunc(h, td, HEADERGET_DEFAULT);
     td->tag = tag;
     return rc; 
 }
index 501d8ac..552c849 100644 (file)
@@ -97,7 +97,7 @@ static void rpmfiBuildFNames(Header h, rpmTag tagN,
     *fcp = count;
 }
 
-static int filedepTag(Header h, rpmTag tagN, rpmtd td)
+static int filedepTag(Header h, rpmTag tagN, rpmtd td, headerGetFlags hgflags)
 {
     rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, RPMFI_NOHEADER);
     rpmds ds = NULL;
@@ -162,7 +162,7 @@ exit:
  * @retval td          tag data container
  * @return             1 on success
  */
-static int fsnamesTag(Header h, rpmtd td)
+static int fsnamesTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
     const char ** list;
 
@@ -181,7 +181,7 @@ static int fsnamesTag(Header h, rpmtd td)
  * @retval td          tag data container
  * @return             1 on success
  */
-static int instprefixTag(Header h, rpmtd td)
+static int instprefixTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
     struct rpmtd_s prefixes;
     int flags = HEADERGET_MINMEM;
@@ -206,7 +206,7 @@ static int instprefixTag(Header h, rpmtd td)
  * @retval td          tag data container
  * @return             1 on success
  */
-static int fssizesTag(Header h, rpmtd td)
+static int fssizesTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
     struct rpmtd_s fsizes, fnames;
     const char ** filenames = NULL;
@@ -251,7 +251,7 @@ static int fssizesTag(Header h, rpmtd td)
  * @retval td          tag data container
  * @return             1 on success
  */
-static int triggercondsTag(Header h, rpmtd td)
+static int triggercondsTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
     uint32_t * indices;
     int i, j;
@@ -321,7 +321,7 @@ static int triggercondsTag(Header h, rpmtd td)
  * @retval td          tag data container
  * @return             1 on success
  */
-static int triggertypeTag(Header h, rpmtd td)
+static int triggertypeTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
     int i;
     char ** conds;
@@ -374,7 +374,7 @@ static int triggertypeTag(Header h, rpmtd td)
  * @retval td          tag data container
  * @return             1 on success
  */
-static int filenamesTag(Header h, rpmtd td)
+static int filenamesTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
     rpmfiBuildFNames(h, RPMTAG_BASENAMES, 
                     (const char ***) &(td->data), &(td->count));
@@ -391,7 +391,7 @@ static int filenamesTag(Header h, rpmtd td)
  * @retval td          tag data container
  * @return             1 on success
  */
-static int origfilenamesTag(Header h, rpmtd td)
+static int origfilenamesTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
     rpmfiBuildFNames(h, RPMTAG_ORIGBASENAMES, 
                     (const char ***) &(td->data), &(td->count));
@@ -407,7 +407,7 @@ static int origfilenamesTag(Header h, rpmtd td)
  * @retval td          tag data container
  * @return             1 on success
  */
-static int fileclassTag(Header h, rpmtd td)
+static int fileclassTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
     rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, RPMFI_NOHEADER);
     char **fclasses;
@@ -443,9 +443,9 @@ exit:
  * @retval td          tag data container
  * @return             1 on success
  */
-static int fileprovideTag(Header h, rpmtd td)
+static int fileprovideTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
-    return filedepTag(h, RPMTAG_PROVIDENAME, td);
+    return filedepTag(h, RPMTAG_PROVIDENAME, td, hgflags);
 }
 
 /**
@@ -454,9 +454,9 @@ static int fileprovideTag(Header h, rpmtd td)
  * @retval td          tag data container
  * @return             1 on success
  */
-static int filerequireTag(Header h, rpmtd td)
+static int filerequireTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
-    return filedepTag(h, RPMTAG_REQUIRENAME, td);
+    return filedepTag(h, RPMTAG_REQUIRENAME, td, hgflags);
 }
 
 /* I18N look aside diversions */
@@ -475,7 +475,7 @@ static const char * const _macro_i18ndomains = "%{?_i18ndomains}";
  * @retval td          tag data container
  * @return             1 on success
  */
-static int i18nTag(Header h, rpmTag tag, rpmtd td)
+static int i18nTag(Header h, rpmTag tag, rpmtd td, headerGetFlags hgflags)
 {
     char * dstring = rpmExpand(_macro_i18ndomains, NULL);
     int rc;
@@ -543,9 +543,9 @@ static int i18nTag(Header h, rpmTag tag, rpmtd td)
  * @retval td          tag data container
  * @return             1 on success
  */
-static int summaryTag(Header h, rpmtd td)
+static int summaryTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
-    return i18nTag(h, RPMTAG_SUMMARY, td);
+    return i18nTag(h, RPMTAG_SUMMARY, td, hgflags);
 }
 
 /**
@@ -554,9 +554,9 @@ static int summaryTag(Header h, rpmtd td)
  * @retval td          tag data container
  * @return             1 on success
  */
-static int descriptionTag(Header h, rpmtd td)
+static int descriptionTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
-    return i18nTag(h, RPMTAG_DESCRIPTION, td);
+    return i18nTag(h, RPMTAG_DESCRIPTION, td, hgflags);
 }
 
 /**
@@ -565,9 +565,9 @@ static int descriptionTag(Header h, rpmtd td)
  * @retval td          tag data container
  * @return             1 on success
  */
-static int groupTag(Header h, rpmtd td)
+static int groupTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
-    return i18nTag(h, RPMTAG_GROUP, td);
+    return i18nTag(h, RPMTAG_GROUP, td, hgflags);
 }
 
 /*
@@ -611,22 +611,22 @@ static int get64(Header h, rpmtd td, rpmTag newtag, rpmTag oldtag)
  * @retval td          tag data container
  * @return             1 on success
  */
-static int longfilesizesTag(Header h, rpmtd td)
+static int longfilesizesTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
     return get64(h, td, RPMTAG_LONGFILESIZES, RPMTAG_FILESIZES);
 }
 
-static int longarchivesizeTag(Header h, rpmtd td)
+static int longarchivesizeTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
     return get64(h, td, RPMTAG_LONGARCHIVESIZE, RPMTAG_ARCHIVESIZE);
 }
 
-static int longsizeTag(Header h, rpmtd td)
+static int longsizeTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
     return get64(h, td, RPMTAG_LONGSIZE, RPMTAG_SIZE);
 }
 
-static int longsigsizeTag(Header h, rpmtd td)
+static int longsigsizeTag(Header h, rpmtd td, headerGetFlags hgflags)
 {
     return get64(h, td, RPMTAG_LONGSIGSIZE, RPMTAG_SIGSIZE);
 }