First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 184774
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Portage team <dev-portage@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Mike Auty <ikelos@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 184774 depends on: Show dependency tree
Bug 184774 blocks: 181949 187293
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-07-09 20:56 0000
I was just writing a little ebuild for an ancient tool that's packed up as a
.lzh.

I installed lha-114i-r6 and tried letting portage's unpack function handle it. 
I was amazed that it tried, but it produced:

>>> Unpacking msbklin.lzh to /var/tmp/portage/app-arch/ntbkup-1.07/work
lha: invalid option -- q
usage: lha [-]<commands>[<options>] [-<options> ...] archive_file [file...]
  commands:  [axelvudmcpt]
  options:   [q[012]vnfto[567]dizg012e[w=<dir>|x=<pattern>]]
  long options: --system-kanji-code={euc,sjis,utf8,cap}
                --archive-kanji-code={euc,sjis,utf8,cap}
                --extract-broken-archive
                --help
                --version
 * 
 * ERROR: app-arch/ntbkup-1.07 failed.
 * Call stack:
 *   ebuild.sh, line 1647:   Called dyn_unpack
 *   ebuild.sh, line 768:   Called qa_call 'src_unpack'
 *   ebuild.sh, line 44:   Called src_unpack
 *   ebuild.sh, line 654:   Called unpack 'msbklin.lzh'
 *   ebuild.sh, line 461:   Called die
 * 
 * failure unpacking msbklin.lzh
 * If you need support, post the topmost build error, and the call stack if
relevant.
 * A complete build log is located at
'/var/tmp/portage/app-arch/ntbkup-1.07/temp/build.log'.
 * This ebuild is from an overlay: '/usr/local/overlays/shc-tools/'
 * 

which I then tracked down to the line in /usr/lib/portage/bin/ebuild.sh:

lha xqf "${srcdir}/${x}" || die "$myfail"

I tried several different variations, and it seems the q and f don't go so well
right next to each other.  I ended up with:

lha x -q -f "${srcdir}/${x}" || die "$myfail"

which seems to work fine.

------- Comment #1 From Paul Bredbury 2007-07-09 21:56:24 0000 -------
See bug #159100, which has an ebuild for Debian's lha.

------- Comment #2 From SpanKY 2007-07-09 22:09:06 0000 -------
the lha command used to work (it did when i added it), so lha is broken here

*** This bug has been marked as a duplicate of bug 159100 ***

------- Comment #3 From John R. Graham 2007-07-22 14:44:25 0000 -------
This does not appear to be a duplicate of bug #159100.  According to the
built-in help for lha, the q option takes an optional parameter, which seems to
be a "required" parameter if more options follow.  You can see it right in the
output from post #1.  The command line that works is:

    lha xq2f some_file_name

or even

    lha xfq some_file_name


Perhaps the command line parser needs to be made smarter, but this is
definitely not related to the "unable to extract quake files" bug.  Should this
bug be reopened as a "fix the command line parser" bug?  Or, should it just
left alone since it actually appears to be behaving as designed?

- John

------- Comment #4 From Zac Medico 2007-07-22 20:57:45 0000 -------
I've changed it to xfq.

------- Comment #5 From Mike Auty 2007-07-22 21:00:15 0000 -------
I'm not certain that will work as expected because the -f option will expect
the filename, rather than a q immediately after it...

I'd either explicitly specify a quiet level (like xq2f), or split the arguments
as in comment 1:

lha x -q -f "${srcdir}/${x}" || die "$myfail"

------- Comment #6 From Zac Medico 2007-07-22 21:18:28 0000 -------
xfq works because according to --help f really means "force (over write at
extract)".  I chose xfq in hopes that it wouldn't trigger any backward
compatibility problems with older versions of lha that apparently accepted xqf
(probably not an issue since we only have one version in the tree now). 

------- Comment #7 From Mike Auty 2007-07-22 21:23:59 0000 -------
You're entirely right, I'm sorry.  Serves me right for relying on my own
memory!  I do apologize...  5:(

------- Comment #8 From Zac Medico 2007-07-22 22:54:37 0000 -------
This has been released in 2.1.3_rc9.

------- Comment #9 From John R. Graham 2007-07-23 11:11:36 0000 -------
(In reply to comment #2)
> the lha command used to work (it did when i added it), so lha is broken here
> 
> *** This bug has been marked as a duplicate of bug 159100 ***
> 

SpanKY's right, by the way.  Between lha-114i-r5 and lha-114i-r6, the command
line parser became more strict.  It *did* used to work.

- John

First Last Prev Next    No search results available      Search page      Enter new bug