From: Michael Tremer Date: Sat, 21 May 2011 19:58:47 +0000 (+0000) Subject: Make path configureable of Pakfire. X-Git-Tag: 0.9.3~9^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=715d70094a7ba146c77caae926c1edee16860487;p=pakfire.git Make path configureable of Pakfire. --- 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",