From dacaa18b94b0cab27a715b8734f668174382328d Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 13 Apr 2011 22:12:23 +0200 Subject: [PATCH] Don't go to shell by default. --- pakfire/base.py | 7 +++++-- pakfire/cli.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pakfire/base.py b/pakfire/base.py index fae49df13..79caf7093 100644 --- a/pakfire/base.py +++ b/pakfire/base.py @@ -170,7 +170,7 @@ class Pakfire(object): return [p.name for p in pkgs] @staticmethod - def build(pkg, resultdirs=None, **kwargs): + def build(pkg, resultdirs=None, shell=False, **kwargs): if not resultdirs: resultdirs = [] @@ -194,7 +194,10 @@ class Pakfire(object): b.copy_result(resultdir) except BuildError: - b.shell() + if shell: + b.shell() + else: + raise finally: b.destroy() diff --git a/pakfire/cli.py b/pakfire/cli.py index d4c186408..a860e1c93 100644 --- a/pakfire/cli.py +++ b/pakfire/cli.py @@ -349,7 +349,7 @@ class CliBuilder(Cli): } pakfire.build(pkg, distro_config=distro_config, resultdirs=[self.args.resultdir,], - **self.pakfire_args) + shell=True, **self.pakfire_args) def handle_shell(self): pkg = None -- 2.39.5