# 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
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.
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