Move USER_VIRTUALS_FILE deprecation warning to config.validate().
authorZac Medico <zmedico@gentoo.org>
Tue, 25 Apr 2006 05:11:07 +0000 (05:11 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 25 Apr 2006 05:11:07 +0000 (05:11 -0000)
svn path=/main/trunk/; revision=3225

pym/portage.py

index e69310d9f4af989c05843f755350d6cc69ccc292..63192a83edb95a55900e709db24027dfc6b240b8 100644 (file)
@@ -1285,6 +1285,11 @@ class config:
                        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 os.path.exists(USER_VIRTUALS_FILE):
+                       writemsg("\n!!! /etc/portage/virtuals is deprecated in favor of\n")
+                       writemsg("!!! /etc/portage/profile/virtuals. Please move it to\n")
+                       writemsg("!!! this new location.\n\n")
+
        def loadVirtuals(self,root):
                """Not currently used by portage."""
                writemsg("DEPRECATED: portage.config.loadVirtuals\n")
@@ -6774,11 +6779,6 @@ profiledir=None
 if os.path.isdir(PROFILE_PATH):
        profiledir = PROFILE_PATH
 
-if os.path.exists(USER_VIRTUALS_FILE):
-       writemsg(red("\n!!! /etc/portage/virtuals is deprecated in favor of\n"))
-       writemsg(red("!!! /etc/portage/profile/virtuals. Please move it to\n"))
-       writemsg(red("!!! this new location.\n\n"))
-
 db={}
 
 # We're going to lock the global config to prevent changes, but we need