summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-06-27 13:54:50 +0000
committerFrancois Pons <fpons@mandriva.com>2001-06-27 13:54:50 +0000
commitff3d073cdf289f179791218bd2b660c82bebf815 (patch)
treeaac8759d3c51913f763c7915192b73a75600ff14 /perl-install
parente1e4b606b15464a5e57a530dfda74ddfa48715f3 (diff)
downloaddrakx-backup-do-not-use-ff3d073cdf289f179791218bd2b660c82bebf815.tar
drakx-backup-do-not-use-ff3d073cdf289f179791218bd2b660c82bebf815.tar.gz
drakx-backup-do-not-use-ff3d073cdf289f179791218bd2b660c82bebf815.tar.bz2
drakx-backup-do-not-use-ff3d073cdf289f179791218bd2b660c82bebf815.tar.xz
drakx-backup-do-not-use-ff3d073cdf289f179791218bd2b660c82bebf815.zip
added support for epoch (serial).
Diffstat (limited to 'perl-install')
-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";