diff options
author | Florent Villard <warly@mandriva.com> | 2001-07-21 10:34:04 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2001-07-21 10:34:04 +0000 |
commit | ba831a4ce62bc256e0e1cd15047444ac75cb7ae6 (patch) | |
tree | 1a170aac736d4795bb5ee38e83ad238d43596145 /rpmtools.xs | |
parent | 78feed6676974ee68a6c97061eff60fceb0b7002 (diff) | |
download | rpmtools-ba831a4ce62bc256e0e1cd15047444ac75cb7ae6.tar rpmtools-ba831a4ce62bc256e0e1cd15047444ac75cb7ae6.tar.gz rpmtools-ba831a4ce62bc256e0e1cd15047444ac75cb7ae6.tar.bz2 rpmtools-ba831a4ce62bc256e0e1cd15047444ac75cb7ae6.tar.xz rpmtools-ba831a4ce62bc256e0e1cd15047444ac75cb7ae6.zip |
add sourcerpm tag
Diffstat (limited to 'rpmtools.xs')
-rw-r--r-- | rpmtools.xs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rpmtools.xs b/rpmtools.xs index d8f7d36..25d2abf 100644 --- a/rpmtools.xs +++ b/rpmtools.xs @@ -29,6 +29,7 @@ #define HDFLAGS_CONFLICTS 0x00800000 #define HDFLAGS_FILES 0x01000000 #define HDFLAGS_CONFFILES 0x02000000 +#define HDFLAGS_SOURCERPM 0x04000000 char *get_name(Header header, int_32 tag) { @@ -87,6 +88,7 @@ int get_bflag(AV* flag) { if (!strncmp(str, "obsoletes", 9)) bflag |= HDFLAGS_OBSOLETES; else if (!strncmp(str, "conflicts", 9)) bflag |= HDFLAGS_CONFLICTS; else if (!strncmp(str, "conffiles", 9)) bflag |= HDFLAGS_CONFFILES; + else if (!strncmp(str, "sourcerpm", 9)) bflag |= HDFLAGS_SOURCERPM; break; case 11: if (!strncmp(str, "description", 11)) bflag |= HDFLAGS_DESCRIPTION; @@ -206,6 +208,8 @@ HV* get_info(Header header, int bflag, HV* provides) { hv_store(header_info, "conflicts", 9, get_table_sense(header, RPMTAG_CONFLICTNAME, bflag & HDFLAGS_SENSE ? RPMTAG_CONFLICTFLAGS : 0, bflag & HDFLAGS_SENSE ? RPMTAG_CONFLICTVERSION : 0, 0), 0); + if (bflag & HDFLAGS_SOURCERPM) + hv_store(header_info, "sourcerpm", 9, newSVpv(get_name(header, RPMTAG_SOURCERPM), 0), 0); if (provides || (bflag & (HDFLAGS_FILES | HDFLAGS_CONFFILES))) { /* at this point, there is a need to parse all files to update provides of needed files, or to store them. */ |