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 | |
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
-rw-r--r-- | rpmtools.pm | 2 | ||||
-rw-r--r-- | rpmtools.spec | 5 | ||||
-rw-r--r-- | rpmtools.xs | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/rpmtools.pm b/rpmtools.pm index 4cd3f0e..5a96fd6 100644 --- a/rpmtools.pm +++ b/rpmtools.pm @@ -101,7 +101,7 @@ sub new { my %tags; @tags{@_} = (); bless { flags => [ qw(name version release size arch serial group requires provides), - grep { exists $tags{$_} } qw(sense files obsoletes conflicts conffiles) ], + grep { exists $tags{$_} } qw(sense files obsoletes conflicts conffiles sourcerpm) ], info => {}, depslist => [], provides => {}, diff --git a/rpmtools.spec b/rpmtools.spec index 180bcb8..1aeed61 100644 --- a/rpmtools.spec +++ b/rpmtools.spec @@ -1,5 +1,5 @@ %define name rpmtools -%define release 9mdk +%define release 10mdk # do not modify here, see Makefile in the CVS %define version 3.0 @@ -54,6 +54,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/perl5/man/*/* %changelog +* Sat Jul 21 2001 Warly <warly@mandrakesoft.com> 3.0-10mdk +- add sourcerpm tag. + * Wed Jul 18 2001 François Pons <fpons@mandrakesoft.com> 3.0-9mdk - changed rpm requires by including release with test. - allow bootstrap with current version and not installed one. 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. */ |