diff options
author | Jani Välimaa <wally@mageia.org> | 2024-03-23 23:14:31 +0200 |
---|---|---|
committer | Jani Välimaa <wally@mageia.org> | 2024-03-23 23:14:31 +0200 |
commit | b641599c2119bda54d0663becfdfb29eb25430a4 (patch) | |
tree | 9d2b33b6da907e5f338af02710dbe37413db4e99 | |
parent | 46a30bc43e4491f6ccff7f2991eebfae44faf52e (diff) | |
download | bm-b641599c2119bda54d0663becfdfb29eb25430a4.tar bm-b641599c2119bda54d0663becfdfb29eb25430a4.tar.gz bm-b641599c2119bda54d0663becfdfb29eb25430a4.tar.bz2 bm-b641599c2119bda54d0663becfdfb29eb25430a4.tar.xz bm-b641599c2119bda54d0663becfdfb29eb25430a4.zip |
build.py: restructure code a bit
-rw-r--r-- | BuildManager/build.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/BuildManager/build.py b/BuildManager/build.py index daf2b24..38bde2f 100644 --- a/BuildManager/build.py +++ b/BuildManager/build.py @@ -199,16 +199,15 @@ def buildpkg(pkg, stage, unpack_dir, passtrough="", show_log=0, dryrun=0): status = 0 if stage != STAGE_UNPACK: stagechar = ["p","r","c","i","s","b","a"][stage-1] + tmppath = "" + nodeps = "" + topdir = "--define '_topdir %s'" % pkg.builddir if not dryrun and os.path.isdir(pkg.builddir+"/BUILDROOT"): - tmppath = " --define '_tmppath %s/BUILDROOT'" % pkg.builddir - else: - tmppath = "" + tmppath = "--define '_tmppath %s/BUILDROOT'" % pkg.builddir if stage == STAGE_PREP: nodeps = "--nodeps" - else: - nodeps = "" - cmd = "rpmbuild -b%s %s --define '_topdir %s'%s %s %s 2>&1" % \ - (stagechar,nodeps,pkg.builddir,tmppath,passtrough,pkg.spec) + cmd = "rpmbuild -b%s %s %s %s %s %s 2>&1" % \ + (stagechar, nodeps, topdir, tmppath, passtrough, pkg.spec) logger.debug("rpmbuild command: "+cmd) if not dryrun: log = codecs.open(pkg.log, "w", 'utf-8', errors = "replace") |