1 |
commit: 44809c14de087f87ee0fa9c5a21ec94e4787c3ce |
2 |
Author: Sebastian Luther <SebastianLuther <AT> gmx <DOT> de> |
3 |
AuthorDate: Fri Jan 28 20:34:31 2011 +0000 |
4 |
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 28 21:21:33 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=44809c14 |
7 |
|
8 |
--info: Show installed sets (bug 282250) |
9 |
|
10 |
--- |
11 |
pym/_emerge/actions.py | 11 ++++++++++- |
12 |
1 files changed, 10 insertions(+), 1 deletions(-) |
13 |
|
14 |
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py |
15 |
index 33a1f01..c88ef92 100644 |
16 |
--- a/pym/_emerge/actions.py |
17 |
+++ b/pym/_emerge/actions.py |
18 |
@@ -1295,9 +1295,13 @@ class _info_pkgs_ver(object): |
19 |
return self.ver + self.repo_suffix + self.provide_suffix |
20 |
|
21 |
def action_info(settings, trees, myopts, myfiles): |
22 |
+ |
23 |
+ root_config = trees[settings['ROOT']]['root_config'] |
24 |
+ |
25 |
print(getportageversion(settings["PORTDIR"], settings["ROOT"], |
26 |
settings.profile_path, settings["CHOST"], |
27 |
trees[settings["ROOT"]]["vartree"].dbapi)) |
28 |
+ |
29 |
header_width = 65 |
30 |
header_title = "System Settings" |
31 |
if myfiles: |
32 |
@@ -1385,6 +1389,12 @@ def action_info(settings, trees, myopts, myfiles): |
33 |
writemsg_stdout("Repositories: %s\n" % \ |
34 |
" ".join(repo.name for repo in repos)) |
35 |
|
36 |
+ world_set = root_config.sets['selected'] |
37 |
+ sets_line = "Installed sets: " |
38 |
+ sets_line += ", ".join(s for s in sorted(world_set) if s.startswith(SETPREFIX)) |
39 |
+ sets_line += "\n" |
40 |
+ writemsg_stdout(sets_line) |
41 |
+ |
42 |
if "--verbose" in myopts: |
43 |
myvars = list(settings) |
44 |
else: |
45 |
@@ -1408,7 +1418,6 @@ def action_info(settings, trees, myopts, myfiles): |
46 |
use_expand_hidden = set( |
47 |
settings.get('USE_EXPAND_HIDDEN', '').upper().split()) |
48 |
alphabetical_use = '--alphabetical' in myopts |
49 |
- root_config = trees[settings["ROOT"]]['root_config'] |
50 |
unset_vars = [] |
51 |
myvars.sort() |
52 |
for x in myvars: |