From 0fd45502c0d97f21c455053be6a6309e9aa8bb10 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 5 Nov 2007 08:01:54 +0000 Subject: [PATCH] Add support for package sets in WorldHandler. svn path=/main/trunk/; revision=8431 --- bin/emaint | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/emaint b/bin/emaint index 64af1f01a..66a4dddf9 100755 --- a/bin/emaint +++ b/bin/emaint @@ -32,13 +32,23 @@ class WorldHandler(object): self.found = os.access(self.world_file, os.R_OK) vardb = portage.db[myroot]["vartree"].dbapi + from portage.sets import make_default_config, SETPREFIX + setconfig = make_default_config(portage.settings, portage.db[myroot]) + sets = setconfig.getSetsWithAliases() world_atoms = open(self.world_file).read().split() maxval = len(world_atoms) if onProgress: onProgress(maxval, 0) for i, atom in enumerate(world_atoms): if not portage.isvalidatom(atom): - self.invalid.append(atom) + if atom.startswith(SETPREFIX): + s = atom[len(SETPREFIX):] + if s in sets: + self.okay.append(atom) + else: + self.not_installed.append(atom) + else: + self.invalid.append(atom) if onProgress: onProgress(maxval, i+1) continue -- 2.26.2