SOURCES: rpm-bzip2_fallback.patch (NEW) - use bzip2 when lzma is n...

witekfl witekfl at pld-linux.org
Fri Sep 8 20:41:27 CEST 2006


Author: witekfl                      Date: Fri Sep  8 18:41:27 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use bzip2 when lzma is not installed

---- Files affected:
SOURCES:
   rpm-bzip2_fallback.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/rpm-bzip2_fallback.patch
diff -u /dev/null SOURCES/rpm-bzip2_fallback.patch:1.1
--- /dev/null	Fri Sep  8 20:41:27 2006
+++ SOURCES/rpm-bzip2_fallback.patch	Fri Sep  8 20:41:22 2006
@@ -0,0 +1,16 @@
+--- rpm-4.4.6/build/pack.c.old	2006-09-08 20:06:51.000000000 +0200
++++ rpm-4.4.6/build/pack.c	2006-09-08 20:12:46.000000000 +0200
+@@ -557,6 +557,13 @@
+ 	payload_format = _free(payload_format);
+ 	payload_format = xstrdup("cpio");
+     }
++    /* Fallback to bzip2 when lzma is not installed. */
++    if (rpmio_flags && !strcmp(rpmio_flags, "w9.lzdio")) {
++	if (access("/usr/bin/lzma", X_OK)) {
++	    rpmio_flags = _free(rpmio_flags);
++	    rpmio_flags = xstrdup("w9.bzdio");
++	}
++    }
+     if (!(rpmio_flags && *rpmio_flags)) {
+ 	rpmio_flags = _free(rpmio_flags);
+ 	rpmio_flags = xstrdup("w9.gzdio");
================================================================


More information about the pld-cvs-commit mailing list