Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#639239: refuses to unpack files without .xz suffix

374 views
Skip to first unread message

Daniel Baumann

unread,
Aug 25, 2011, 5:20:03 AM8/25/11
to
Package: xz-utils
Version: 5.0.0-2

xz refuses to unpack files that do not end with .xz suffix, which is
plain stupid.

daniel@daniel-desktop:~/Downloads$ file binN4AC1CEQIn.bin
binN4AC1CEQIn.bin: XZ compressed data
daniel@daniel-desktop:~/Downloads$ xz --decompress binN4AC1CEQIn.bin
xz: binN4AC1CEQIn.bin: Filename has an unknown suffix, skipping
daniel@daniel-desktop:~/Downloads$ mv binN4AC1CEQIn.bin binN4AC1CEQIn.bin.xz
daniel@daniel-desktop:~/Downloads$ xz --decompress binN4AC1CEQIn.bin.xz
daniel@daniel-desktop:~/Downloads$

--
Address: Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email: daniel....@progress-technologies.net
Internet: http://people.progress-technologies.net/~daniel.baumann/

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Jonathan Nieder

unread,
Aug 25, 2011, 5:30:01 AM8/25/11
to
Hi Daniel,

Daniel Baumann wrote:

> xz refuses to unpack files that do not end with .xz suffix, which is plain
> stupid.

I don't think it's stupid.

$ gzip foo.c
$ mv foo.c.gz foo.bin
$ gzip -d foo.bin
gzip: foo.bin: unknown suffix -- ignored
$ gzip -dc foo.bin
hello, world

Is there some reason "xz -dc" does not work for you?

Daniel Baumann

unread,
Aug 25, 2011, 7:30:01 AM8/25/11
to
On 08/25/2011 11:21 AM, Jonathan Nieder wrote:
> I don't think it's stupid.
>
> $ gzip foo.c
> $ mv foo.c.gz foo.bin
> $ gzip -d foo.bin
> gzip: foo.bin: unknown suffix -- ignored
> $ gzip -dc foo.bin
> hello, world

just because gzip is as stupid doesn't make xz any less.

> Is there some reason "xz -dc" does not work for you?

obviously i do not want to decompress to stdout (nor to redirect into a
file), i just want to decompress.

--
Address: Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email: daniel....@progress-technologies.net
Internet: http://people.progress-technologies.net/~daniel.baumann/

--

Jonathan Nieder

unread,
Aug 25, 2011, 7:50:01 AM8/25/11
to
severity 639239 wishlist
quit

Daniel Baumann wrote:
> On 08/25/2011 11:21 AM, Jonathan Nieder wrote:

>> Is there some reason "xz -dc" does not work for you?
>
> obviously i do not want to decompress to stdout (nor to redirect into a
> file), i just want to decompress.

It was not obvious to me. Depending on your preferred name for the
decompressed file, you have at least two choices:

- use -S.bin to use .bin as the suffix to strip, instead of .xz

- implement a --output=<path> option and send a patch to
xz-d...@tukaani.org (subscription required[1]). The patch
description can explain why "xz -dc infile >outfile" is not good
enough and how it works in the case infile=outfile.

Hope that helps, though I'm not sure what I'm adding here that the man
page does not provide. I'm glad to hear you're finding xz useful to
at least decompress a file or two. :)

Cheers,
Jonathan

[1] http://tukaani.org/xz/lists.html

0 new messages