From 715d70094a7ba146c77caae926c1edee16860487 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 21 May 2011 19:58:47 +0000 Subject: [PATCH] Make path configureable of Pakfire. --- pakfire/base.py | 7 ++++--- pakfire/cli.py | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pakfire/base.py b/pakfire/base.py index 793ecf341..9db4adbf7 100644 --- a/pakfire/base.py +++ b/pakfire/base.py @@ -17,8 +17,9 @@ from constants import * from i18n import _ class Pakfire(object): - def __init__(self, builder=False, configs=[], enable_repos=None, - disable_repos=None, distro_config=None): + def __init__(self, path="/", builder=False, configs=[], + enable_repos=None, disable_repos=None, + distro_config=None): # Check if we are operating as the root user. self.check_root_user() @@ -28,7 +29,7 @@ class Pakfire(object): self.path = os.path.join(BUILD_ROOT, util.random_string()) else: self.builder = False - self.path = "/" + self.path = path # XXX check if we are actually running on an ipfire system. diff --git a/pakfire/cli.py b/pakfire/cli.py index ad3224ffd..5c8c89680 100644 --- a/pakfire/cli.py +++ b/pakfire/cli.py @@ -58,7 +58,9 @@ class Cli(object): @property def pakfire_args(self): - return {} + return { + "path" : self.args.instroot, + } def parse_common_arguments(self): self.parser.add_argument("-v", "--verbose", action="store_true", -- 2.39.5