diff options
Diffstat (limited to 'src/fedpkg.py')
-rwxr-xr-x | src/fedpkg.py | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/fedpkg.py b/src/fedpkg.py index c54c057..86cf832 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -1069,7 +1069,14 @@ packages will be built sequentially. # Build locally parser_local = subparsers.add_parser('local', - help = 'Local test rpmbuild binary') + help = 'Local test rpmbuild binary', + formatter_class = argparse.RawDescriptionHelpFormatter, + description=textwrap.dedent("""\ + Locally test run of rpmbuild producing binary RPMs. + + The rpmbuild output will be logged into a file named + .build-%{version}-%{release}.log + """)) parser_local.add_argument('--arch', help = 'Build for arch') # optionally define old style hashsums parser_local.add_argument('--md5', action = 'store_true', @@ -1231,8 +1238,19 @@ packages will be built sequentially. ' name-version-release') parser_verrel.set_defaults(command = verrel) - # Parse the args - return parser.parse_args() + if not generate_manpage: + # Parse the args + return parser.parse_args() + else: + # Generate the man page + + # Use the "as man_page" part to avoid overwriting the pyfedpkg + # namespace, which would break all usage of pyfedpkg.* outside + # of this else branch. + import pyfedpkg.man_page as man_page + man_page.generate(parser, subparsers) + sys.exit(0) + # no return possible # The main code goes here |