From c1509ee9b406223f3fd0353867e24e4b5860d0de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jani=20V=C3=A4limaa?= Date: Sun, 24 Mar 2024 12:27:41 +0200 Subject: Pass --noclean by default to rpmbuild Replace --noclean cmd line option with --clean for changing the new default --- BuildManager/build.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'BuildManager') 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") -- cgit v1.2.1