Re: tar -J to extract xz archives
On 05/30/12 07:53, Landry Breuil wrote: On Tue, May 29, 2012 at 09:19:49PM -0400, Ted Unangst wrote: On Tue, May 29, 2012 at 17:46, Gabriel Linder wrote: I see more and more tar.xz archives, and thought it would be nice to have tar able to extract them directly as with gzip/bzip2. -J is what GNU and FreeBSD use, so I used it too. Based on what was done to add bzip2 support. So I never quite finished it in time before the -j patch went in, but I think tar should just auto detect the compression and use the right program. It requires reading about two bytes out of the stream. It's a little tricky if the data is piped in, but I don't think it's intractable. So -z would just always do the right thing. I think that's a better way to do it. Not an argument per se, but gtar uses -a/--auto-compress for that mode. And it even see to be default if no compression scheme is specified, ie 'gtar tf' and 'gtar xf' do the right thing (tm). See http://petereisentraut.blogspot.com/2012/05/time-to-retrain-fingers.html and the associated comments.. Landry That would be nice, I think. FreeBSD version seem able to do that too, from their manpage.
Re: tar -J to extract xz archives
Gabriel Linder writes: I see more and more tar.xz archives, and thought it would be nice to have tar able to extract them directly as with gzip/bzip2. -J is what GNU and FreeBSD use, so I used it too. Based on what was done to add bzip2 support. This has been discussed on the list before. I think the conclusion was that xz won't make it into base, and adding new tar flags for stuff not in base is a bad idea (although we already have -j for bzip2). -- Anthony J. Bentley
Re: tar -J to extract xz archives
On Tue, May 29, 2012 at 12:12:21PM -0600, Anthony J. Bentley wrote: Gabriel Linder writes: I see more and more tar.xz archives, and thought it would be nice to have tar able to extract them directly as with gzip/bzip2. -J is what GNU and FreeBSD use, so I used it too. Based on what was done to add bzip2 support. This has been discussed on the list before. I think the conclusion was that xz won't make it into base, and adding new tar flags for stuff not in base is a bad idea (although we already have -j for bzip2). -- Anthony J. Bentley xz has the added problem that it's totally C99 source, so it won't compile with vax/sparc...
Re: tar -J to extract xz archives
On Tue, May 29, 2012 at 09:19:49PM -0400, Ted Unangst wrote: On Tue, May 29, 2012 at 17:46, Gabriel Linder wrote: I see more and more tar.xz archives, and thought it would be nice to have tar able to extract them directly as with gzip/bzip2. -J is what GNU and FreeBSD use, so I used it too. Based on what was done to add bzip2 support. So I never quite finished it in time before the -j patch went in, but I think tar should just auto detect the compression and use the right program. It requires reading about two bytes out of the stream. It's a little tricky if the data is piped in, but I don't think it's intractable. So -z would just always do the right thing. I think that's a better way to do it. Not an argument per se, but gtar uses -a/--auto-compress for that mode. And it even see to be default if no compression scheme is specified, ie 'gtar tf' and 'gtar xf' do the right thing (tm). See http://petereisentraut.blogspot.com/2012/05/time-to-retrain-fingers.html and the associated comments.. Landry