#9 minor typo in rpmdev-bumpspec.1
Closed: Fixed None Opened 14 years ago by chkr.

the manual for rpmdev-bumpspec contains a minor typo:
{{{
-u USERSTRING, --userstring=USERSTRING
user name+email string (default: output from rpmdevpackager(1))
}}}
"rpmdevpackager(1)" should be rather "rpmdev-packager(1)"

I've stumbled over this when I've tried to understand where rpmbdev-bumpspec gets the default for the user string. ;-)

Unfortunately the problems is caused by a strange behavior of help2man together with python's optparse library:

rpmdev-bumpspec:
{{{
...
parser.add_option("-u", "--userstring", default=userstring,
help="user name+email string (default: output from "+
"rpmdev-packager(1))")
...
}}}
This is automatically formatted by the optparse library when the help is requested via
./rpmdev-bumpspec --help and so the textwrap library will break the line exactly at "rpmdev-" and the new line starts with "packager(1)". The help2man thinks the minus is just because the line break and so it puts both strings together again. ;-)

Sure, that's just a minor problem however it is misleading right now...

Since it doesn't look like that it is possible to get the textwrap library to not break lines at "-" the most easy fix would be to change the layout of the help text to fit into one line:
{{{
--- a/rpmdev-bumpspec
+++ b/rpmdev-bumpspec
@@ -180,7 +180,7 @@ the Free Software Foundation; either version 2 of the Licens
parser.add_option("-c", "--comment", default='- rebuilt',
help="changelog comment (default: \"- rebuilt\")")
parser.add_option("-u", "--userstring", default=userstring,
- help="user name+email string (default: output from "+
+ help="user name+email (default: output "+
"rpmdev-packager(1))")
parser.add_option("-r", "--rightmost", default=False, action='store_true',
help="bump the rightmost integer or add a .1")
}}}


Thanks for the catch. optparse's help formatters appear to honor the COLUMNS environment variable which we can use to prevent it from wrapping stuff when help2man invokes the tools. Should be fixed in [62b10ad].

Login to comment on this ticket.

Metadata