Signed-off-by: Tim Landscheidt tim@tim-landscheidt.de
Hi, thanks for your PR. I think the current code is valid. It looks like the double '%' character does some escaping.
current code:
onosek@f53286b30142:/(master)$ PYTHONPATH=/src/rpkg fedpkg help | grep verify-files | tail -n 1 verify-files Locally verify %files section
your suggestion:
onosek@f53286b30142:/(master)$ PYTHONPATH=/src/rpkg fedpkg help | grep verify-files Could not execute print_help: must be real number, not dict
Sorry, I should have been clearer what the problem is. The man page for fedpkg, as shipped by Fedora, contains the double %s:
fedpkg
%
[…] COMMAND OVERVIEW […] fedpkg verify-files [-h] [--builddir BUILDDIR] [--buildrootdir BUILDROOTDIR] [--arch ARCH] [--define DEFINE] ... Locally verify %%files section […]
Glancing at the code, pyrpkg/man_gen.py appears to invoke argparse's format_help() and I'm not sure whether that call should return a string with the expanded text (i. e., %% transformed to %) and if it does. So I'll close the PR as it is wrong, and I open a new issue.
pyrpkg/man_gen.py
argparse
format_help()
%%
Pull-Request has been closed by scfc
Signed-off-by: Tim Landscheidt tim@tim-landscheidt.de