summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BuildManager/build.py15
-rw-r--r--bm2
2 files changed, 11 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:
diff --git a/bm b/bm
index 8358341..fcce0b1 100644
--- a/bm
+++ b/bm
@@ -32,6 +32,8 @@ def parse_options():
help="just unpack")
parser.add_option("-p", dest="mode", action="store_const", const="prep",
help="unpack and run %prep stage")
+ parser.add_option("-r", dest="mode", action="store_const", const="generate_buildrequires",
+ help="unpack, run %prep and generate buildrequires")
parser.add_option("-c", dest="mode", action="store_const", const="compile",
help="unpack, run %prep, and compile")
parser.add_option("-i", dest="mode", action="store_const", const="install",