From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/, pym/_emerge/
Date: Thu, 26 May 2011 06:18:41 +0000 (UTC) [thread overview]
Message-ID: <75b0a8aed8e56f02c0b455b4ee31fdc7e2b464cf.zmedico@gentoo> (raw)
commit: 75b0a8aed8e56f02c0b455b4ee31fdc7e2b464cf
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 23:48:42 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 04:24:53 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=75b0a8ae
_add_pkg_dep_string: handle satisfied virt_dep
This fixes a problem with the asap LIBC_PACKAGE_ATOM test case for
bug #303567.
---
pym/_emerge/depgraph.py | 11 +++++++++++
pym/portage/tests/resolver/test_merge_order.py | 10 +++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 4cb4593..8307e8f 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -1341,6 +1341,17 @@ class depgraph(object):
(virt_pkg.cpv, [str(x) for x in atoms]),
noiselevel=-1, level=logging.DEBUG)
+ inst_pkgs = vardb.match_pkgs(atom)
+ if inst_pkgs:
+ for inst_pkg in inst_pkgs:
+ if self._pkg_visibility_check(inst_pkg):
+ # highest visible
+ virt_dep.priority.satisfied = inst_pkg
+ break
+ if not virt_dep.priority.satisfied:
+ # none visible, so use highest
+ virt_dep.priority.satisfied = inst_pkgs[0]
+
if not self._add_pkg(virt_pkg, virt_dep):
return 0
diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index 1b7cddd..ee3c786 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -127,18 +127,22 @@ class MergeOrderTestCase(TestCase):
},
"sys-libs/glibc-2.11" : {
"DEPEND" : "virtual/os-headers",
+ "RDEPEND": "",
},
"sys-libs/glibc-2.13" : {
"DEPEND" : "virtual/os-headers",
+ "RDEPEND": "",
},
"virtual/os-headers-0" : {
"RDEPEND" : "sys-kernel/linux-headers",
},
"sys-kernel/linux-headers-2.6.38": {
"DEPEND" : "app-arch/xz-utils",
+ "RDEPEND": "",
},
"sys-kernel/linux-headers-2.6.39": {
"DEPEND" : "app-arch/xz-utils",
+ "RDEPEND": "",
},
"app-arch/xz-utils-5.0.1" : {},
"app-arch/xz-utils-5.0.2" : {},
@@ -182,12 +186,14 @@ class MergeOrderTestCase(TestCase):
},
"sys-libs/glibc-2.11" : {
"DEPEND" : "virtual/os-headers",
+ "RDEPEND": "",
},
"virtual/os-headers-0" : {
"RDEPEND" : "sys-kernel/linux-headers",
},
"sys-kernel/linux-headers-2.6.38": {
"DEPEND" : "app-arch/xz-utils",
+ "RDEPEND": "",
},
"app-arch/xz-utils-5.0.1" : {},
}
@@ -321,14 +327,12 @@ class MergeOrderTestCase(TestCase):
# Test that OS_HEADERS_PACKAGE_ATOM and LIBC_PACKAGE_ATOM
# are merged asap, in order to account for implicit
# dependencies. See bug #303567.
- # TODO: optimize this to ensure that glibc comes before xz-utils
ResolverPlaygroundTestCase(
["app-arch/xz-utils", "sys-kernel/linux-headers", "sys-libs/glibc"],
options = {"--complete-graph" : True},
success = True,
all_permutations = True,
- ambiguous_merge_order = True,
- mergelist = ['sys-kernel/linux-headers-2.6.39', ('app-arch/xz-utils-5.0.2', 'sys-libs/glibc-2.13')]),
+ mergelist = ['sys-kernel/linux-headers-2.6.39', 'sys-libs/glibc-2.13', 'app-arch/xz-utils-5.0.2']),
)
playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)
next reply other threads:[~2011-05-26 6:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-26 6:18 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-05-26 6:18 [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/tests/resolver/, pym/_emerge/ Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-04 20:03 Zac Medico
2011-02-14 4:31 Zac Medico
2011-02-14 4:31 Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=75b0a8aed8e56f02c0b455b4ee31fdc7e2b464cf.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox