rename getmaskingreason() to getpmaskcomment() to clarify its function, report each...
authorMarius Mauch <genone@gentoo.org>
Thu, 26 Oct 2006 15:43:40 +0000 (15:43 -0000)
committerMarius Mauch <genone@gentoo.org>
Thu, 26 Oct 2006 15:43:40 +0000 (15:43 -0000)
svn path=/main/trunk/; revision=4823

bin/emerge
pym/portage.py

index e98ea6211c6e47dfaef4de9689a4aa913c84f1fd..440a6cb8712bb5eeed6901790bf942d2b5c9ea7e 100755 (executable)
@@ -1362,11 +1362,12 @@ class depgraph:
                                                                mreasons = portage.getmaskingstatus(p,
                                                                        settings=pkgsettings, portdb=portdb)
                                                                print "- "+p+" (masked by: "+string.join(mreasons, ", ")+")"
-                                                               comment = portage.getmaskingreason(p,
-                                                                       settings=pkgsettings, portdb=portdb)
-                                                               if comment and comment != oldcomment:
-                                                                       print comment
-                                                                       oldcomment = comment
+                                                               if "package.mask" in mreasons:
+                                                                       comment = portage.getpmaskcomment(p,
+                                                                               settings=pkgsettings, portdb=portdb)
+                                                                       if comment and comment != oldcomment:
+                                                                               print comment
+                                                                               oldcomment = comment
                                                        print
                                                        print "For more information, see MASKED PACKAGES section in the emerge man page or "
                                                        print "refer to the Gentoo Handbook."
index 9583630421ed5d0af51b808015f91ea49a7c8ab2..165b05041675f0cd603288fed5e4bd8f3777045d 100644 (file)
@@ -3832,7 +3832,7 @@ def cpv_expand(mycpv, mydb=None, use_cache=1, settings=None):
        else:
                return mykey
 
-def getmaskingreason(mycpv, settings=None, portdb=None):
+def getpmaskcomment(mycpv, settings=None, portdb=None):
        from portage_util import grablines
        if settings is None:
                settings = globals()["settings"]
@@ -3877,6 +3877,8 @@ def getmaskingreason(mycpv, settings=None, portdb=None):
                                                return comment
                                        i = i + 1
        return None
+# Compability name
+getmaskingreason=getpmaskcomment
 
 def getmaskingstatus(mycpv, settings=None, portdb=None):
        if settings is None:
@@ -3965,7 +3967,7 @@ def getmaskingstatus(mycpv, settings=None, portdb=None):
                license_req = dep_check(mylicense, None, settings,
                        str_matches=str_matches)[1]
                if license_req:
-                       rValue.append(" ".join(license_req) + " license(s)")
+                       rValue += [x+" license" for x in license_req]
        
        return rValue