summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-08 21:20:23 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-08 21:20:23 +0000
commit7b7aa0bbffbf138771f1a5296317d893bec1af21 (patch)
tree14d148b75b845244b66dc76e52cce41a8c665d36
parent459faf4f5bdbbcba2ce5f088408bf8a3e235d460 (diff)
downloadportage-7b7aa0bbffbf138771f1a5296317d893bec1af21.tar.gz
portage-7b7aa0bbffbf138771f1a5296317d893bec1af21.tar.bz2
portage-7b7aa0bbffbf138771f1a5296317d893bec1af21.zip
Fix deprecated_profile_check() to account for PORTAGE_CONFIGROOT. Thanks to
Jeremy Olexa <darkside@g.o> for the initial patch. svn path=/main/trunk/; revision=12181
-rw-r--r--pym/_emerge/__init__.py2
-rw-r--r--pym/portage/__init__.py11
2 files changed, 9 insertions, 4 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 996590da0..1f782b451 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -14208,7 +14208,7 @@ def emerge_main():
spinner.update = spinner.update_scroll
if "--quiet" not in myopts:
- portage.deprecated_profile_check()
+ portage.deprecated_profile_check(settings=settings)
repo_name_check(trees)
config_protect_check(trees)
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index aabed8283..2a559f3af 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -7240,10 +7240,15 @@ def pkgmerge(mytbz2, myroot, mysettings, mydbapi=None,
raise
del e
-def deprecated_profile_check():
- if not os.access(DEPRECATED_PROFILE_FILE, os.R_OK):
+def deprecated_profile_check(settings=None):
+ config_root = "/"
+ if settings is not None:
+ config_root = settings["PORTAGE_CONFIGROOT"]
+ deprecated_profile_file = os.path.join(config_root,
+ DEPRECATED_PROFILE_FILE.lstrip(os.sep))
+ if not os.access(deprecated_profile_file, os.R_OK):
return False
- deprecatedfile = open(DEPRECATED_PROFILE_FILE, "r")
+ deprecatedfile = open(deprecated_profile_file, "r")
dcontent = deprecatedfile.readlines()
deprecatedfile.close()
writemsg(red("\n!!! Your current profile is deprecated and not supported anymore.\n"),