pkg_eb = self._pkg(
pkg.cpv, "ebuild", root_config, myrepo=pkg.repo)
except portage.exception.PackageNotFound:
- continue
+ pkg_eb_visible = False
+ for pkg_eb in self._iter_match_pkgs(pkg.root_config,
+ "ebuild", Atom("=%s" % (pkg.cpv,))):
+ if self._pkg_visibility_check(pkg_eb, \
+ allow_unstable_keywords=allow_unstable_keywords,
+ allow_license_changes=allow_license_changes):
+ pkg_eb_visible = True
+ break
+ if not pkg_eb_visible:
+ continue
else:
if not self._pkg_visibility_check(pkg_eb, \
allow_unstable_keywords=allow_unstable_keywords,
pkg.cpv, "ebuild", pkg.root_config,
myrepo=pkg.repo)
except portage.exception.PackageNotFound:
- return False
+ pkg_eb_visible = False
+ for pkg_eb in self._depgraph._iter_match_pkgs(
+ pkg.root_config, "ebuild",
+ Atom("=%s" % (pkg.cpv,))):
+ if self._depgraph._pkg_visibility_check(pkg_eb):
+ pkg_eb_visible = True
+ break
+ if not pkg_eb_visible:
+ return False
else:
if not self._depgraph._pkg_visibility_check(pkg_eb):
return False
-# Copyright 2010 Gentoo Foundation
+# Copyright 2010-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from portage.tests import TestCase
mergelist = ["dev-libs/F-1::repo1"]),
# Dependency on installed dev-libs/C-2 ebuild for which ebuild is
- # not available from the same repo should not unnecessarily pull
- # in a different slot. It should just pull in the same slot from
- # a different repo (bug #351828).
+ # not available from the same repo should not unnecessarily
+ # reinstall the same version from a different repo.
ResolverPlaygroundTestCase(
["dev-libs/H"],
options = {"--update": True, "--deep": True},
success = True,
- mergelist = ["dev-libs/I-2"]),
+ mergelist = []),
# Check interaction between repo priority and unsatisfied
# REQUIRED_USE, for bug #350254.
"dev-libs/E-1::repo1": { },
"dev-libs/H-1": { },
"dev-libs/H-1::repo1": { },
+ "dev-libs/I-1::repo2": { "SLOT" : "1"},
+ "dev-libs/I-2::repo2": { "SLOT" : "2"},
+ "dev-libs/J-1": { "KEYWORDS": "x86", "EAPI" : "3",
+ "RDEPEND" : "|| ( dev-libs/I:2 dev-libs/I:1 )" },
#package.properties
"dev-libs/F-1": { "PROPERTIES": "bar"},
"dev-libs/Z-1::repo3": { },
}
+ installed = {
+ "dev-libs/J-1": { "RDEPEND" : "|| ( dev-libs/I:2 dev-libs/I:1 )"},
+ "dev-libs/I-2::repo1": {"SLOT" : "2"},
+ }
+
user_config = {
"package.use":
(
(
"dev-libs/E::repo1",
"dev-libs/H",
+ "dev-libs/I::repo1",
#needed for package.unmask test
"dev-libs/G",
#wildcard test
check_repo_names = True,
mergelist = ["dev-libs/E-1"]),
+ # Dependency on installed dev-libs/C-2 ebuild for which ebuild is
+ # masked from the same repo should not unnecessarily pull
+ # in a different slot. It should just pull in the same slot from
+ # a different repo (bug #351828).
+ ResolverPlaygroundTestCase(
+ ["dev-libs/J"],
+ options = {"--update": True, "--deep": True},
+ success = True,
+ mergelist = ["dev-libs/I-2"]),
+
#package.properties test
ResolverPlaygroundTestCase(
["dev-libs/F"],
success = False),
)
- playground = ResolverPlayground(ebuilds=ebuilds, user_config=user_config)
+ playground = ResolverPlayground(ebuilds=ebuilds,
+ installed=installed, user_config=user_config)
try:
for test_case in test_cases:
playground.run_TestCase(test_case)