aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--URPM.xs62
1 files changed, 0 insertions, 62 deletions
diff --git a/URPM.xs b/URPM.xs
index 48fb232..b4c6e67 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1225,68 +1225,6 @@ parse_line(AV *depslist, HV *provides, HV *obsoletes, URPM__Package pkg, char *b
}
}
-#if 0
-/*
- * this code is unused since August 2007 and hasn't work since MDK8.1 and rpm 4 (2001!!!).
- */
-static void pack_rpm_header(Header *h) {
- Header packed = headerNew();
-
- HeaderIterator hi = headerInitIterator(*h);
- struct rpmtd_s td;
- while (headerNext(hi, &td)) {
- // fprintf(stderr, "adding %s %d\n", tagname(tag), c);
- headerPut(packed, &td, HEADERPUT_DEFAULT);
- rpmtdFreeData(&td);
- }
-
- headerFreeIterator(hi);
- *h = headerFree(*h);
-
- *h = packed;
-}
-
-static void drop_tags(Header *h) {
- headerDel(*h, RPMTAG_FILEUSERNAME); /* user ownership is correct */
- headerDel(*h, RPMTAG_FILEGROUPNAME); /* group ownership is correct */
- headerDel(*h, RPMTAG_FILEMTIMES); /* correct time without it */
- headerDel(*h, RPMTAG_FILEINODES); /* hardlinks work without it */
- headerDel(*h, RPMTAG_FILEDEVICES); /* it is the same number for every file */
- headerDel(*h, RPMTAG_FILESIZES); /* ? */
- headerDel(*h, RPMTAG_FILERDEVS); /* it seems unused. always empty */
- headerDel(*h, RPMTAG_FILEVERIFYFLAGS); /* only used for -V */
- headerDel(*h, RPMTAG_FILEDIGESTALGOS); /* only used for -V */
- headerDel(*h, RPMTAG_FILEDIGESTS); /* only used for -V */ /* alias: RPMTAG_FILEMD5S */
- /* keep RPMTAG_FILEFLAGS for %config (rpmnew) to work */
- /* keep RPMTAG_FILELANGS for %lang (_install_langs) to work */
- /* keep RPMTAG_FILELINKTOS for checking conflicts between symlinks */
- /* keep RPMTAG_FILEMODES otherwise it segfaults with excludepath */
-
- /* keep RPMTAG_POSTIN RPMTAG_POSTUN RPMTAG_PREIN RPMTAG_PREUN */
- /* keep RPMTAG_TRIGGERSCRIPTS RPMTAG_TRIGGERVERSION RPMTAG_TRIGGERFLAGS RPMTAG_TRIGGERNAME */
- /* small enough, and only in some packages. not needed per se */
-
- headerDel(*h, RPMTAG_ICON);
- headerDel(*h, RPMTAG_GIF);
- headerDel(*h, RPMTAG_EXCLUSIVE);
- headerDel(*h, RPMTAG_COOKIE);
- headerDel(*h, RPMTAG_VERIFYSCRIPT);
-
- /* always the same for our packages */
- headerDel(*h, RPMTAG_VENDOR);
- headerDel(*h, RPMTAG_DISTRIBUTION);
-
- /* keep RPMTAG_SIGSIZE, useful to tell the size of the rpm file (+440) */
-
- headerDel(*h, RPMTAG_DSAHEADER);
- headerDel(*h, RPMTAG_SHA1HEADER);
- headerDel(*h, RPMTAG_SIGMD5);
- headerDel(*h, RPMTAG_SIGGPG);
-
- pack_rpm_header(h);
-}
-#endif
-
static int
update_header(char *filename, URPM__Package pkg, __attribute__((unused)) int keep_all_tags, int vsflags) {
int d = open(filename, O_RDONLY);