summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BuildManager/build.py7
-rw-r--r--bash-completion/bm2
-rw-r--r--bm2
-rw-r--r--man/bm.82
4 files changed, 8 insertions, 5 deletions
diff --git a/BuildManager/build.py b/BuildManager/build.py
index 5b7e7a5..8bc5791 100644
--- a/BuildManager/build.py
+++ b/BuildManager/build.py
@@ -201,13 +201,16 @@ def buildpkg(pkg, stage, unpack_dir, passtrough="", show_log=0, dryrun=0):
stagechar = ["p","r","c","i","s","b","a"][stage-1]
tmppath = ""
nodeps = ""
+ noclean = "--noclean"
topdir = "--define '_topdir %s'" % pkg.builddir
if not dryrun and os.path.isdir(pkg.builddir+"/BUILDROOT"):
tmppath = "--define '_tmppath %s/BUILDROOT'" % pkg.builddir
if stage == STAGE_PREP:
nodeps = "--nodeps"
- cmd = "rpmbuild -b%s %s %s %s %s %s 2>&1" % \
- (stagechar, nodeps, topdir, tmppath, passtrough, pkg.spec)
+ if '--clean' in passtrough.split():
+ noclean = ""
+ cmd = "rpmbuild -b%s %s %s %s %s %s %s 2>&1" % \
+ (stagechar, nodeps, noclean, topdir, tmppath, passtrough, pkg.spec)
logger.debug("rpmbuild command: "+cmd)
if not dryrun:
log = codecs.open(pkg.log, "w", 'utf-8', errors = "replace")
diff --git a/bash-completion/bm b/bash-completion/bm
index 047a8fd..67df8ae 100644
--- a/bash-completion/bm
+++ b/bash-completion/bm
@@ -34,7 +34,7 @@ _bm()
--copy-succeeded-srpm= --remove-succeeded-srpm \
--move-log= --move-failed-log= --filter-renew= \
--filter-refresh= --clean-topdir --clean-on-success --ignore= \
- --sign --nodeps --noclean --debug --short-circuit --with \
+ --sign --nodeps --clean --debug --short-circuit --with \
--without --define --target --dryrun --log=' -- $cur ) )
else
_filedir '@(spec|src.rpm)'
diff --git a/bm b/bm
index bf15eb9..e0c8d86 100644
--- a/bm
+++ b/bm
@@ -92,7 +92,7 @@ def parse_options():
help="pass this option to rpm")
parser.add_option("--nodeps", action="callback", nargs=0, callback=passtrough,
help="pass this option to rpm")
- parser.add_option("--noclean", action="callback", nargs=0, callback=passtrough,
+ parser.add_option("--clean", action="callback", nargs=0, callback=passtrough,
help="pass this option to rpm")
parser.add_option("--debug", action="callback", nargs=0, callback=passtrough,
help="pass this option to rpm")
diff --git a/man/bm.8 b/man/bm.8
index ab17fc8..cd6895c 100644
--- a/man/bm.8
+++ b/man/bm.8
@@ -133,7 +133,7 @@ sign packages using GPG
pass this option to rpm
.TP
.B
-\fB--noclean\fP
+\fB--clean\fP
pass this option to rpm
.TP
.B