From 08d60af810871efc75ef4e1268c894729b6f4f12 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 7 Aug 2011 11:35:04 +0200 Subject: [PATCH] Re-enable install test after building packages. --- pakfire/base.py | 11 ++++++++--- pakfire/builder.py | 5 +---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pakfire/base.py b/pakfire/base.py index 49e8139a2..e19e49edb 100644 --- a/pakfire/base.py +++ b/pakfire/base.py @@ -209,7 +209,7 @@ class Pakfire(object): # Run the transaction. t.run() - def localinstall(self, files): + def localinstall(self, files, yes=None): repo_name = repo_desc = "localinstall" # Create a new repository that holds all packages we passed on @@ -244,8 +244,13 @@ class Pakfire(object): logging.info(_("Nothing to do")) return - # Ask the user if this is okay. - if not t.cli_yesno(): + if yes is None: + # Ask the user if this is okay. + if not t.cli_yesno(): + return + elif yes: + t.dump() + else: return # If okay, run the transcation. diff --git a/pakfire/builder.py b/pakfire/builder.py index 8d4692691..d96acbc25 100644 --- a/pakfire/builder.py +++ b/pakfire/builder.py @@ -324,15 +324,12 @@ class Builder(object): transaction.run() def install_test(self): - # XXX currently disabled - return - pkgs = [] for dir, subdirs, files in os.walk(self.chrootPath("result")): for file in files: pkgs.append(os.path.join(dir, file)) - self.pakfire.localinstall(pkgs) + self.pakfire.localinstall(pkgs, yes=True) def chrootPath(self, *args): # Remove all leading slashes -- 2.39.5