diff options
author | Jani Välimaa <wally@mageia.org> | 2024-03-24 12:27:41 +0200 |
---|---|---|
committer | Jani Välimaa <wally@mageia.org> | 2024-03-24 12:27:41 +0200 |
commit | c1509ee9b406223f3fd0353867e24e4b5860d0de (patch) | |
tree | f69ddd4b888831acf0cc5783f4fd94da667ccbf7 /BuildManager | |
parent | e94bc7af4eaf94116c931b97f4f09e9416fd4153 (diff) | |
download | bm-c1509ee9b406223f3fd0353867e24e4b5860d0de.tar bm-c1509ee9b406223f3fd0353867e24e4b5860d0de.tar.gz bm-c1509ee9b406223f3fd0353867e24e4b5860d0de.tar.bz2 bm-c1509ee9b406223f3fd0353867e24e4b5860d0de.tar.xz bm-c1509ee9b406223f3fd0353867e24e4b5860d0de.zip |
Pass --noclean by default to rpmbuild
Replace --noclean cmd line option with --clean for changing the new default
Diffstat (limited to 'BuildManager')
-rw-r--r-- | BuildManager/build.py | 7 |
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") |