summaryrefslogtreecommitdiffstats
path: root/BuildManager/build.py
diff options
context:
space:
mode:
Diffstat (limited to 'BuildManager/build.py')
-rw-r--r--BuildManager/build.py7
1 files changed, 5 insertions, 2 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")