diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-12-29 01:57:19 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-12-29 01:57:19 +0000 |
commit | d170ae80cd77899073444dc4f77016ec36825bdf (patch) | |
tree | e8c4c73bac20f441dfac2d14db10159fc36a4ff9 | |
parent | af6fd60bbd8b8bfbf1bd0be0a856a804e1fe1f4d (diff) | |
download | portage-d170ae80cd77899073444dc4f77016ec36825bdf.tar.gz portage-d170ae80cd77899073444dc4f77016ec36825bdf.tar.bz2 portage-d170ae80cd77899073444dc4f77016ec36825bdf.zip |
For bug #159161, make emerge --info show USE_EXPAND flags similar to the way it does in merge list output.
svn path=/main/trunk/; revision=5411
-rwxr-xr-x | bin/emerge | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/bin/emerge b/bin/emerge index cb7b061d5..9a3819505 100755 --- a/bin/emerge +++ b/bin/emerge @@ -4187,8 +4187,24 @@ def action_info(settings, trees, myopts, myfiles): unset_vars = [] myvars.sort() for x in myvars: - if settings.has_key(x): - print x+'="'+settings[x]+'"' + if x in settings: + if x != "USE": + print '%s="%s"' % (x, settings[x]) + else: + use = set(settings["USE"].split()) + use_expand = settings["USE_EXPAND"].split() + use_expand.sort() + for varname in use_expand: + flag_prefix = varname.lower() + "_" + for f in list(use): + if f.startswith(flag_prefix): + use.remove(f) + print 'USE="%s"' % " ".join(use), + for varname in use_expand: + myval = settings.get(varname) + if myval: + print '%s="%s"' % (varname, myval), + print else: unset_vars.append(x) if unset_vars: |