aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2013-01-15 15:02:59 (GMT)
committerZac Medico <zmedico@gentoo.org>2013-01-15 15:02:59 (GMT)
commit61215c22e0f9b9ebf2f9ae09c23a4663febaf5b0 (patch)
tree1c5c7d5d46384ea0c8fe68860a03f7ce9bf236c9
parenttest-fail-continue: mark complete, bug #452030 (diff)
downloadportage-61215c22e0f9b9ebf2f9ae09c23a4663febaf5b0.zip
portage-61215c22e0f9b9ebf2f9ae09c23a4663febaf5b0.tar.gz
portage-61215c22e0f9b9ebf2f9ae09c23a4663febaf5b0.tar.bz2
Warn if 2 make.profile dirs found, bug #452176
-rw-r--r--pym/portage/package/ebuild/_config/LocationsManager.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/pym/portage/package/ebuild/_config/LocationsManager.py b/pym/portage/package/ebuild/_config/LocationsManager.py
index 1ca2b32..8f88e49 100644
--- a/pym/portage/package/ebuild/_config/LocationsManager.py
+++ b/pym/portage/package/ebuild/_config/LocationsManager.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2012 Gentoo Foundation
+# Copyright 2010-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
__all__ = (
@@ -73,13 +73,25 @@ class LocationsManager(object):
known_repos = tuple(known_repos)
if self.config_profile_path is None:
+ deprecated_profile_path = os.path.join(
+ self.config_root, 'etc', 'make.profile')
self.config_profile_path = \
os.path.join(self.config_root, PROFILE_PATH)
if os.path.isdir(self.config_profile_path):
self.profile_path = self.config_profile_path
+ if os.path.isdir(deprecated_profile_path) and not \
+ os.path.samefile(self.profile_path,
+ deprecated_profile_path):
+ # Don't warn if they refer to the same path, since
+ # that can be used for backward compatibility with
+ # old software.
+ writemsg("!!! %s\n" %
+ _("Found 2 make.profile dirs: "
+ "using '%s', ignoring '%s'") %
+ (self.profile_path, deprecated_profile_path),
+ noiselevel=-1)
else:
- self.config_profile_path = \
- os.path.join(self.config_root, 'etc', 'make.profile')
+ self.config_profile_path = deprecated_profile_path
if os.path.isdir(self.config_profile_path):
self.profile_path = self.config_profile_path
else: