diff options
Diffstat (limited to 'pym/emerge')
-rw-r--r-- | pym/emerge/__init__.py | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 845c5508e..3be9614b5 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -2515,6 +2515,7 @@ class depgraph(object): else: mydbapi = self.trees[myroot][self.pkg_tree_map[pkg_type]].dbapi pkg_status = x[3] + pkg_merge = ordered and pkg_status != "nomerge" binary_package = True if "ebuild" == pkg_type: if "merge" == x[3] or \ @@ -2688,7 +2689,7 @@ class depgraph(object): if verbosity == 3: # size verbose mysize=0 - if x[0] == "ebuild" and ordered and x[-1] != "nomerge": + if pkg_type == "ebuild" and pkg_merge: try: myfilesdict = portdb.getfetchsizes(pkg_key, useflags=self.useFlags[myroot][pkg_key], @@ -2748,23 +2749,32 @@ class depgraph(object): myoldbest=myoldbest[:-3] myoldbest=blue("["+myoldbest+"]") - if xs[0] in worldlist: - pkgprint = bold - else: - def pkgprint(pkg): - return pkg + pkg_cp = xs[0] + pkg_world = pkg_cp in worldlist + + def pkgprint(pkg): + if pkg_merge: + if pkg_world: + return colorize("PKG_MERGE_WORLD", pkg) + else: + return colorize("PKG_MERGE", pkg) + else: + if pkg_world: + return colorize("PKG_NOMERGE_WORLD", pkg) + else: + return colorize("PKG_NOMERGE", pkg) if x[1]!="/": if myoldbest: myoldbest +=" " if "--columns" in self.myopts: if "--quiet" in self.myopts: - myprint=addl+" "+indent+darkgreen(pkgprint(xs[0])) + myprint=addl+" "+indent+pkgprint(pkg_cp) myprint=myprint+darkblue(" "+xs[1]+xs[2])+" " myprint=myprint+myoldbest myprint=myprint+darkgreen("to "+x[1]) else: - myprint="["+x[0]+" "+addl+"] "+indent+darkgreen(pkgprint(xs[0])) + myprint="["+pkgprint(pkg_type)+" "+addl+"] "+indent+pkgprint(pkg_cp) if (newlp-nc_len(myprint)) > 0: myprint=myprint+(" "*(newlp-nc_len(myprint))) myprint=myprint+"["+darkblue(xs[1]+xs[2])+"] " @@ -2773,21 +2783,21 @@ class depgraph(object): myprint=myprint+myoldbest myprint=myprint+darkgreen("to "+x[1])+" "+verboseadd else: - if x[-1] == "nomerge" or not ordered: - myprint = darkblue("[nomerge ] ") + if not pkg_merge: + myprint = "[%s ] " % pkgprint("nomerge") else: myprint = "[" + pkg_type + " " + addl + "] " - myprint += indent + darkgreen(pkgprint(pkg_key)) + " " + \ + myprint += indent + pkgprint(pkg_key) + " " + \ myoldbest + darkgreen("to " + myroot) + " " + \ verboseadd else: if "--columns" in self.myopts: if "--quiet" in self.myopts: - myprint=addl+" "+indent+darkgreen(pkgprint(xs[0])) + myprint=addl+" "+indent+pkgprint(pkg_cp) myprint=myprint+" "+green(xs[1]+xs[2])+" " myprint=myprint+myoldbest else: - myprint="["+x[0]+" "+addl+"] "+indent+darkgreen(pkgprint(xs[0])) + myprint="["+pkgprint(pkg_type)+" "+addl+"] "+indent+pkgprint(pkg_cp) if (newlp-nc_len(myprint)) > 0: myprint=myprint+(" "*(newlp-nc_len(myprint))) myprint=myprint+green(" ["+xs[1]+xs[2]+"] ") @@ -2795,10 +2805,10 @@ class depgraph(object): myprint=myprint+(" "*(oldlp-nc_len(myprint))) myprint=myprint+myoldbest+" "+verboseadd else: - if x[-1] == "nomerge" or not ordered: - myprint=darkblue("[nomerge ] "+indent+pkgprint(x[2])+" "+myoldbest+" ")+verboseadd + if not pkg_merge: + myprint="["+pkgprint("nomerge")+" ] "+indent+pkgprint(pkg_key)+" "+myoldbest+" "+verboseadd else: - myprint="["+x[0]+" "+addl+"] "+indent+darkgreen(pkgprint(x[2]))+" "+myoldbest+" "+verboseadd + myprint="["+pkgprint(pkg_type)+" "+addl+"] "+indent+pkgprint(pkg_key)+" "+myoldbest+" "+verboseadd p.append(myprint) mysplit = portage.pkgsplit(x[2]) |