summaryrefslogtreecommitdiffstats
path: root/perl-install/c
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/c')
-rw-r--r--perl-install/c/stuff.pm1
-rw-r--r--perl-install/c/stuff.xs.pm4
2 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/c/stuff.pm b/perl-install/c/stuff.pm
index 0121f2904..b6cbd6128 100644
--- a/perl-install/c/stuff.pm
+++ b/perl-install/c/stuff.pm
@@ -19,6 +19,7 @@ sub headerGetEntry {
$q eq 'group' and return from_utf8(headerGetEntry_string($h, RPMTAG_GROUP()));
$q eq 'version' and return headerGetEntry_string($h, RPMTAG_VERSION());
$q eq 'release' and return headerGetEntry_string($h, RPMTAG_RELEASE());
+ $q eq 'epoch' and return headerGetEntry_int($h, RPMTAG_EPOCH());
$q eq 'summary' and return from_utf8(headerGetEntry_string($h, RPMTAG_SUMMARY()));
$q eq 'description' and return from_utf8(headerGetEntry_string($h, RPMTAG_DESCRIPTION()));
$q eq 'arch' and return headerGetEntry_string($h, RPMTAG_ARCH());
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm
index 6241157bb..7397f37ef 100644
--- a/perl-install/c/stuff.xs.pm
+++ b/perl-install/c/stuff.xs.pm
@@ -893,7 +893,7 @@ headerGetEntry_int(h, query)
CODE:
int type, count, *i;
headerGetEntry((Header) h, query, &type, (void **) &i, &count);
- RETVAL = *i;
+ RETVAL = i ? *i : 0; /* assume non existant value as 0 (needed for EPOCH (SERIAL)) */
OUTPUT:
RETVAL
@@ -976,7 +976,7 @@ headerGetEntry_filenames(h)
VT_ACTIVATE VT_WAITACTIVE VT_GETSTATE CDROM_LOCKDOOR CDROMEJECT
) ],
);
-push @macros, [ qw(int RPMTAG_NAME RPMTAG_GROUP RPMTAG_SIZE RPMTAG_VERSION RPMTAG_SUMMARY RPMTAG_DESCRIPTION RPMTAG_RELEASE RPMTAG_ARCH RPMTAG_OBSOLETES RPMTAG_REQUIRENAME RPMTAG_FILEFLAGS RPMFILE_CONFIG) ]
+push @macros, [ qw(int RPMTAG_NAME RPMTAG_GROUP RPMTAG_SIZE RPMTAG_VERSION RPMTAG_SUMMARY RPMTAG_DESCRIPTION RPMTAG_RELEASE RPMTAG_EPOCH RPMTAG_ARCH RPMTAG_OBSOLETES RPMTAG_REQUIRENAME RPMTAG_FILEFLAGS RPMFILE_CONFIG) ]
if $ENV{C_RPM};
$\= "\n";