Summary: | Cannot unpack 7z archives | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Paul Bredbury <brebs> |
Component: | Core - Ebuild Support | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | Keywords: | InVCS |
Priority: | High | ||
Version: | 2.1 | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://sourceforge.net/project/showfiles.php?group_id=117445&package_id=130270 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 115839 | ||
Attachments: |
ebuild.sh.diff
ezquake-1517.ebuild capture stdout and dump it to stderr if an error occurs ebuild.sh.diff capture stdout and dump it to stderr if an error occurs |
Description
Paul Bredbury
2006-06-01 03:54:10 UTC
Created attachment 88075 [details, diff]
ebuild.sh.diff
Created attachment 88078 [details] ezquake-1517.ebuild Here is an example ebuild to unpack a 7z file, using the above patch. A failed request for a "quiet" option in 7z is at: http://sourceforge.net/forum/forum.php?thread_id=1270756&forum_id=383044 Created attachment 88083 [details, diff]
capture stdout and dump it to stderr if an error occurs
That silly 7z program outputs to stdout instead of stderr when it exits with an error! Anyway, this patch should do the trick.
We will not add a p7zip dependency to portage itself so it's the ebuild maintainer's responsibility to add DEPEND="app-arch/p7zip" to any ebuild that needs to unpack a 7z file.
Are there any complaints about this patch or shall we commit it?
Created attachment 88089 [details, diff]
ebuild.sh.diff
The "my_output=" always returns zero, even when 7z returns 2 when I tested it on a deliberately-corrupted archive.
The enclosed patch makes the first run silent, and then runs it again visibly if there was an error. I suppose this is the best compromise.
Created attachment 88091 [details, diff] capture stdout and dump it to stderr if an error occurs (In reply to comment #4) > The "my_output=" always returns zero, even when 7z returns 2 when I tested it > on a deliberately-corrupted archive. Whoops. Actually, it's the "local" builtin that always returns zero. This updated patch fixes it by declaring the variable on a separate line. Your patch works great - please commit. Thanks, this is in svn r3447. This has been released in 2.1_rc3-r5. |