[MERGE] Fix for #5578

This commit is contained in:
Faik Uygur
2007-05-13 20:32:43 +00:00
parent 6603d36423
commit 6fd5ef300b
+12 -12
View File
@@ -191,9 +191,6 @@ class Builder:
self.fetch_source_archive() self.fetch_source_archive()
self.unpack_source_archive() self.unpack_source_archive()
# apply the patches and prepare a source directory for build.
self.apply_patches()
self.run_setup_action() self.run_setup_action()
self.run_build_action() self.run_build_action()
if ctx.get_option('debug') and not ctx.get_option('ignore_check'): if ctx.get_option('debug') and not ctx.get_option('ignore_check'):
@@ -310,19 +307,21 @@ class Builder:
def unpack_source_archive(self): def unpack_source_archive(self):
ctx.ui.info(_("Unpacking archive..."), noln = True) ctx.ui.info(_("Unpacking archive..."), noln = True)
self.sourceArchive.unpack() self.sourceArchive.unpack()
ctx.ui.info(_(" unpacked (%s)") % self.pkg_work_dir()) # apply the patches and prepare a source directory for build.
self.set_state("unpack") if self.apply_patches():
ctx.ui.info(_(" unpacked (%s)") % self.pkg_work_dir())
self.set_state("unpack")
def run_setup_action(self): def run_setup_action(self):
# Run configure, build and install phase # Run configure, build and install phase
ctx.ui.action(_("Setting up source...")) ctx.ui.action(_("Setting up source..."))
self.run_action_function(ctx.const.setup_func) if self.run_action_function(ctx.const.setup_func):
self.set_state("setupaction") self.set_state("setupaction")
def run_build_action(self): def run_build_action(self):
ctx.ui.action(_("Building source...")) ctx.ui.action(_("Building source..."))
self.run_action_function(ctx.const.build_func) if self.run_action_function(ctx.const.build_func):
self.set_state("buildaction") self.set_state("buildaction")
def run_check_action(self): def run_check_action(self):
ctx.ui.action(_("Testing package...")) ctx.ui.action(_("Testing package..."))
@@ -336,8 +335,8 @@ class Builder:
pisi.util.clean_dir(self.pkg_install_dir()) pisi.util.clean_dir(self.pkg_install_dir())
# install function is mandatory! # install function is mandatory!
self.run_action_function(ctx.const.install_func, True) if self.run_action_function(ctx.const.install_func, True):
self.set_state("installaction") self.set_state("installaction")
def get_abandoned_files(self): def get_abandoned_files(self):
# return the files those are not collected from the install dir # return the files those are not collected from the install dir
@@ -421,6 +420,7 @@ class Builder:
Error, _("unable to call function from actions: %s") %func Error, _("unable to call function from actions: %s") %func
os.chdir(curDir) os.chdir(curDir)
return True
def check_build_dependencies(self): def check_build_dependencies(self):
"""check and try to install build dependencies, otherwise fail.""" """check and try to install build dependencies, otherwise fail."""
@@ -495,6 +495,7 @@ class Builder:
ctx.ui.action(_("* Applying patch: %s") % patch.filename) ctx.ui.action(_("* Applying patch: %s") % patch.filename)
pisi.util.do_patch(self.srcDir, patchFile, level=patch.level, target=patch.target) pisi.util.do_patch(self.srcDir, patchFile, level=patch.level, target=patch.target)
return True
def generate_static_package_object(self): def generate_static_package_object(self):
ar_files = [] ar_files = []
@@ -928,7 +929,6 @@ def __buildState_unpack(pb, last):
if order[last] < order["fetch"]: if order[last] < order["fetch"]:
__buildState_fetch(pb) __buildState_fetch(pb)
pb.unpack_source_archive() pb.unpack_source_archive()
pb.apply_patches()
def __buildState_setupaction(pb, last): def __buildState_setupaction(pb, last):
if order[last] < order["unpack"]: if order[last] < order["unpack"]: