Move the make.profile symlink warning from global scope to the config class.
authorZac Medico <zmedico@gentoo.org>
Tue, 25 Apr 2006 04:04:54 +0000 (04:04 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 25 Apr 2006 04:04:54 +0000 (04:04 -0000)
svn path=/main/trunk/; revision=3223

pym/portage.py

index b957b2071389a43004b2e7d1edf6c6d796db862b..8ab65b1f0fe3872d04fad50ce40353f83f3299fa 100644 (file)
@@ -1272,6 +1272,12 @@ class config:
                                if group not in archlist and group[0] != '-':
                                        writemsg("!!! INVALID ACCEPT_KEYWORDS: %s\n" % str(group))
 
+               if not os.path.islink(PROFILE_PATH) and \
+                       os.path.exists(os.path.join(self["PORTDIR"], "profiles")):
+                       writemsg("\a\n\n!!! %s is not a symlink and will probably prevent most merges.\n" % PROFILE_PATH)
+                       writemsg("!!! It should point into a profile within %s/profiles/\n" % self["PORTDIR"])
+                       writemsg("!!! (You can safely ignore this message when syncing. It's harmless.)\n\n\n")
+
                if mycpv:
                        self.setcpv(mycpv)
 
@@ -6868,12 +6874,6 @@ archlist = settings.archlist()
 # Clear the cache
 dircache={}
 
-if not os.path.islink(PROFILE_PATH) and os.path.exists(settings["PORTDIR"]+"/profiles"):
-       writemsg(red("\a\n\n!!! "+PROFILE_PATH+" is not a symlink and will probably prevent most merges.\n"))
-       writemsg(red("!!! It should point into a profile within %s/profiles/\n" % settings["PORTDIR"]))
-       writemsg(red("!!! (You can safely ignore this message when syncing. It's harmless.)\n\n\n"))
-       time.sleep(3)
-
 # ============================================================================
 # ============================================================================