From: Zac Medico Date: Fri, 12 Dec 2008 21:23:16 +0000 (-0000) Subject: Fix deprecated_profile_check() to account for PORTAGE_CONFIGROOT. Thanks to X-Git-Tag: v2.1.6.1~30 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1f1199ddd971b4fca50eb8bad0081f667a517320;p=portage.git Fix deprecated_profile_check() to account for PORTAGE_CONFIGROOT. Thanks to Jeremy Olexa for the initial patch. (trunk r12181) svn path=/main/branches/2.1.6/; revision=12217 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 5acd3be80..33b6732c9 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -13742,7 +13742,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 9c2b13f0a..3a68ec2f9 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -7227,10 +7227,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"),