summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2011-01-28 21:34:31 +0100
committerZac Medico <zmedico@gentoo.org>2011-01-28 13:21:33 -0800
commit44809c14de087f87ee0fa9c5a21ec94e4787c3ce (patch)
tree7984a6a14abaef3799ce7bf8a379f93c25c78c4d
parent7c231888d1d5ccac470d5f039be57ac0e5934f6c (diff)
downloadportage-44809c14de087f87ee0fa9c5a21ec94e4787c3ce.tar.gz
portage-44809c14de087f87ee0fa9c5a21ec94e4787c3ce.tar.bz2
portage-44809c14de087f87ee0fa9c5a21ec94e4787c3ce.zip
--info: Show installed sets (bug 282250)
-rw-r--r--pym/_emerge/actions.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 33a1f013f..c88ef9222 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -1295,9 +1295,13 @@ class _info_pkgs_ver(object):
return self.ver + self.repo_suffix + self.provide_suffix
def action_info(settings, trees, myopts, myfiles):
+
+ root_config = trees[settings['ROOT']]['root_config']
+
print(getportageversion(settings["PORTDIR"], settings["ROOT"],
settings.profile_path, settings["CHOST"],
trees[settings["ROOT"]]["vartree"].dbapi))
+
header_width = 65
header_title = "System Settings"
if myfiles:
@@ -1385,6 +1389,12 @@ def action_info(settings, trees, myopts, myfiles):
writemsg_stdout("Repositories: %s\n" % \
" ".join(repo.name for repo in repos))
+ world_set = root_config.sets['selected']
+ sets_line = "Installed sets: "
+ sets_line += ", ".join(s for s in sorted(world_set) if s.startswith(SETPREFIX))
+ sets_line += "\n"
+ writemsg_stdout(sets_line)
+
if "--verbose" in myopts:
myvars = list(settings)
else:
@@ -1408,7 +1418,6 @@ def action_info(settings, trees, myopts, myfiles):
use_expand_hidden = set(
settings.get('USE_EXPAND_HIDDEN', '').upper().split())
alphabetical_use = '--alphabetical' in myopts
- root_config = trees[settings["ROOT"]]['root_config']
unset_vars = []
myvars.sort()
for x in myvars: