From 10da83320fb8a18996d44ba235f610d814a5874f Mon Sep 17 00:00:00 2001 From: Michihiro NAKAJIMA Date: Sun, 14 Oct 2012 14:17:07 +0900 Subject: [PATCH] Switch an external program for xz decompression from "unxz" to "xz -d". --- cpio/test/main.c | 6 +++--- cpio/test/test.h | 4 ++-- cpio/test/test_extract_cpio_xz.c | 2 +- libarchive/archive_read_support_filter_xz.c | 4 ++-- libarchive/test/main.c | 6 +++--- libarchive/test/test.h | 4 ++-- tar/test/main.c | 6 +++--- tar/test/test.h | 4 ++-- tar/test/test_extract_tar_xz.c | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/cpio/test/main.c b/cpio/test/main.c index 4b7cfe4e7..87e925534 100644 --- a/cpio/test/main.c +++ b/cpio/test/main.c @@ -1948,15 +1948,15 @@ canLzop(void) } /* - * Can this platform run the unxz program? + * Can this platform run the xz program? */ int -canUnxz(void) +canXz(void) { static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("unxz -V %s", redirectArgs) == 0) + if (systemf("xz -V %s", redirectArgs) == 0) value = 1; } return (value); diff --git a/cpio/test/test.h b/cpio/test/test.h index 6fc11d8c9..666bba0e8 100644 --- a/cpio/test/test.h +++ b/cpio/test/test.h @@ -287,8 +287,8 @@ int canLzma(void); /* Return true if this platform can run the "lzop" program. */ int canLzop(void); -/* Return true if this platform can run the "unxz" program. */ -int canUnxz(void); +/* Return true if this platform can run the "xz" program. */ +int canXz(void); /* Return true if this filesystem can handle nodump flags. */ int canNodump(void); diff --git a/cpio/test/test_extract_cpio_xz.c b/cpio/test/test_extract_cpio_xz.c index fd3c13fa5..60f1b5a9d 100644 --- a/cpio/test/test_extract_cpio_xz.c +++ b/cpio/test/test_extract_cpio_xz.c @@ -32,7 +32,7 @@ DEFINE_TEST(test_extract_cpio_xz) extract_reference_file(reffile); f = systemf("%s -it < %s >test.out 2>test.err", testprog, reffile); - if (f == 0 || canUnxz()) { + if (f == 0 || canXz()) { 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 2ba2338c6..95853ade3 100644 --- a/libarchive/archive_read_support_filter_xz.c +++ b/libarchive/archive_read_support_filter_xz.c @@ -144,7 +144,7 @@ archive_read_support_filter_xz(struct archive *_a) return (ARCHIVE_OK); #else archive_set_error(_a, ARCHIVE_ERRNO_MISC, - "Using external unxz program for xz decompression"); + "Using external xz program for xz decompression"); return (ARCHIVE_WARN); #endif } @@ -958,7 +958,7 @@ xz_bidder_init(struct archive_read_filter *self) { int r; - r = __archive_read_program(self, "unxz"); + r = __archive_read_program(self, "xz -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 c308f3cd7..8be2a14e8 100644 --- a/libarchive/test/main.c +++ b/libarchive/test/main.c @@ -1946,15 +1946,15 @@ canLzop(void) } /* - * Can this platform run the unxz program? + * Can this platform run the xz program? */ int -canUnxz(void) +canXz(void) { static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("unxz -V %s", redirectArgs) == 0) + if (systemf("xz -V %s", redirectArgs) == 0) value = 1; } return (value); diff --git a/libarchive/test/test.h b/libarchive/test/test.h index 9a208fd3f..11f173711 100644 --- a/libarchive/test/test.h +++ b/libarchive/test/test.h @@ -287,8 +287,8 @@ int canLzma(void); /* Return true if this platform can run the "lzop" program. */ int canLzop(void); -/* Return true if this platform can run the "unxz" program. */ -int canUnxz(void); +/* Return true if this platform can run the "xz" program. */ +int canXz(void); /* Return true if this filesystem can handle nodump flags. */ int canNodump(void); diff --git a/tar/test/main.c b/tar/test/main.c index 7ac577641..0af128331 100644 --- a/tar/test/main.c +++ b/tar/test/main.c @@ -1948,15 +1948,15 @@ canLzop(void) } /* - * Can this platform run the unxz program? + * Can this platform run the xz program? */ int -canUnxz(void) +canXz(void) { static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("unxz -V %s", redirectArgs) == 0) + if (systemf("xz -V %s", redirectArgs) == 0) value = 1; } return (value); diff --git a/tar/test/test.h b/tar/test/test.h index 1d910c6f2..a0a9bb6f6 100644 --- a/tar/test/test.h +++ b/tar/test/test.h @@ -289,8 +289,8 @@ int canLzma(void); /* Return true if this platform can run the "lzop" program. */ int canLzop(void); -/* Return true if this platform can run the "unxz" program. */ -int canUnxz(void); +/* Return true if this platform can run the "xz" program. */ +int canXz(void); /* Return true if this filesystem can handle nodump flags. */ int canNodump(void); diff --git a/tar/test/test_extract_tar_xz.c b/tar/test/test_extract_tar_xz.c index 2edaf3401..860bab75a 100644 --- a/tar/test/test_extract_tar_xz.c +++ b/tar/test/test_extract_tar_xz.c @@ -32,7 +32,7 @@ DEFINE_TEST(test_extract_tar_xz) extract_reference_file(reffile); f = systemf("%s -tf %s >test.out 2>test.err", testprog, reffile); - if (f == 0 || canUnxz()) { + if (f == 0 || canXz()) { assertEqualInt(0, systemf("%s -xf %s >test.out 2>test.err", testprog, reffile)); -- 2.47.2