Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 413847 - unpacker.eclass mishandles bzip2 files if PORTAGE_BZIP2_COMMAND is unset
Summary: unpacker.eclass mishandles bzip2 files if PORTAGE_BZIP2_COMMAND is unset
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-04-28 10:28 UTC by David Leverton
Modified: 2012-04-29 00:15 UTC (History)
1 user (show)

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


Attachments
unpacker.eclass.patch (unpacker.eclass.patch,572 bytes, text/plain)
2012-04-28 10:28 UTC, David Leverton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Leverton 2012-04-28 10:28:30 UTC
Created attachment 310331 [details]
unpacker.eclass.patch

unpacker.eclass has two issues with handling bzip2 files when PORTAGE_BZIP2_COMMAND is not set:

1) It falls back to "$(type -P pbzip2 || bzip2)", which should have another "type -P" in it - otherwise it hangs indefinitely with bzip2 waiting for input.
2) If PORTAGE_BUNZIP2_COMMAND is also unset, the definition of bzuncmd then ignores the fallback that was performed on the previous line and uses ${PORTAGE_BZIP2_COMMAND} directly, so when the latter isn't set it tries to use "-d" on its own as the decompression command.

The attached patch should fix both.
Comment 1 SpanKY gentoo-dev 2012-04-29 00:15:16 UTC
merged; thanks!

http://sources.gentoo.org/eclass/unpacker.eclass?r1=1.7&r2=1.8