Re: [kernel.org users] XZ Migration discussion

From: Petri Kaukasoina
Date: Wed Feb 17 2010 - 05:40:15 EST


On Wed, Feb 17, 2010 at 06:40:47AM +0100, Willy Tarreau wrote:
> On Mon, Feb 15, 2010 at 04:31:59PM -0500, James Cloos wrote:
> > >>>>> "W" == Willy Tarreau <w@xxxxxx> writes:
> >
> > W> Well, I personally like to be able to simply run "less patch-2.6.27.45.gz"
> > W> and have it transparently uncompressed and dumped on my terminal. It
> > W> doesn't do that on bz2. We could find multiple examples.
> >
> > It does here, and lzma & xz, too. And has since just days after Lasse
> > annouced that the new name would be xz.
> >
> > Your LESSOPEN controls that, and can be easily coded to support any archive.
>
> Just checked and I found it funny to see that patch-2.6.1.bz2 is not
> correctly opened while 2.6.27.45.bz2 is.


There is a bug in lesspipe.sh, at least here. It confuses it with compresses
man pages.

--- lesspipe.sh~ 2009-11-06 02:14:58.000000000 +0200
+++ lesspipe.sh 2010-02-17 12:19:09.000000000 +0200
@@ -50,6 +50,7 @@

*.1.bz2|*.2.bz2|*.3.bz2|*.4.bz2|*.5.bz2|*.6.bz2|*.7.bz2|*.8.bz2|*.9.bz2|*.n.bz2|*.man.bz2)
# compressed *roff src?
if bzip2 -dc "$1" | file - | grep roff 1> /dev/null ; then
bzip2 -dc "$1" | nroff -S -mandoc -
+ else bzip2 -dc "$1" 2>/dev/null
fi ;;
*.gz) gzip -dc "$1" 2>/dev/null ;;
*.bz2) bzip2 -dc "$1" 2>/dev/null ;;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/