lha-sjisでオプション"q"がエラーになる

Bug #710741 reported by Shinichiro Tsuduki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Japanese Kaizen Project
Triaged
Low
Unassigned

Bug Description

古いシェルスクリプトを動かしたら lha で以下のエラーがでました。

$ lha xfqw=hoge hoge.lzh
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

hogeディレクトリは作成済み、qオプションは man lha で以下の様にでます。

 q<num> 表示の抑制。 対話的なメッセージの表示を抑制します。 <num> の値に
       よって、INDICATOR の表示方法を変更できます。
          q0 oo.... の表示を行なう。
          q1 ファイル名表示のみ行なう。
          q2 何も表示しない。
       なお、値を入力しなかった際には、q2 と同等になります。

lha, system のバージョン
$ lha --version
LHa for UNIX version 1.14i-ac20050924p1 (x86_64-unknown-linux-gnu)
$ uname -a
Linux xxxxxx 2.6.32-27-generic #49-Ubuntu SMP Thu Dec 2 00:51:09 UTC 2010 x86_64 GNU/Linux

その後、SourceForge.JP > LHa for UNIX の git リポジトリを clone してビルドした所
エラーにならなかったので、ログを調べてみると結果としてバグだったようです。
オプション解析を(src/getopt_long.c)に分離した時に作り込まれたバグで、2008年03
月05日に修正されていました。
以下、オプション解析処理(src/getopt_long.c)のコミットログ(空行削除)です。

commit 8a7d8661a8ed666381666578cbf95c9b1af2a55b
Author: arai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Date: Wed Mar 5 22:23:34 2008 +0000
should treat "-ab" as "-a -b" for shortopts="-a[0123]b".
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/lha/lha/trunk@886 6a8cc165-1e22-0410-a132-eb4e3f353aba

commit 88a97d9e2be4310054b26dfb3746fbd47b114ea0
Author: arai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Date: Tue Sep 28 17:06:39 2004 +0000
* src/lharc.c (parse_option, parse_suboption): use getopt_long().
* src/Makefile.am: added getopt_long.c and getopt_long.h.
* src/getopt_long.c, src/getopt_long.h: newly added.
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/lha/lha/trunk@807 6a8cc165-1e22-0410-a132-eb4e3f353aba

Nobuto Murata (nobuto)
Changed in ubuntu-jp-improvement:
importance: Undecided → Low
status: New → Triaged
summary: - lha-sjisでオウション"q"がエラーになる
+ lha-sjisでオプション"q"がエラーになる
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.