From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PuXX2-0001o9-CO for garchives@archives.gentoo.org; Tue, 01 Mar 2011 21:55:15 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A0B3E1C04B; Tue, 1 Mar 2011 21:54:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 75BE91C04B for ; Tue, 1 Mar 2011 21:54:53 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0E14F2AC133 for ; Tue, 1 Mar 2011 21:54:53 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 71EC68006E for ; Tue, 1 Mar 2011 21:54:52 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:2.1.9 commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/actions.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: f64dd53bad86a2f91f1b152cfcfa9c4f6eb0b13f Date: Tue, 1 Mar 2011 21:54:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 647ca146fe49ffb8f06172d6263ea9e2 commit: f64dd53bad86a2f91f1b152cfcfa9c4f6eb0b13f Author: Zac Medico gentoo org> AuthorDate: Tue Mar 1 21:52:04 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Mar 1 21:54:13 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Df64dd53b action_deselect: expand cat against world atoms --- pym/_emerge/actions.py | 36 ++++++++++++++++++++++++------------ 1 files changed, 24 insertions(+), 12 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index ea8fc42..b683a37 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -1218,25 +1218,37 @@ def action_deselect(settings, trees, opts, atoms)= : level=3Dlogging.ERROR, noiselevel=3D-1) return 1 =20 - vardb =3D root_config.trees['vartree'].dbapi - expanded_atoms =3D set(atoms) - from portage.dep import Atom - for atom in atoms: - if not atom.startswith(SETPREFIX): - for cpv in vardb.match(atom): - slot, =3D vardb.aux_get(cpv, ['SLOT']) - if not slot: - slot =3D '0' - expanded_atoms.add(Atom('%s:%s' % (portage.cpv_getkey(cpv), slot))) - pretend =3D '--pretend' in opts locked =3D False if not pretend and hasattr(world_set, 'lock'): world_set.lock() locked =3D True try: - discard_atoms =3D set() world_set.load() + world_atoms =3D world_set.getAtoms() + vardb =3D root_config.trees["vartree"].dbapi + expanded_atoms =3D set(atoms) + + for atom in atoms: + if not atom.startswith(SETPREFIX): + if atom.cp.startswith("null/"): + # try to expand category from world set + null_cat, pn =3D portage.catsplit(atom.cp) + for world_atom in world_atoms: + cat, world_pn =3D portage.catsplit(world_atom.cp) + if pn =3D=3D world_pn: + expanded_atoms.add( + Atom(atom.replace("null", cat, 1), + allow_repo=3DTrue, allow_wildcard=3DTrue)) + + for cpv in vardb.match(atom): + slot, =3D vardb.aux_get(cpv, ["SLOT"]) + if not slot: + slot =3D "0" + expanded_atoms.add(Atom("%s:%s" % \ + (portage.cpv_getkey(cpv), slot))) + + discard_atoms =3D set() for atom in world_set: for arg_atom in expanded_atoms: if arg_atom.startswith(SETPREFIX):