From 744bc89eeb9d3297428f5d3e2ae20e69f85d3ecd Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Fri, 15 Sep 2006 07:44:38 +0000 Subject: [PATCH] =?UTF-8?q?*=20=C3=87a=C4=9Flar's=20special=20request.=20f?= =?UTF-8?q?etch=20state=20before=20unpack.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WARNING: clear /var/tmp/pisi state numbers and order has changed... --- pisi/build.py | 28 ++++++++++++++++++---------- pisi/cli/commands.py | 2 +- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/pisi/build.py b/pisi/build.py index 20b7f468..998e1d76 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -860,23 +860,27 @@ def build(pspec): return pb.build() order = {"none": 0, - "unpack": 1, - "setupaction": 2, - "buildaction": 3, - "installaction": 4, - "buildpackages": 5} + "fetch": 1, + "unpack": 2, + "setupaction": 3, + "buildaction": 4, + "installaction": 5, + "buildpackages": 6} -def __buildState_unpack(pb): - # unpack is the first state to run. +def __buildState_fetch(pb): + # fetch is the first state to run. pb.patch_exists() pb.fetch_source_archive() + +def __buildState_unpack(pb, last): + if order[last] < order["fetch"]: + __buildState_fetch(pb) pb.unpack_source_archive() pb.apply_patches() def __buildState_setupaction(pb, last): - if order[last] < order["unpack"]: - __buildState_unpack(pb) + __buildState_unpack(pb, last) pb.run_setup_action() def __buildState_buildaction(pb, last): @@ -910,8 +914,12 @@ def build_until(pspec, state): if not last: last = "none" + if state == "fetch": + __buildState_fetch(pb) + return + if state == "unpack": - __buildState_unpack(pb) + __buildState_unpack(pb, last) return if state == "setup": diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 260fff5b..5fc1175f 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -367,7 +367,7 @@ unpack, setup, build, install, package. name = ("build", "bi") - steps = ('unpack', 'setup', 'build', 'install', 'package') + steps = ('fetch', 'unpack', 'setup', 'build', 'install', 'package') package_formats = ('1.0', '1.1')