From: Zac Medico Date: Mon, 5 Nov 2007 08:01:54 +0000 (-0000) Subject: Add support for package sets in WorldHandler. X-Git-Tag: v2.2_pre1~439 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0fd45502c0d97f21c455053be6a6309e9aa8bb10;p=portage.git Add support for package sets in WorldHandler. svn path=/main/trunk/; revision=8431 --- 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