aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo
diff options
context:
space:
mode:
Diffstat (limited to 'MgaRepo')
-rw-r--r--MgaRepo/commands/buildrpm.py4
-rw-r--r--MgaRepo/rpmutil.py5
2 files changed, 8 insertions, 1 deletions
diff --git a/MgaRepo/commands/buildrpm.py b/MgaRepo/commands/buildrpm.py
index 3f9c9bb..b58ac65 100644
--- a/MgaRepo/commands/buildrpm.py
+++ b/MgaRepo/commands/buildrpm.py
@@ -8,6 +8,9 @@ HELP = """\
Usage: mgarepo buildrpm [OPTIONS]
Builds the binary RPM(s) (.rpm) file(s) of a given package.
+
+Options:
+ -l Disable rpmlint check of packages built
"""
def parse_options():
@@ -15,6 +18,7 @@ def parse_options():
parser.add_option("-b", dest="build_cmd", default="a")
parser.add_option("-P", dest="packager", default="")
parser.add_option("-v", "--verbose", dest="verbose", action="store_true", default=False)
+ parser.add_option("-l", dest="rpmlint", action="store_false", default=True)
opts, args = parser.parse_args()
return opts
diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py
index 201ba0b..a4f66f4 100644
--- a/MgaRepo/rpmutil.py
+++ b/MgaRepo/rpmutil.py
@@ -14,7 +14,6 @@ import string
import glob
import sys
import os
-from time import sleep
def detectVCS(url):
if ':' in url:
@@ -377,6 +376,7 @@ def put_srpm(srpmfile, markrelease=False, striplog=True, branch=None,
def build_rpm(build_cmd="a",
verbose=False,
+ rpmlint=True,
packager = "",
macros = []):
top = os.getcwd()
@@ -403,6 +403,9 @@ def build_rpm(build_cmd="a",
if packager:
rpmdefs.append(("--define", "packager %s" % packager))
+ if rpmlint:
+ rpmdefs.append(("--define", "_build_pkgcheck_set %{_bindir}/rpmlint"))
+
rpmbuild = config.get("helper", "rpmbuild", "rpmbuild")
args = [rpmbuild, "-bb", spec]
for pair in rpmdefs: