aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-09-14 06:04:01 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-09-14 06:04:01 +0200
commit0f122c39101955dc584fe8e0dacfed17dfc7c831 (patch)
treeff6b805dc766cb7caac48c495f72e656a898effe
parent1ac0e39422d4cab4ae62ca76fea2ba26fb2183bb (diff)
downloadperl-URPM-0f122c39101955dc584fe8e0dacfed17dfc7c831.tar
perl-URPM-0f122c39101955dc584fe8e0dacfed17dfc7c831.tar.gz
perl-URPM-0f122c39101955dc584fe8e0dacfed17dfc7c831.tar.bz2
perl-URPM-0f122c39101955dc584fe8e0dacfed17dfc7c831.tar.xz
perl-URPM-0f122c39101955dc584fe8e0dacfed17dfc7c831.zip
kill bogus files
-rw-r--r--xs1.xs61
-rw-r--r--xs1b.xs43
-rw-r--r--xs2.xs28
3 files changed, 0 insertions, 132 deletions
diff --git a/xs1.xs b/xs1.xs
deleted file mode 100644
index 0f012fd..0000000
--- a/xs1.xs
+++ /dev/null
@@ -1,61 +0,0 @@
-static void
-update_provides(const URPM__Package pkg, HV *provides) {
- if (pkg->h) {
- int len;
- struct rpmtd_s td, td_flags;
- unsigned int i;
-
- /* examine requires for files which need to be marked in provides */
- if (headerGet(pkg->h, RPMTAG_REQUIRENAME, &td, HEADERGET_DEFAULT)) {
- for (i = 0; i < rpmtdCount(&td); ++i) {
- const char *s = rpmtdNextString(&td);
- len = strlen(s);
- if (s[0] == '/') (void)hv_fetch(provides, s, len, 1);
- }
- }
-
- /* update all provides */
- if (headerGet(pkg->h, RPMTAG_PROVIDENAME, &td, HEADERGET_DEFAULT)) {
- char **list = td.data;
- rpmsenseFlags *flags = NULL;
- if (headerGet(pkg->h, RPMTAG_PROVIDEFLAGS, &td_flags, HEADERGET_DEFAULT))
- flags = td_flags.data;
- for (i = 0; i < rpmtdCount(&td); ++i) {
- len = strlen(list[i]);
- if (!strncmp(list[i], "rpmlib(", 7)) continue;
- 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 {
- char *ps, *s, *es;
-
- if ((s = pkg->requires) != NULL && *s != 0) {
- ps = strchr(s, '@');
- /* examine requires for files which need to be marked in provides */
- while(ps != NULL) {
- if (s[0] == '/') {
- *ps = 0; es = strchr(s, '['); if (!es) es = strchr(s, ' '); *ps = '@';
- (void)hv_fetch(provides, s, es != NULL ? es-s : ps-s, 1);
- }
- s = ps + 1; ps = strchr(s, '@');
- }
- if (s[0] == '/') {
- es = strchr(s, '['); if (!es) es = strchr(s, ' ');
- (void)hv_fetch(provides, s, es != NULL ? (U32)(es-s) : strlen(s), 1);
- }
- }
-
- /* update all provides */
- if ((s = pkg->provides) != NULL && *s != 0) {
- ps = strchr(s, '@');
- while(ps != NULL) {
- *ps = 0; es = strchr(s, '['); if (!es) es = strchr(s, ' '); *ps = '@';
- 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_hash_entry(provides, s, es != NULL ? es-s : 0, 1, es != NULL, pkg);
- }
- }
-
diff --git a/xs1b.xs b/xs1b.xs
deleted file mode 100644
index ea8b169..0000000
--- a/xs1b.xs
+++ /dev/null
@@ -1,43 +0,0 @@
-static void
-update_provides_files(const URPM__Package pkg, HV *provides) {
- if (pkg->h) {
- STRLEN len;
- unsigned int i;
-
- struct rpmtd_s td_baseNames, td_dirIndexes, td_dirNames;
- if (headerGet(pkg->h, RPMTAG_BASENAMES, &td_baseNames, HEADERGET_DEFAULT) &&
- headerGet(pkg->h, RPMTAG_DIRINDEXES, &td_dirIndexes, HEADERGET_DEFAULT) &&
- headerGet(pkg->h, RPMTAG_DIRNAMES, &td_dirNames, HEADERGET_DEFAULT)) {
-
- char **baseNames = td_baseNames.data;
- char **dirNames = td_dirNames.data;
- int32_t *dirIndexes = td_dirIndexes.data;
-
- char buff[4096];
- char *p;
-
- for(i = 0; i < rpmtdCount(&td_baseNames); i++) {
- len = strlen(dirNames[dirIndexes[i]]);
- if (len >= sizeof(buff)) continue;
- memcpy(p = buff, dirNames[dirIndexes[i]], len + 1); p += len;
- len = strlen(baseNames[i]);
- if (p - buff + len >= sizeof(buff)) continue;
- memcpy(p, baseNames[i], len + 1); p += len;
-
- update_hash_entry(provides, buff, p-buff, 0, 0, pkg);
- }
-
- rpmtdFreeData(&td_baseNames);
- rpmtdFreeData(&td_dirNames);
- } else {
- struct rpmtd_s td;
-
- if (headerGet(pkg->h, RPMTAG_OLDFILENAMES, &td, HEADERGET_DEFAULT)) {
- for (i = 0; i < rpmtdCount(&td); i++)
- update_hash_entry(provides, rpmtdNextString(&td), 0, 0, 0, pkg);
-
- rpmtdFreeData(&td);
- }
- }
- }
-
diff --git a/xs2.xs b/xs2.xs
deleted file mode 100644
index 1f281ca..0000000
--- a/xs2.xs
+++ /dev/null
@@ -1,28 +0,0 @@
-static void
-update_obsoletes(const URPM__Package pkg, HV *obsoletes) {
- if (pkg->h) {
- struct rpmtd_s td;
-
- /* update all provides */
- if (headerGet(pkg->h, RPMTAG_OBSOLETENAME, &td, HEADERGET_DEFAULT)) {
- unsigned int i;
- for (i = 0; i < rpmtdCount(&td); ++i)
- update_hash_entry(obsoletes, rpmtdNextString(&td), 0, 1, 0, pkg);
- }
- } else {
- char *ps, *s;
-
- if ((s = pkg->obsoletes) != NULL && *s != 0) {
- char *es;
-
- ps = strchr(s, '@');
- while(ps != NULL) {
- *ps = 0; es = strchr(s, '['); if (!es) es = strchr(s, ' '); *ps = '@';
- update_hash_entry(obsoletes, s, es != NULL ? es-s : ps-s, 1, 0, pkg);
- s = ps + 1; ps = strchr(s, '@');
- }
- es = strchr(s, '['); if (!es) es = strchr(s, ' ');
- update_hash_entry(obsoletes, s, es != NULL ? es-s : 0, 1, 0, pkg);
- }
- }
-