diff options
-rw-r--r-- | URPM.xs | 17 |
1 files changed, 6 insertions, 11 deletions
@@ -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); |