Automatically convert ROOT and PORTAGE_CONFIGROOT to absolute paths when necessary...
authorZac Medico <zmedico@gentoo.org>
Fri, 16 Mar 2007 05:02:20 +0000 (05:02 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 16 Mar 2007 05:02:20 +0000 (05:02 -0000)
svn path=/main/branches/2.1.2/; revision=6214

pym/portage.py

index cfef7234362209b6bc12f9e1157becee5c4aff45..c977637ec7eb26201c23e580ab0895c951e3d04a 100644 (file)
@@ -1004,8 +1004,8 @@ class config:
                        if config_root is None:
                                config_root = "/"
 
-                       config_root = \
-                               normalize_path(config_root).rstrip(os.path.sep) + os.path.sep
+                       config_root = normalize_path(os.path.abspath(
+                               config_root)).rstrip(os.path.sep) + os.path.sep
 
                        check_var_directory("PORTAGE_CONFIGROOT", config_root)
 
@@ -1256,8 +1256,8 @@ class config:
                        if target_root is None:
                                target_root = "/"
 
-                       target_root = \
-                               normalize_path(target_root).rstrip(os.path.sep) + os.path.sep
+                       target_root = normalize_path(os.path.abspath(
+                               target_root)).rstrip(os.path.sep) + os.path.sep
 
                        check_var_directory("ROOT", target_root)