Suggest running emaint when problems with the world file are detected.
authorJason Stubbs <jstubbs@gentoo.org>
Wed, 5 Oct 2005 15:40:46 +0000 (15:40 -0000)
committerJason Stubbs <jstubbs@gentoo.org>
Wed, 5 Oct 2005 15:40:46 +0000 (15:40 -0000)
svn path=/main/branches/2.0/; revision=2097

bin/emerge

index a89dab7863e78a532b8fa385585f8f245914fa75..b1a8f4eca2ba929b7439119cc2cca3d4248a10e5 100755 (executable)
@@ -860,9 +860,6 @@ def getlist(mode):
                        if myline[0]!="*":
                                continue
                        myline=myline[1:]
-               if not portage.isvalidatom(myline):
-                       print "!!! Invalid atom '%s' in your '%s' file" % (myline, mode)
-                       continue
                mynewlines.append(myline.strip())
 
        # Remove everything that is package.provided from our list
@@ -1393,11 +1390,21 @@ class depgraph:
                        sysdict=genericdict(syslist)
                        worlddict=genericdict(worldlist)
 
+                       world_problems = False
                        for x in worlddict.keys():
-                               if portage.db["/"]["vartree"].dbapi.match(x):
-                                       sysdict[x]=worlddict[x]
+                               if not portage.isvalidatom(x):
+                                       world_problems = True
+                               elif not portage.db["/"]["vartree"].dbapi.match(x):
+                                       world_problems = True
+                               elif not portage.db["/"]["porttree"].dbapi.match(x):
+                                       world_problems = True
                                else:
-                                       print "\n*** Package in world file is not installed: "+x
+                                       sysdict[x]=worlddict[x]
+                       if world_problems:
+                               print "\n!!! Problems have been detected with your world file"
+                               print "!!! Please run "+green("emaint --check world")+"\n"
+                       del world_problems
+
                        mylist = sysdict.keys()
 
                for mydep in mylist: