Scriptlet argument tags are really arrays
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 12 Sep 2011 08:43:11 +0000 (11:43 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 12 Sep 2011 08:48:27 +0000 (11:48 +0300)
- While the vast majority of scriptlet interpreters only consist
  of the interpreter name itself, they all can consist of arbitrary
  number of extra arguments. Rpm itself doesn't really care whether
  the tags are strings or string arrays but the scalar definition
  causes the rest of arguments to be invisible from eg python.
  Also having the type shown as string array hints at the proper
  query format when accessing these (and rpm itself is doing it
  wrong too in --scripts alias). Related to ticket #847.

lib/rpmtag.h

index 0b87d3d..767e17c 100644 (file)
@@ -144,15 +144,15 @@ typedef enum rpmTag_e {
     RPMTAG_CHANGELOGTEXT       = 1082, /* s[] */
     RPMTAG_BROKENMD5           = 1083, /* internal - obsolete */
     RPMTAG_PREREQ              = 1084, /* internal */
-    RPMTAG_PREINPROG           = 1085, /* s */
-    RPMTAG_POSTINPROG          = 1086, /* s */
-    RPMTAG_PREUNPROG           = 1087, /* s */
-    RPMTAG_POSTUNPROG          = 1088, /* s */
+    RPMTAG_PREINPROG           = 1085, /* s[] */
+    RPMTAG_POSTINPROG          = 1086, /* s[] */
+    RPMTAG_PREUNPROG           = 1087, /* s[] */
+    RPMTAG_POSTUNPROG          = 1088, /* s[] */
     RPMTAG_BUILDARCHS          = 1089, /* s[] */
     RPMTAG_OBSOLETENAME                = 1090, /* s[] */
 #define        RPMTAG_OBSOLETES RPMTAG_OBSOLETENAME    /* s[] */
 #define        RPMTAG_O        RPMTAG_OBSOLETENAME     /* s[] */
-    RPMTAG_VERIFYSCRIPTPROG    = 1091, /* s */
+    RPMTAG_VERIFYSCRIPTPROG    = 1091, /* s[] */
     RPMTAG_TRIGGERSCRIPTPROG   = 1092, /* s[] */
     RPMTAG_DOCDIR              = 1093, /* internal */
     RPMTAG_COOKIE              = 1094, /* s */
@@ -214,8 +214,8 @@ typedef enum rpmTag_e {
     RPMTAG_POLICIES            = 1150, /* s[] selinux *.te policy file. */
     RPMTAG_PRETRANS            = 1151, /* s */
     RPMTAG_POSTTRANS           = 1152, /* s */
-    RPMTAG_PRETRANSPROG                = 1153, /* s */
-    RPMTAG_POSTTRANSPROG       = 1154, /* s */
+    RPMTAG_PRETRANSPROG                = 1153, /* s[] */
+    RPMTAG_POSTTRANSPROG       = 1154, /* s[] */
     RPMTAG_DISTTAG             = 1155, /* s */
     RPMTAG_SUGGESTSNAME                = 1156, /* s[] extension (unimplemented) */
 #define        RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME     /* s[] (unimplemented) */