GNU bug report logs -
#18531
[PATCH] man: Fix an inverted test that prevented dummy-man from working
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18531 in the body.
You can then email your comments to 18531 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#18531
; Package
coreutils
.
(Mon, 22 Sep 2014 17:57:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Alban Bedel <alban.bedel <at> avionic-design.de>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Mon, 22 Sep 2014 17:57:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The test for the argument count was broken, the upper limit test used
less-or-equal 1 instead of greater than 1.
---
man/dummy-man | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/dummy-man b/man/dummy-man
index bf31912..65b85d5 100755
--- a/man/dummy-man
+++ b/man/dummy-man
@@ -39,7 +39,7 @@ while test $# -gt 0; do
done
test $# -gt 0 || fatal_ "missing argument"
-test $# -le 1 || fatal_ "too many non-option arguments"
+test $# -gt 1 || fatal_ "too many non-option arguments"
baseout=`basename_ "$output"`
sed 's/^/WARNING: /' >&2 <<END
--
2.1.0
Reply sent
to
Pádraig Brady <P <at> draigBrady.com>
:
You have taken responsibility.
(Mon, 22 Sep 2014 20:03:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Alban Bedel <alban.bedel <at> avionic-design.de>
:
bug acknowledged by developer.
(Mon, 22 Sep 2014 20:03:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 18531-done <at> debbugs.gnu.org (full text, mbox):
On 09/22/2014 10:53 AM, Alban Bedel wrote:
> The test for the argument count was broken, the upper limit test used
> less-or-equal 1 instead of greater than 1.
> ---
> man/dummy-man | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man/dummy-man b/man/dummy-man
> index bf31912..65b85d5 100755
> --- a/man/dummy-man
> +++ b/man/dummy-man
> @@ -39,7 +39,7 @@ while test $# -gt 0; do
> done
>
> test $# -gt 0 || fatal_ "missing argument"
> -test $# -le 1 || fatal_ "too many non-option arguments"
> +test $# -gt 1 || fatal_ "too many non-option arguments"
>
> baseout=`basename_ "$output"`
> sed 's/^/WARNING: /' >&2 <<END
Nice one.
I've pushed that at:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=1f994f3
thanks!
Pádraig.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#18531
; Package
coreutils
.
(Mon, 22 Sep 2014 20:12:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 18531 <at> debbugs.gnu.org (full text, mbox):
Pádraig Brady <P <at> draigBrady.com> writes:
> On 09/22/2014 10:53 AM, Alban Bedel wrote:
>> The test for the argument count was broken, the upper limit test used
>> less-or-equal 1 instead of greater than 1.
>> ---
>> man/dummy-man | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/man/dummy-man b/man/dummy-man
>> index bf31912..65b85d5 100755
>> --- a/man/dummy-man
>> +++ b/man/dummy-man
>> @@ -39,7 +39,7 @@ while test $# -gt 0; do
>> done
>>
>> test $# -gt 0 || fatal_ "missing argument"
>> -test $# -le 1 || fatal_ "too many non-option arguments"
>> +test $# -gt 1 || fatal_ "too many non-option arguments"
>>
>> baseout=`basename_ "$output"`
>> sed 's/^/WARNING: /' >&2 <<END
>
> Nice one.
Huh?
$ man/dummy-man foo
man/dummy-man: too many non-option arguments
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#18531
; Package
coreutils
.
(Mon, 22 Sep 2014 21:28:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 18531-done <at> debbugs.gnu.org (full text, mbox):
On 09/22/2014 10:53 AM, Alban Bedel wrote:
> The test for the argument count was broken, the upper limit test used
> less-or-equal 1 instead of greater than 1.
> ---
> man/dummy-man | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man/dummy-man b/man/dummy-man
> index bf31912..65b85d5 100755
> --- a/man/dummy-man
> +++ b/man/dummy-man
> @@ -39,7 +39,7 @@ while test $# -gt 0; do
> done
>
> test $# -gt 0 || fatal_ "missing argument"
> -test $# -le 1 || fatal_ "too many non-option arguments"
> +test $# -gt 1 || fatal_ "too many non-option arguments"
>
> baseout=`basename_ "$output"`
> sed 's/^/WARNING: /' >&2 <<END
Nice one.
I've pushed that at:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=1f994f3
thanks!
Pádraig.
Did not alter fixed versions and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 22 Sep 2014 21:37:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#18531
; Package
coreutils
.
(Mon, 22 Sep 2014 21:43:01 GMT)
Full text and
rfc822 format available.
Message #21 received at 18531 <at> debbugs.gnu.org (full text, mbox):
On 09/22/2014 10:11 PM, Andreas Schwab wrote:
> Pádraig Brady <P <at> draigBrady.com> writes:
>
>> On 09/22/2014 10:53 AM, Alban Bedel wrote:
>>> diff --git a/man/dummy-man b/man/dummy-man
>>> index bf31912..65b85d5 100755
>>> --- a/man/dummy-man
>>> +++ b/man/dummy-man
>>> @@ -39,7 +39,7 @@ while test $# -gt 0; do
>>> done
>>>
>>> test $# -gt 0 || fatal_ "missing argument"
>>> -test $# -le 1 || fatal_ "too many non-option arguments"
>>> +test $# -gt 1 || fatal_ "too many non-option arguments"
>>>
>>> baseout=`basename_ "$output"`
>>> sed 's/^/WARNING: /' >&2 <<END
>>
>> Nice one.
>
> Huh?
>
> $ man/dummy-man foo
> man/dummy-man: too many non-option arguments
>
> Andreas.
>
oops, in commit b3578fc9ffe70b9466687f9f6470a85f1a0ab14f
I added the --info-page=... option _after_ the program argument
in local.mk. The original help2man doesn't have a problem with
that, as it does the normal GNU option parsing, but the parsing
loop in dummy-man stops parsing when it hit the program argument,
thus leaving $# = 2 (and the --info-page option unused).
I'll propose a fix for both the test in dummy-man and local.mk
soon.
Have a nice day,
Berny
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#18531
; Package
coreutils
.
(Mon, 22 Sep 2014 23:54:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 18531 <at> debbugs.gnu.org (full text, mbox):
On 09/22/2014 11:42 PM, Bernhard Voelker wrote:
> On 09/22/2014 10:11 PM, Andreas Schwab wrote:
>> Pádraig Brady <P <at> draigBrady.com> writes:
>>> On 09/22/2014 10:53 AM, Alban Bedel wrote:
>> Huh?
>>
>> $ man/dummy-man foo
>> man/dummy-man: too many non-option arguments
>>
>> Andreas.
>>
>
> oops, in commit b3578fc9ffe70b9466687f9f6470a85f1a0ab14f
> I added the --info-page=... option _after_ the program argument
> in local.mk. The original help2man doesn't have a problem with
> that, as it does the normal GNU option parsing, but the parsing
> loop in dummy-man stops parsing when it hit the program argument,
> thus leaving $# = 2 (and the --info-page option unused).
>
> I'll propose a fix for both the test in dummy-man and local.mk
> soon.
The proper fix for 'dummy-man' would have been to read the program
name argument in the above while loop, checking that such a non-option
argument has only been passed once, and then check the final remaining
argument count again.
I took the easier road, and only fixed the error condition in patch 1,
while patch 2 fixes the caller in local.mk.
Have a nice day,
Berny
From bf2057b20b6c84d792816898dcded905bfdb146f Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail <at> bernhard-voelker.de>
Date: Tue, 23 Sep 2014 01:44:51 +0200
Subject: [PATCH 1/2] build: fix argument count check in dummy-man again
* man/dummy-man: Fix argument count check, now only permitting
exactly 1 argument, the program name.
Reported by Andreas Schwab <schwab <at> linux-m68k.org>
---
man/dummy-man | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/dummy-man b/man/dummy-man
index 65b85d5..bf31912 100755
--- a/man/dummy-man
+++ b/man/dummy-man
@@ -39,7 +39,7 @@ while test $# -gt 0; do
done
test $# -gt 0 || fatal_ "missing argument"
-test $# -gt 1 || fatal_ "too many non-option arguments"
+test $# -le 1 || fatal_ "too many non-option arguments"
baseout=`basename_ "$output"`
sed 's/^/WARNING: /' >&2 <<END
--
1.8.4.5
From d2bcb04400cb00ffd55e7a1d4e5a8e3e7329c062 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail <at> bernhard-voelker.de>
Date: Tue, 23 Sep 2014 01:49:47 +0200
Subject: [PATCH 2/2] build: pass program name to help2man after other options
* man/local.mk (.x.1): Move the program name argument down after
the last option argument when calling $(run_help2man).
While the other way would be accepted for the GNU help2man program,
it is not for the 'dummy-man' script (called as a fallback on
systems lacking perl).
The wrong order was introduced in commit v8.21-119-gb3578fc while
adding the --info-page option.
---
man/local.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/man/local.mk b/man/local.mk
index 61ecd00..24cdce0 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -187,8 +187,9 @@ endif
&& $(run_help2man) \
--source='$(PACKAGE_STRING)' \
--include=$(srcdir)/man/$$name.x \
- --output=$$t/$$name.1 $$t/$$argv \
+ --output=$$t/$$name.1 \
--info-page='\(aq(coreutils) '$$name' invocation\(aq' \
+ $$t/$$argv \
&& sed \
-e 's|$*\.td/||g' \
-e '/For complete documentation/d' \
--
1.8.4.5
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#18531
; Package
coreutils
.
(Tue, 23 Sep 2014 00:56:01 GMT)
Full text and
rfc822 format available.
Message #27 received at 18531 <at> debbugs.gnu.org (full text, mbox):
On 09/23/2014 12:53 AM, Bernhard Voelker wrote:
> On 09/22/2014 11:42 PM, Bernhard Voelker wrote:
>> On 09/22/2014 10:11 PM, Andreas Schwab wrote:
>>> Pádraig Brady <P <at> draigBrady.com> writes:
>>>> On 09/22/2014 10:53 AM, Alban Bedel wrote:
>>> Huh?
>>>
>>> $ man/dummy-man foo
>>> man/dummy-man: too many non-option arguments
>>>
>>> Andreas.
>>>
>>
>> oops, in commit b3578fc9ffe70b9466687f9f6470a85f1a0ab14f
>> I added the --info-page=... option _after_ the program argument
>> in local.mk. The original help2man doesn't have a problem with
>> that, as it does the normal GNU option parsing, but the parsing
>> loop in dummy-man stops parsing when it hit the program argument,
>> thus leaving $# = 2 (and the --info-page option unused).
>>
>> I'll propose a fix for both the test in dummy-man and local.mk
>> soon.
>
> The proper fix for 'dummy-man' would have been to read the program
> name argument in the above while loop, checking that such a non-option
> argument has only been passed once, and then check the final remaining
> argument count again.
> I took the easier road, and only fixed the error condition in patch 1,
> while patch 2 fixes the caller in local.mk.
>
> Have a nice day,
> Berny
>
>
>>From bf2057b20b6c84d792816898dcded905bfdb146f Mon Sep 17 00:00:00 2001
> From: Bernhard Voelker <mail <at> bernhard-voelker.de>
> Date: Tue, 23 Sep 2014 01:44:51 +0200
> Subject: [PATCH 1/2] build: fix argument count check in dummy-man again
>
> * man/dummy-man: Fix argument count check, now only permitting
> exactly 1 argument, the program name.
> Reported by Andreas Schwab <schwab <at> linux-m68k.org>
> ---
> man/dummy-man | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man/dummy-man b/man/dummy-man
> index 65b85d5..bf31912 100755
> --- a/man/dummy-man
> +++ b/man/dummy-man
> @@ -39,7 +39,7 @@ while test $# -gt 0; do
> done
>
> test $# -gt 0 || fatal_ "missing argument"
> -test $# -gt 1 || fatal_ "too many non-option arguments"
> +test $# -le 1 || fatal_ "too many non-option arguments"
>
> baseout=`basename_ "$output"`
> sed 's/^/WARNING: /' >&2 <<END
Oops right. I did check that the patch caused dummy-man to "work"
though that was only accidental. The above two patches are obviously
the correct fix.
thanks,
Pádraig.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#18531
; Package
coreutils
.
(Tue, 23 Sep 2014 07:24:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 18531 <at> debbugs.gnu.org (full text, mbox):
On 09/23/2014 02:54 AM, Pádraig Brady wrote:
> [...]The above two patches are obviously
> the correct fix.
Thanks, pushed.
Have a nice day,
Berny
Added tag(s) fixed.
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 10 Oct 2018 15:54:05 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
18531 <at> debbugs.gnu.org and Alban Bedel <alban.bedel <at> avionic-design.de>
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 10 Oct 2018 15:54:05 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 08 Nov 2018 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 221 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.