From: Michihiro NAKAJIMA Date: Sun, 14 Oct 2012 05:08:46 +0000 (+0900) Subject: Switch an external program for lzma decompression from "unlzma" to X-Git-Tag: v3.1.0~40^2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d857349722b642d2561238ebc5883e83eae161a2;p=thirdparty%2Flibarchive.git Switch an external program for lzma decompression from "unlzma" to "lzma -d". --- diff --git a/cpio/test/main.c b/cpio/test/main.c index 889847ed7..4b7cfe4e7 100644 --- a/cpio/test/main.c +++ b/cpio/test/main.c @@ -1918,15 +1918,15 @@ canLzip(void) } /* - * Can this platform run the unlzma program? + * Can this platform run the lzma program? */ int -canUnlzma(void) +canLzma(void) { static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("unlzma -V %s", redirectArgs) == 0) + if (systemf("lzma -V %s", redirectArgs) == 0) value = 1; } return (value); diff --git a/cpio/test/test.h b/cpio/test/test.h index 823d65414..6fc11d8c9 100644 --- a/cpio/test/test.h +++ b/cpio/test/test.h @@ -281,8 +281,8 @@ int canLrzip(void); /* Return true if this platform can run the "lzip" program. */ int canLzip(void); -/* Return true if this platform can run the "unlzma" program. */ -int canUnlzma(void); +/* Return true if this platform can run the "lzma" program. */ +int canLzma(void); /* Return true if this platform can run the "lzop" program. */ int canLzop(void); diff --git a/cpio/test/test_extract_cpio_lzma.c b/cpio/test/test_extract_cpio_lzma.c index b90e35b98..ae630d611 100644 --- a/cpio/test/test_extract_cpio_lzma.c +++ b/cpio/test/test_extract_cpio_lzma.c @@ -32,7 +32,7 @@ DEFINE_TEST(test_extract_cpio_lzma) extract_reference_file(reffile); f = systemf("%s -it < %s >test.out 2>test.err", testprog, reffile); - if (f == 0 || canUnlzma()) { + if (f == 0 || canLzma()) { assertEqualInt(0, systemf("%s -i < %s >test.out 2>test.err", testprog, reffile)); diff --git a/libarchive/archive_read_support_filter_xz.c b/libarchive/archive_read_support_filter_xz.c index fa6ae3fb7..2ba2338c6 100644 --- a/libarchive/archive_read_support_filter_xz.c +++ b/libarchive/archive_read_support_filter_xz.c @@ -180,7 +180,7 @@ archive_read_support_filter_lzma(struct archive *_a) return (ARCHIVE_OK); #else archive_set_error(_a, ARCHIVE_ERRNO_MISC, - "Using external unlzma program for lzma decompression"); + "Using external lzma program for lzma decompression"); return (ARCHIVE_WARN); #endif } @@ -941,7 +941,7 @@ lzma_bidder_init(struct archive_read_filter *self) { int r; - r = __archive_read_program(self, "unlzma"); + r = __archive_read_program(self, "lzma -d"); /* Note: We set the format here even if __archive_read_program() * above fails. We do, after all, know what the format is * even if we weren't able to read it. */ diff --git a/libarchive/test/main.c b/libarchive/test/main.c index de988c0df..c308f3cd7 100644 --- a/libarchive/test/main.c +++ b/libarchive/test/main.c @@ -1916,15 +1916,15 @@ canLzip(void) } /* - * Can this platform run the unlzma program? + * Can this platform run the lzma program? */ int -canUnlzma(void) +canLzma(void) { static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("unlzma -V %s", redirectArgs) == 0) + if (systemf("lzma -V %s", redirectArgs) == 0) value = 1; } return (value); diff --git a/libarchive/test/test.h b/libarchive/test/test.h index 9c6d7e6c6..9a208fd3f 100644 --- a/libarchive/test/test.h +++ b/libarchive/test/test.h @@ -281,8 +281,8 @@ int canLrzip(void); /* Return true if this platform can run the "lzip" program. */ int canLzip(void); -/* Return true if this platform can run the "unlzma" program. */ -int canUnlzma(void); +/* Return true if this platform can run the "lzma" program. */ +int canLzma(void); /* Return true if this platform can run the "lzop" program. */ int canLzop(void); diff --git a/tar/test/main.c b/tar/test/main.c index e0b15dc73..7ac577641 100644 --- a/tar/test/main.c +++ b/tar/test/main.c @@ -1918,15 +1918,15 @@ canLzip(void) } /* - * Can this platform run the unlzma program? + * Can this platform run the lzma program? */ int -canUnlzma(void) +canLzma(void) { static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("unlzma -V %s", redirectArgs) == 0) + if (systemf("lzma -V %s", redirectArgs) == 0) value = 1; } return (value); diff --git a/tar/test/test.h b/tar/test/test.h index d5a55cfb1..1d910c6f2 100644 --- a/tar/test/test.h +++ b/tar/test/test.h @@ -283,8 +283,8 @@ int canLrzip(void); /* Return true if this platform can run the "lzip" program. */ int canLzip(void); -/* Return true if this platform can run the "unlzma" program. */ -int canUnlzma(void); +/* Return true if this platform can run the "lzma" program. */ +int canLzma(void); /* Return true if this platform can run the "lzop" program. */ int canLzop(void); diff --git a/tar/test/test_extract_tar_lzma.c b/tar/test/test_extract_tar_lzma.c index 977f6d69e..2fa2af049 100644 --- a/tar/test/test_extract_tar_lzma.c +++ b/tar/test/test_extract_tar_lzma.c @@ -32,7 +32,7 @@ DEFINE_TEST(test_extract_tar_lzma) extract_reference_file(reffile); f = systemf("%s -tf %s >test.out 2>test.err", testprog, reffile); - if (f == 0 || canUnlzma()) { + if (f == 0 || canLzma()) { assertEqualInt(0, systemf("%s -xf %s >test.out 2>test.err", testprog, reffile));