aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-01-18 17:22:20 -0800
committerZac Medico <zmedico@gentoo.org>2011-01-18 17:22:20 -0800
commit53e82dc0de30bb1339c2be5321bfb34e98d2f3f5 (patch)
tree3668e9db5ff5e55ac69dbd00e8515836c2e28b58 /pym/portage/tests
parentdepgraph: avoid updates more (diff)
downloadportage-53e82dc0de30bb1339c2be5321bfb34e98d2f3f5.tar.gz
portage-53e82dc0de30bb1339c2be5321bfb34e98d2f3f5.tar.bz2
portage-53e82dc0de30bb1339c2be5321bfb34e98d2f3f5.zip
depgraph: don't reinstall for changed repo
Diffstat (limited to 'pym/portage/tests')
-rw-r--r--pym/portage/tests/resolver/test_multirepo.py32
1 files changed, 26 insertions, 6 deletions
diff --git a/pym/portage/tests/resolver/test_multirepo.py b/pym/portage/tests/resolver/test_multirepo.py
index 542bdd594..a4b905e69 100644
--- a/pym/portage/tests/resolver/test_multirepo.py
+++ b/pym/portage/tests/resolver/test_multirepo.py
@@ -1,4 +1,4 @@
-# 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
@@ -129,14 +129,13 @@ class MultirepoTestCase(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.
@@ -180,6 +179,10 @@ class MultirepoTestCase(TestCase):
"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"},
@@ -193,6 +196,11 @@ class MultirepoTestCase(TestCase):
"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":
(
@@ -210,6 +218,7 @@ class MultirepoTestCase(TestCase):
(
"dev-libs/E::repo1",
"dev-libs/H",
+ "dev-libs/I::repo1",
#needed for package.unmask test
"dev-libs/G",
#wildcard test
@@ -263,6 +272,16 @@ class MultirepoTestCase(TestCase):
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"],
@@ -286,7 +305,8 @@ class MultirepoTestCase(TestCase):
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)