From f73acaf60b745656f8269a560d846bb8d134355b Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Mon, 31 Jan 2011 16:44:43 +0100 Subject: Add "fedpkg verify-files" command usage: fedpkg verify-files [-h] Locally run 'rpmbuild -bl' to verify the spec file's %files sections. This is useful after a successful run of 'fedpkg install' or after a 'fedpkg local' run which failed due to %files list inaccuracies. --- src/fedpkg.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/fedpkg.py') diff --git a/src/fedpkg.py b/src/fedpkg.py index 0498009..b7ac38e 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -501,6 +501,14 @@ def diff(args): log.error('Could not diff: %s' % e) sys.exit(1) +def verify_files(args): + try: + mymodule = pyfedpkg.PackageModule(args.path, args.dist) + return mymodule.verify_files() + except pyfedpkg.FedpkgError, e: + log.error('Could not verify %%files list: %s' % e) + sys.exit(1) + def export(args): # not implimented; not planned log.warning('Not implimented yet, got %s' % args) @@ -1074,6 +1082,12 @@ defined, packages will be built sequentially.""") help = 'short-circuit compile') parser_compile.set_defaults(command = compile) + # Verify %files list locally + parser_verify_files = subparsers.add_parser('verify-files', + help='Locally verify %%files section', + description="Locally run 'rpmbuild -bl' to verify the spec file's %files sections. This is useful after a successful run of 'fedpkg install' or after a 'fedpkg local' run which failed due to %files list inaccuracies.") + parser_verify_files.set_defaults(command = verify_files) + # export the module; not planned #parser_export = subparsers.add_parser('export', # help = 'Create a clean export') -- cgit