summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-10-06 23:32:01 -0700
committerZac Medico <zmedico@gentoo.org>2010-10-06 23:32:01 -0700
commit47c8155376417b105651f55f1e4d0669b3e89cf5 (patch)
tree186f7ef154cbd3f457885e790bf192304e474812
parentf6298b50b16bb04cf880a70ec3d651341f8a6dff (diff)
downloadportage-47c8155376417b105651f55f1e4d0669b3e89cf5.tar.gz
portage-47c8155376417b105651f55f1e4d0669b3e89cf5.tar.bz2
portage-47c8155376417b105651f55f1e4d0669b3e89cf5.zip
Make PackageArg use repo atoms for ebuilds.
-rw-r--r--pym/_emerge/PackageArg.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/pym/_emerge/PackageArg.py b/pym/_emerge/PackageArg.py
index a169845cc..02ea03495 100644
--- a/pym/_emerge/PackageArg.py
+++ b/pym/_emerge/PackageArg.py
@@ -1,13 +1,18 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from _emerge.DependencyArg import DependencyArg
import portage
from portage._sets.base import InternalPackageSet
+from portage.dep import _repo_separator
class PackageArg(DependencyArg):
def __init__(self, package=None, **kwargs):
DependencyArg.__init__(self, **kwargs)
self.package = package
- self.atom = portage.dep.Atom("=" + package.cpv)
- self.pset = InternalPackageSet(initial_atoms=(self.atom,))
+ atom = "=" + package.cpv
+ if package.type_name == 'ebuild':
+ atom += _repo_separator + package.repo
+ self.atom = portage.dep.Atom(atom, allow_repo=True)
+ self.pset = InternalPackageSet(initial_atoms=(self.atom,),
+ allow_repo=True)