From d170ae80cd77899073444dc4f77016ec36825bdf Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 29 Dec 2006 01:57:19 +0000 Subject: [PATCH] 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 --- bin/emerge | 20 ++++++++++++++++++-- 1 file 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: -- 2.26.2