diff options
author | Jason Stubbs <jstubbs@gentoo.org> | 2005-12-31 03:58:15 +0000 |
---|---|---|
committer | Jason Stubbs <jstubbs@gentoo.org> | 2005-12-31 03:58:15 +0000 |
commit | b1533d34a653617b0e27ae4e70eac9b155bd0520 (patch) | |
tree | 594cdc8790ec5edf95c03a3898cb21f3d0528b14 | |
parent | c86a5f1dc7fdd9c1c177e07d66c449f628756f22 (diff) | |
download | portage-b1533d34a653617b0e27ae4e70eac9b155bd0520.tar.gz portage-b1533d34a653617b0e27ae4e70eac9b155bd0520.tar.bz2 portage-b1533d34a653617b0e27ae4e70eac9b155bd0520.zip |
Unify the -p and -pv USE display functions and IUSE additions in yellow
followed by a "%" character.
svn path=/main/trunk/; revision=2504
-rwxr-xr-x | bin/emerge | 48 |
1 files changed, 16 insertions, 32 deletions
diff --git a/bin/emerge b/bin/emerge index 566556c90..a139ffc37 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1489,45 +1489,29 @@ class depgraph: p=[] totalsize=0 - if "--verbose" in myopts: - # Full USE display - def create_use_string(name, cur_iuse, cur_use, old_iuse, old_use, is_new): - usestrs = [] - for flag in cur_iuse: - suffix = "" - if flag in cur_use: - color = red - prefix = "" - else: - color = blue - prefix = "-" - if not is_new and ((flag in old_use) ^ (flag in cur_use)): - color = green - suffix = "*" - usestrs.append(color(prefix+flag)+suffix) - ret = " ".join(usestrs) - if ret: - ret = '%s="%s" ' % (name, ret) - return ret - elif "--quiet" in myopts: - # No USE display + if "--quiet" in myopts: def create_use_string(*args): return "" else: - # Changed-since-previous USE display - def create_use_string(name, cur_iuse, cur_use, old_iuse, old_use, is_new): + def create_use_string(name, cur_iuse, cur_use, old_iuse, old_use, is_new, all_flags=("--verbose" in myopts)): enabled = [] disabled = [] for flag in cur_iuse: - if flag in cur_use and flag not in old_use: - if flag in old_iuse: - enabled.append(green(flag)+"*") - else: + if flag in cur_use: + if is_new or flag in old_use and all_flags: enabled.append(red(flag)) - elif flag not in cur_use and flag in old_use: - disabled.append(green("-"+flag)+"*") - elif is_new or flag not in old_iuse: - disabled.append(blue("-"+flag)) + elif flag not in old_iuse: + enabled.append(yellow(flag)+"%") + elif flag not in old_use: + enabled.append(green(flag)+"*") + else: + if is_new or flag in old_iuse and flag not in old_use and all_flags: + disabled.append(blue("-"+flag)) + elif flag not in old_iuse: + disabled.append(yellow("-"+flag)+"%") + elif flag in old_use: + disabled.append(green("-"+flag)+"*") + enabled = " ".join(enabled) disabled = " ".join(disabled) if enabled and disabled: |