diff options
author | 2003-12-25 02:42:28 +0000 | |
---|---|---|
committer | 2003-12-25 02:42:28 +0000 | |
commit | e5f1862d5a3dad99182db2910c4430d97540a040 (patch) | |
tree | b32b0ff24396e288cc0b5f53c75512f4fd2f58b8 | |
parent | Just tinkering... (diff) | |
download | portage-cvs-e5f1862d5a3dad99182db2910c4430d97540a040.tar.gz portage-cvs-e5f1862d5a3dad99182db2910c4430d97540a040.tar.bz2 portage-cvs-e5f1862d5a3dad99182db2910c4430d97540a040.zip |
Added OVERLAY directories display for --verbose.
-rw-r--r-- | ChangeLog | 4 | ||||
-rwxr-xr-x | bin/emerge | 30 |
2 files changed, 26 insertions, 8 deletions
@@ -1,7 +1,9 @@ # ChangeLog for Portage; the Gentoo Linux ports system # Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Id: ChangeLog,v 1.502 2003/12/24 17:51:23 carpaski Exp $ +# $Id: ChangeLog,v 1.503 2003/12/25 02:42:28 nakano Exp $ + 25 Dec 2003; Masatomo Nakano <nakano@gentoo.org> emerge: Added OVERLAY + directories display for --verbose. *portage-2.0.50_pre8 (24 Dec 2003): API change + enhancements @@ -1,7 +1,7 @@ #!/usr/bin/python -O # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/emerge,v 1.240 2003/12/24 09:29:04 carpaski Exp $ +# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/emerge,v 1.241 2003/12/25 02:42:28 nakano Exp $ import os,sys os.environ["PORTAGE_CALLER"]="emerge" @@ -1125,6 +1125,9 @@ class depgraph: p=[] intree=False totalsize=0 + + if "--verbose" in myopts: + overlays=string.split(portage.settings['PORTDIR_OVERLAY']) for x in mylist: fetch=" " @@ -1190,9 +1193,9 @@ class depgraph: myoldbest=myoldbest[:-3] myoldbest=blue("["+myoldbest+"]") - iuse="" - mysize=0 + verboseadd="" if "--verbose" in myopts: + # iuse verbose try: iuse_split = string.split(portage.portdb.aux_get(x[2],["IUSE"])[0], " ") except: @@ -1200,6 +1203,7 @@ class depgraph: portage.writemsg("!!! %s\n" % x) iuse_split = [] iuse_split.sort() + iuse="" for ebuild_iuse in iuse_split: if not ebuild_iuse: continue @@ -1209,15 +1213,21 @@ class depgraph: iuse=iuse+blue("-("+ebuild_iuse+")")+" " else: iuse=iuse+blue("-"+ebuild_iuse)+" " + verboseadd+=iuse+" " + + # size verbose + mysize=0 if x[0] == "ebuild": mysize=portage.portdb.getsize(x[2], debug=edebug) if type(mysize) == types.IntType: totalsize+=mysize + verboseadd+=format_size(mysize)+" " - if "--verbose" in myopts: - verboseadd=iuse+" "+format_size(mysize) - else: - verboseadd=iuse + # overlay verbose + file_name=portage.portdb.findname(x[2]) + dir_name=os.path.abspath(os.path.dirname(file_name)+"/../..") + if (overlays.count(dir_name)>0): + verboseadd+="*"+str(overlays.index(dir_name)+1)+" " xs=portage.pkgsplit(x[2]) if xs[2]=="r0": @@ -1302,6 +1312,12 @@ class depgraph: if "--verbose" in myopts: print print "Total size of downloads: "+format_size(totalsize) + if (overlays): + print "OVERLAY:" + y=0 + for x in overlays: + y=y+1 + print " *"+str(y)+":"+x if "--changelog" in myopts: print |