]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- when repackaging if lzma is not installed use gzip
authorwitekfl <witekfl@pld-linux.org>
Mon, 25 Sep 2006 18:05:51 +0000 (18:05 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- digest of signature is bad, so one must install or uninstall
  repackaged packages using --nodigest

Changed files:
    rpm-repackage-wo-lzma.patch -> 1.1

rpm-repackage-wo-lzma.patch [new file with mode: 0644]

diff --git a/rpm-repackage-wo-lzma.patch b/rpm-repackage-wo-lzma.patch
new file mode 100644 (file)
index 0000000..5daf06b
--- /dev/null
@@ -0,0 +1,42 @@
+--- rpm-4.4.6/lib/psm.c.old    2006-09-25 17:55:05.000000000 +0200
++++ rpm-4.4.6/lib/psm.c        2006-09-25 19:40:47.000000000 +0200
+@@ -6,6 +6,7 @@
+ #include "system.h"
+ #include <rpmio_internal.h>
++#include <header_internal.h>
+ #include <rpmlib.h>
+ #include <rpmmacro.h>
+ #include <rpmurl.h>
+@@ -1403,6 +1404,19 @@
+     return rpmpsmStage(psm, psm->nstage);
+ }
++static void replace_lzma_with_gzip(Header h)
++{
++    indexEntry entry;
++    int i;
++
++    for (i = 0, entry = h->index; i < h->indexUsed; i++, entry++) {
++      if (entry->info.tag == RPMTAG_PAYLOADCOMPRESSOR) {
++          memcpy(entry->data, "gzip", 4);
++          break;
++      }
++    }
++}
++
+ /**
+  * @todo Packages w/o files never get a callback, hence don't get displayed
+  * on install with -v.
+@@ -2151,6 +2165,11 @@
+           payload_compressor = "gzip";
+       /*@=branchstate@*/
+       psm->rpmio_flags = t = xmalloc(sizeof("w9.gzdio"));
++      if (psm->goal == PSM_PKGSAVE && !strcmp(payload_compressor, "lzma") && access("/usr/bin/lzma", X_OK)) {
++          /* FIXME: digest is bad. */
++          payload_compressor = "gzip";
++          replace_lzma_with_gzip(psm->oh);
++      }
+       *t = '\0';
+       t = stpcpy(t, ((psm->goal == PSM_PKGSAVE) ? "w9" : "r"));
+       if (!strcmp(payload_compressor, "gzip"))
This page took 0.033742 seconds and 4 git commands to generate.