diff options
-rw-r--r-- | rpmtools.pm | 9 | ||||
-rw-r--r-- | rpmtools.spec | 6 | ||||
-rw-r--r-- | rpmtools.xs | 6 |
3 files changed, 11 insertions, 10 deletions
diff --git a/rpmtools.pm b/rpmtools.pm index 691e868..5bcb427 100644 --- a/rpmtools.pm +++ b/rpmtools.pm @@ -451,15 +451,12 @@ sub get_unresolved_provides_files { #- this is necessary to try a second pass. sub keep_only_cleaned_provides_files { my ($params) = @_; + my @keeplist = map { /^\// } keys %{$params->{provides}}; - foreach (keys %{$params->{provides}}) { - delete $params->{provides}{$_}; - /^\// and $params->{provides}{$_} = undef; - } - - #- clean everything else at this point. + #- clean everything at this point, but keep file referenced. $params->{info} = {}; $params->{depslist} = []; + $params->{provides} = {}; @{$params->{provides}}{@keeplist} = (); } #- reset params to allow other entries. diff --git a/rpmtools.spec b/rpmtools.spec index 8d5546a..8f6fef4 100644 --- a/rpmtools.spec +++ b/rpmtools.spec @@ -1,5 +1,5 @@ %define name rpmtools -%define release 13mdk +%define release 14mdk # do not modify here, see Makefile in the CVS %define version 2.3 @@ -51,6 +51,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/perl5/man/*/* %changelog +* Fri Mar 23 2001 François Pons <fpons@mandrakesoft.com> 2.3-14mdk +- reverted rpmtools.xs modification. +- simplified the semi fix. + * Fri Mar 23 2001 François Pons <fpons@mandrakesoft.com> 2.3-13mdk - semi-fixed hashes subscript error (workaround). - added --compact option to parsehdlist. diff --git a/rpmtools.xs b/rpmtools.xs index a50735d..4aeebd1 100644 --- a/rpmtools.xs +++ b/rpmtools.xs @@ -107,7 +107,7 @@ SV *get_table_sense(Header header, int_32 tag_name, int_32 tag_flags, int_32 tag if (list) { table_sense = newAV(); - if (!table_sense) return SvREFCNT_inc(&PL_sv_undef); + if (!table_sense) return &PL_sv_undef; for(i = 0; i < count; i++) { len = strlen(list[i]); if (len >= sizeof(buff)) continue; @@ -139,14 +139,14 @@ SV *get_table_sense(Header header, int_32 tag_name, int_32 tag_flags, int_32 tag /* for getting provides about required files */ if (iprovides && buff[0] == '/') - hv_store(iprovides, buff, p - buff, SvREFCNT_inc(&PL_sv_undef), 0); + hv_fetch(iprovides, buff, p - buff, 1); av_push(table_sense, newSVpv(buff, p - buff)); } return newRV_noinc((SV*)table_sense); } - return SvREFCNT_inc(&PL_sv_undef); + return &PL_sv_undef; } HV* get_info(Header header, int bflag, HV* provides) { |