diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fedpkg.bash | 3 | ||||
-rwxr-xr-x | src/fedpkg.py | 8 | ||||
-rw-r--r-- | src/pyfedpkg/__init__.py | 7 |
3 files changed, 15 insertions, 3 deletions
diff --git a/src/fedpkg.bash b/src/fedpkg.bash index dd634f7..784abfe 100644 --- a/src/fedpkg.bash +++ b/src/fedpkg.bash @@ -77,6 +77,9 @@ _fedpkg() install) options='--arch --short-circuit' ;; + lint) + options='-i --info' + ;; local) options='--arch --md5' ;; diff --git a/src/fedpkg.py b/src/fedpkg.py index 98d1307..3d85ac4 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -525,7 +525,10 @@ def install(args): def lint(args): try: mymodule = pyfedpkg.PackageModule(args.path) - return mymodule.lint() + info = False + if args.info: + info = args.info + return mymodule.lint(info) except pyfedpkg.FedpkgError, e: log.error('Could not run rpmlint: %s' % e) sys.exit(1) @@ -1007,6 +1010,9 @@ packages will be built sequentially. # rpmlint target parser_lint = subparsers.add_parser('lint', help = 'Run rpmlint against local build output') + parser_lint.add_argument('--info', '-i', + action = 'store_true', + help = 'Display explainations for reported messages') parser_lint.set_defaults(command = lint) # Build locally diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index ce81102..4c0b03d 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -1356,7 +1356,7 @@ class PackageModule: _run_command(cmd, shell=True) return - def lint(self): + def lint(self, info=False): """Run rpmlint over a built srpm Log the output and returns nothing @@ -1375,7 +1375,10 @@ class PackageModule: rpms.extend([os.path.join(self.path, arch, file) for file in os.listdir(os.path.join(self.path, arch)) if file.endswith('.rpm')]) - cmd = ['rpmlint', os.path.join(self.path, srpm)] + cmd = ['rpmlint'] + if info: + cmd.extend(['-i']) + cmd.extend([os.path.join(self.path, srpm)]) cmd.extend(rpms) # Run the command _run_command(cmd, shell=True) |