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 1R2Oap-0002yh-Do for garchives@archives.gentoo.org; Sat, 10 Sep 2011 14:31:41 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 342B821C073; Sat, 10 Sep 2011 14:31:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id EF7AA21C04F for ; Sat, 10 Sep 2011 14:31:31 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5B2501B4008 for ; Sat, 10 Sep 2011 14:31:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id B0D5380042 for ; Sat, 10 Sep 2011 14:31:30 +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:master commit in: pym/portage/dep/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dep/__init__.py X-VCS-Directories: pym/portage/dep/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: c626e20620cb7004d0fe55e18288a0f15fcb48d7 Date: Sat, 10 Sep 2011 14:31:30 +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: a94007452071b9ff91be697ee242029d commit: c626e20620cb7004d0fe55e18288a0f15fcb48d7 Author: Zac Medico gentoo org> AuthorDate: Sat Sep 10 14:25:19 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Sep 10 14:25:19 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dc626e206 Atom: add a with_slot method for adding a slot --- pym/portage/dep/__init__.py | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index fd5ad30..89b6f15 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -1216,6 +1216,14 @@ class Atom(_atom_base): return Atom(self.replace(_slot_separator + self.slot, '', 1), allow_repo=3DTrue, allow_wildcard=3DTrue) =20 + def with_slot(self, slot): + atom =3D remove_slot(self) + _slot_separator + slot + if self.repo is not None: + atom +=3D _repo_separator + self.repo + if self.use is not None: + atom +=3D str(self.use) + return Atom(atom, allow_repo=3DTrue, allow_wildcard=3DTrue) + def __setattr__(self, name, value): raise AttributeError("Atom instances are immutable", self.__class__, name, value)