Çağların bahsettiği iki defa çalıştırma sorunu çözülmüş olmalı. Çağlar bir test ediver sen de.
This commit is contained in:
+33
-32
@@ -197,6 +197,14 @@ def build(pspecfile, authInfo=None):
|
|||||||
pb = prepare_for_build(pspecfile, authInfo)
|
pb = prepare_for_build(pspecfile, authInfo)
|
||||||
pb.build()
|
pb.build()
|
||||||
|
|
||||||
|
|
||||||
|
order = {"none": 0,
|
||||||
|
"unpack": 1,
|
||||||
|
"setupaction": 2,
|
||||||
|
"buildaction": 3,
|
||||||
|
"installaction": 4,
|
||||||
|
"buildpackages": 5}
|
||||||
|
|
||||||
def __buildState_unpack(pb):
|
def __buildState_unpack(pb):
|
||||||
# unpack is the first state to run.
|
# unpack is the first state to run.
|
||||||
pb.fetchSourceArchive()
|
pb.fetchSourceArchive()
|
||||||
@@ -205,34 +213,34 @@ def __buildState_unpack(pb):
|
|||||||
|
|
||||||
pb.setState("unpack")
|
pb.setState("unpack")
|
||||||
|
|
||||||
def __buildState_setupAction(pb, lastState):
|
def __buildState_setupaction(pb, last):
|
||||||
|
|
||||||
if lastState != "unpack":
|
if order[last] < order["unpack"]:
|
||||||
__buildState_unpack(pb)
|
__buildState_unpack(pb)
|
||||||
pb.runSetupAction()
|
pb.runSetupAction()
|
||||||
|
|
||||||
pb.setState("setupaction")
|
pb.setState("setupaction")
|
||||||
|
|
||||||
def __buildState_buildAction(pb, lastState):
|
def __buildState_buildaction(pb, last):
|
||||||
|
|
||||||
if lastState != "setupaction":
|
if order[last] < order["setupaction"]:
|
||||||
__buildState_setupAction(pb, lastState)
|
__buildState_setupaction(pb, last)
|
||||||
pb.runBuildAction()
|
pb.runBuildAction()
|
||||||
|
|
||||||
pb.setState("buildaction")
|
pb.setState("buildaction")
|
||||||
|
|
||||||
def __buildState_installAction(pb, lastState):
|
def __buildState_installaction(pb, last):
|
||||||
|
|
||||||
if lastState != "buildaction":
|
if order[last] < order["buildaction"]:
|
||||||
__buildState_buildAction(pb, lastState)
|
__buildState_buildaction(pb, last)
|
||||||
pb.runInstallAction()
|
pb.runInstallAction()
|
||||||
|
|
||||||
pb.setState("installaction")
|
pb.setState("installaction")
|
||||||
|
|
||||||
def __buildState_package(pb, lastState):
|
def __buildState_buildpackages(pb, last):
|
||||||
|
|
||||||
if lastState != "installaction":
|
if order[last] < order["installaction"]:
|
||||||
__buildState_installAction(pb, lastState)
|
__buildState_installaction(pb, last)
|
||||||
pb.buildPackages()
|
pb.buildPackages()
|
||||||
|
|
||||||
pb.setState("buildpackages")
|
pb.setState("buildpackages")
|
||||||
@@ -242,35 +250,28 @@ def build_until(pspecfile, state, authInfo=None):
|
|||||||
pb.compileActionScript()
|
pb.compileActionScript()
|
||||||
|
|
||||||
last = pb.getState()
|
last = pb.getState()
|
||||||
ui.info("Last state is %s\n"%last)
|
ui.info("Last state was %s\n"%last)
|
||||||
|
|
||||||
if not last: last = "none"
|
if not last: last = "none"
|
||||||
elif last == state: return # allready there
|
|
||||||
|
|
||||||
order = {"none": 0,
|
if state == "unpack":
|
||||||
"unpack": 1,
|
|
||||||
"setupaction": 2,
|
|
||||||
"buildaction": 3,
|
|
||||||
"installaction": 4,
|
|
||||||
"buildpackages": 5}
|
|
||||||
|
|
||||||
if last != "unpack" or order[last] < order["unpack"]:
|
|
||||||
__buildState_unpack(pb)
|
__buildState_unpack(pb)
|
||||||
if state == "unpack": return
|
return
|
||||||
|
|
||||||
if last != "setupaction" or order[last] < order["setupaction"]:
|
if state == "setupaction":
|
||||||
__buildState_setupAction(pb, last)
|
__buildState_setupaction(pb, last)
|
||||||
if state == "setupaction": return
|
return
|
||||||
|
|
||||||
if last != "buildaction" or order[last] < order["buildaction"]:
|
if state == "buildaction":
|
||||||
__buildState_buildAction(pb, last)
|
__buildState_buildaction(pb, last)
|
||||||
if state == "buildaction": return
|
return
|
||||||
|
|
||||||
if last != "installaction" or order[last] < order["installaction"]:
|
if state == "installaction":
|
||||||
__buildState_installAction(pb, last)
|
print "blibli"
|
||||||
if state == "installaction": return
|
__buildState_installaction(pb, last)
|
||||||
|
return
|
||||||
|
|
||||||
__buildState_package(pb, last)
|
__buildState_buildpackages(pb, last)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user