summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJochen Schmitt <Jochen@herr-schmitt.de>2010-08-17 20:56:39 +0200
committerJochen Schmitt <Jochen@herr-schmitt.de>2010-09-05 21:27:47 +0200
commitbd794ccaab29cc410923d2750626b56d8221786a (patch)
tree03a9a296e46e9d3a1982ab48e590031053d44f86
parente8f0bfe7a4da90bb952730d1dca48d3283258572 (diff)
downloadfedora-packager-bd794ccaab29cc410923d2750626b56d8221786a.tar.gz
fedora-packager-bd794ccaab29cc410923d2750626b56d8221786a.tar.xz
fedora-packager-bd794ccaab29cc410923d2750626b56d8221786a.zip
Add -i (info) switch to the lint command
-rw-r--r--src/fedpkg.bash3
-rwxr-xr-xsrc/fedpkg.py8
-rw-r--r--src/pyfedpkg/__init__.py7
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)