aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-11-29 15:07:17 +0000
committerThierry Vignaud <tv@mageia.org>2012-11-29 15:07:17 +0000
commit04ce1240816e7b6a6a7c4cd65949e26baa5faab2 (patch)
tree3f190f937486648e45591b2fb23d16f52b9a3665
parenta232cee4e7f58ba08826830ace1a32793260e49a (diff)
downloadperl-URPM-04ce1240816e7b6a6a7c4cd65949e26baa5faab2.tar
perl-URPM-04ce1240816e7b6a6a7c4cd65949e26baa5faab2.tar.gz
perl-URPM-04ce1240816e7b6a6a7c4cd65949e26baa5faab2.tar.bz2
perl-URPM-04ce1240816e7b6a6a7c4cd65949e26baa5faab2.tar.xz
perl-URPM-04ce1240816e7b6a6a7c4cd65949e26baa5faab2.zip
(update_provide_entry) kill it
-rw-r--r--URPM.xs17
1 files changed, 6 insertions, 11 deletions
diff --git a/URPM.xs b/URPM.xs
index 9fd82ca..93d0a0f 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -812,11 +812,6 @@ update_hash_entry(HV *hash, const char *name, STRLEN len, int force, IV use_sens
}
static void
-update_provide_entry(const char *name, STRLEN len, int force, IV use_sense, const URPM__Package pkg, HV *provides) {
- update_hash_entry(provides, name, len, force, use_sense, pkg);
-}
-
-static void
update_provides(const URPM__Package pkg, HV *provides) {
if (pkg->h) {
int len;
@@ -841,8 +836,8 @@ update_provides(const URPM__Package pkg, HV *provides) {
for (i = 0; i < rpmtdCount(&td); ++i) {
len = strlen(list[i]);
if (!strncmp(list[i], "rpmlib(", 7)) continue;
- update_provide_entry(list[i], len, 1, flags && flags[i] & (RPMSENSE_PREREQ|RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POSTUN|RPMSENSE_SCRIPT_POST|RPMSENSE_LESS|RPMSENSE_EQUAL|RPMSENSE_GREATER),
- pkg, provides);
+ update_hash_entry(provides, list[i], len, 1, flags && flags[i] & (RPMSENSE_PREREQ|RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POSTUN|RPMSENSE_SCRIPT_POST|RPMSENSE_LESS|RPMSENSE_EQUAL|RPMSENSE_GREATER),
+ pkg);
}
}
} else {
@@ -869,11 +864,11 @@ update_provides(const URPM__Package pkg, HV *provides) {
ps = strchr(s, '@');
while(ps != NULL) {
*ps = 0; es = strchr(s, '['); if (!es) es = strchr(s, ' '); *ps = '@';
- update_provide_entry(s, es != NULL ? es-s : ps-s, 1, es != NULL, pkg, provides);
+ update_hash_entry(provides, s, es != NULL ? es-s : ps-s, 1, es != NULL, pkg);
s = ps + 1; ps = strchr(s, '@');
}
es = strchr(s, '['); if (!es) es = strchr(s, ' ');
- update_provide_entry(s, es != NULL ? es-s : 0, 1, es != NULL, pkg, provides);
+ update_hash_entry(provides, s, es != NULL ? es-s : 0, 1, es != NULL, pkg);
}
}
}
@@ -933,7 +928,7 @@ update_provides_files(const URPM__Package pkg, HV *provides) {
if (p - buff + len >= sizeof(buff)) continue;
memcpy(p, baseNames[i], len + 1); p += len;
- update_provide_entry(buff, p-buff, 0, 0, pkg, provides);
+ update_hash_entry(provides, buff, p-buff, 0, 0, pkg);
}
rpmtdFreeData(&td_baseNames);
@@ -946,7 +941,7 @@ update_provides_files(const URPM__Package pkg, HV *provides) {
const char *s = rpmtdNextString(&td);
len = strlen(s);
- update_provide_entry(s, len, 0, 0, pkg, provides);
+ update_hash_entry(provides, s, len, 0, 0, pkg);
}
rpmtdFreeData(&td);