summaryrefslogtreecommitdiffstats
path: root/BuildManager/build.py
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2023-01-16 20:09:45 +0000
committerPascal Terjan <pterjan@mageia.org>2023-01-16 20:09:45 +0000
commit43bd968964ba8007988f9db0adcb0f625167ea2f (patch)
treee16a726b4be641d6ab5b2299599ad45c59f4122f /BuildManager/build.py
parent9017169d5cff8da3418f886484722cf48138c65c (diff)
downloadbm-43bd968964ba8007988f9db0adcb0f625167ea2f.tar
bm-43bd968964ba8007988f9db0adcb0f625167ea2f.tar.gz
bm-43bd968964ba8007988f9db0adcb0f625167ea2f.tar.bz2
bm-43bd968964ba8007988f9db0adcb0f625167ea2f.tar.xz
bm-43bd968964ba8007988f9db0adcb0f625167ea2f.zip
Support generate_buildrequires stage
This adds the support for -r which then calls rpmbuild -br. See https://fedoraproject.org/wiki/Changes/DynamicBuildRequires
Diffstat (limited to 'BuildManager/build.py')
-rw-r--r--BuildManager/build.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/BuildManager/build.py b/BuildManager/build.py
index c07126e..5a039bb 100644
--- a/BuildManager/build.py
+++ b/BuildManager/build.py
@@ -15,14 +15,16 @@ GLOBAL_PKGLIST_LOCK = _thread.allocate_lock()
STAGE_UNPACK = 0
STAGE_PREP = 1
-STAGE_COMPILE = 2
-STAGE_INSTALL = 3
-STAGE_SOURCE = 4
-STAGE_BINARY = 5
-STAGE_ALL = 6
+STAGE_GENERATE_BUILDREQUIRES = 2
+STAGE_COMPILE = 3
+STAGE_INSTALL = 4
+STAGE_SOURCE = 5
+STAGE_BINARY = 6
+STAGE_ALL = 7
STAGE_DICT = {"unpack": STAGE_UNPACK,
"prep": STAGE_PREP,
+ "generate_buildrequires": STAGE_GENERATE_BUILDREQUIRES,
"compile": STAGE_COMPILE,
"install": STAGE_INSTALL,
"source": STAGE_SOURCE,
@@ -182,6 +184,7 @@ def buildpkglist(pkglist, stage, unpack_dir, passtrough="",
def buildpkg(pkg, stage, unpack_dir, passtrough="", show_log=0, dryrun=0):
stagestr = ["unpacking",
"running prep stage",
+ "running prep and generate_buildrequires stages",
"running prep and compile stage",
"running prep, compile, and install stages",
"building source package",
@@ -195,7 +198,7 @@ def buildpkg(pkg, stage, unpack_dir, passtrough="", show_log=0, dryrun=0):
else:
status = 0
if stage != STAGE_UNPACK:
- stagechar = ["p","c","i","s","b","a"][stage-1]
+ stagechar = ["p","r","c","i","s","b","a"][stage-1]
if not dryrun and os.path.isdir(pkg.builddir+"/BUILDROOT"):
tmppath = " --define '_tmppath %s/BUILDROOT'" % pkg.builddir
else: