]> git.ipfire.org Git - pakfire.git/commitdiff
Make path configureable of Pakfire.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 21 May 2011 19:58:47 +0000 (19:58 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 21 May 2011 19:58:47 +0000 (19:58 +0000)
pakfire/base.py
pakfire/cli.py

index 793ecf341d2f8c33b928c2ccf446fb5bcb50a933..9db4adbf7764c40610f420cd46a3f7cbbba799c1 100644 (file)
@@ -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.
 
index ad3224ffd5a1e4d102932944eeb3688b15ac3c8a..5c8c896801a51409b341aaab9bd74626cd7c98cf 100644 (file)
@@ -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",