Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 444122 - sys-apps/less - lesspipe.sh should run `lzip -dc' not `lzip -c'
Summary: sys-apps/less - lesspipe.sh should run `lzip -dc' not `lzip -c'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-21 05:55 UTC by Vincent Tai
Modified: 2012-11-22 04:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
current default /usr/bin/lesspipe from sys-apps/less-456 (lesspipe,7.21 KB, text/plain)
2012-11-21 05:55 UTC, Vincent Tai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Tai 2012-11-21 05:55:48 UTC
Created attachment 330104 [details]
current default /usr/bin/lesspipe from sys-apps/less-456

The file /usr/bin/lesspipe (installed with sys-apps/less) contains the following by default on lines 12-21:

guesscompress() {
        case "$1" in
                *.gz|*.z)   echo "gunzip -c" ;;
                *.bz2|*.bz) echo "bunzip2 -c" ;;
                *.lz)       echo "lzip -c" ;;
                *.lzma)     echo "unlzma -c" ;;
                *.xz)       echo "xzdec" ;;
                *)          echo "cat" ;;
        esac
}

The correct command for decompressing *.lz files to stdout is "lzip -dc"; "lzip -c" compresses to stdout, which is the opposite of what we want to happen.

Also, on line 246, "preproccess" is a typo.
Comment 1 SpanKY gentoo-dev 2012-11-22 04:20:21 UTC
should be all set now in the tree; thanks for the report!

Commit message: Pass the -d flag to lzip for .lz files
http://sources.gentoo.org/sys-apps/less/files/lesspipe.sh?r1=1.48&r2=1.49