Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308855 - lesspipe.sh included in sys-apps/less does not understand .tbz files
Summary: lesspipe.sh included in sys-apps/less does not understand .tbz files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-10 17:33 UTC by Jack Lloyd
Modified: 2010-03-23 20:54 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Lloyd 2010-03-10 17:33:46 UTC
This was almost fixed in #303433, but it doesn't handle '.tbz', only '.tbz2', because after lesspipe rewrites the name to recurse the call to lesspipe, 'foo.tbz' ends up as 'foo.tbz.tar.bz', which doesn't match anything in the switch. Here's the fix:

$ diff -u /usr/portage/sys-apps/less/files/lesspipe.sh /usr/bin/lesspipe.sh 
--- /usr/portage/sys-apps/less/files/lesspipe.sh        2010-02-14 12:36:54.000000000 -0500
+++ /usr/bin/lesspipe.sh        2010-03-10 12:28:37.011373256 -0500
@@ -103,7 +103,7 @@
 
        ### Tar files ###
        *.tar|\
-       *.tar.bz2|*.tar.gz|*.tar.z|\
+       *.tar.bz2|*.tar.bz|*.tar.gz|*.tar.z|\
        *.tar.lz|*.tar.tlz|\
        *.tar.lzma|*.tar.xz)
                ${DECOMPRESSOR} -- "$1" | tar tvvf -;;


Reproducible: Always

Steps to Reproduce:
1. Create a tar/bzip2 file ending with .tbz
2. Try to less it

Actual Results:  
"foo.tbz" may be a binary file.  See it anyway? 

Expected Results:  
Output equivalent to tar -tvjf foo.tbz