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 1R6twQ-0000jh-7D for garchives@archives.gentoo.org; Fri, 23 Sep 2011 00:48:34 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0215921C174; Fri, 23 Sep 2011 00:48:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id C06CF21C174 for ; Fri, 23 Sep 2011 00:48:24 +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 17FC31B4015 for ; Fri, 23 Sep 2011 00:48:24 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 3DD4180042 for ; Fri, 23 Sep 2011 00:48:23 +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: bb6448785038e812b806e14d16497a1a3aacd201 Date: Fri, 23 Sep 2011 00:48:23 +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: 657d566e89405dbb0041e90e687d8498 commit: bb6448785038e812b806e14d16497a1a3aacd201 Author: Zac Medico gentoo org> AuthorDate: Fri Sep 23 00:47:48 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Sep 23 00:47:48 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dbb644878 Atom: add a with_repo method for adding a repo --- pym/portage/dep/__init__.py | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index 89b6f15..5bb6bec 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -1216,6 +1216,18 @@ class Atom(_atom_base): return Atom(self.replace(_slot_separator + self.slot, '', 1), allow_repo=3DTrue, allow_wildcard=3DTrue) =20 + def with_repo(self, repo): + if self.slot is None: + atom =3D self + else: + atom =3D remove_slot(self) + if self.slot is not None: + atom +=3D _slot_separator + slot + atom +=3D _repo_separator + repo + if self.use is not None: + atom +=3D str(self.use) + return Atom(atom, allow_repo=3DTrue, allow_wildcard=3DTrue) + def with_slot(self, slot): atom =3D remove_slot(self) + _slot_separator + slot if self.repo is not None: