aboutsummaryrefslogtreecommitdiffstats
path: root/rpmtools.xs
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-12-05 16:42:28 +0000
committerFrancois Pons <fpons@mandriva.com>2001-12-05 16:42:28 +0000
commit2c249e7946fb4c3f4013aabe36ec1097abc02d8a (patch)
treead4d793507990f0b4c4a0247146d34712dcb38eb /rpmtools.xs
parent3366902175db329e57107b7a822e7d07202f5606 (diff)
downloadrpmtools-2c249e7946fb4c3f4013aabe36ec1097abc02d8a.tar
rpmtools-2c249e7946fb4c3f4013aabe36ec1097abc02d8a.tar.gz
rpmtools-2c249e7946fb4c3f4013aabe36ec1097abc02d8a.tar.bz2
rpmtools-2c249e7946fb4c3f4013aabe36ec1097abc02d8a.tar.xz
rpmtools-2c249e7946fb4c3f4013aabe36ec1097abc02d8a.zip
4.0 release (changes of provides internally).4.0
Diffstat (limited to 'rpmtools.xs')
-rw-r--r--rpmtools.xs13
1 files changed, 9 insertions, 4 deletions
diff --git a/rpmtools.xs b/rpmtools.xs
index 89237b2..fc528e7 100644
--- a/rpmtools.xs
+++ b/rpmtools.xs
@@ -118,12 +118,17 @@ void update_provides(int force, HV* provides, char *name, STRLEN len, Header hea
if (!len) len = strlen(name);
if (force && (isv = hv_fetch(provides, name, len, 1)) || provides && (isv = hv_fetch(provides, name, len, 0)) != 0) {
- if (!SvROK(*isv) || SvTYPE(SvRV(*isv)) != SVt_PVAV) {
- SV* choice_table = (SV*)newAV();
+ if (!SvROK(*isv) || SvTYPE(SvRV(*isv)) != SVt_PVHV) {
+ SV* choice_set = (SV*)newHV();
SvREFCNT_dec(*isv); /* drop the old as we are changing it */
- *isv = choice_table ? newRV_noinc(choice_table) : &PL_sv_undef;
+ *isv = choice_set ? newRV_noinc(choice_set) : &PL_sv_undef;
+ }
+ if (*isv != &PL_sv_undef) {
+ STRLEN key_len;
+ char *key;
+ key = SvPV(get_fullname_sv(header), key_len);
+ hv_fetch((HV*)SvRV(*isv), key, key_len, 1);
}
- if (*isv != &PL_sv_undef) av_push((AV*)SvRV(*isv), get_fullname_sv(header));
}
}