Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/library/standard/
Date: Tue, 26 Jul 2011 17:34:14
Message-Id: f5871a66f660b2bad4cee94c80db2e65f83d7091.mgorny@gentoo
1 commit: f5871a66f660b2bad4cee94c80db2e65f83d7091
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 26 17:34:20 2011 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 26 17:34:20 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=f5871a66
7
8 Use new gentoopm API to check RDEPEND=${DEPEND} fallback.
9
10 ---
11 pmstestsuite/library/standard/special_vars.py | 10 ++++++++--
12 1 files changed, 8 insertions(+), 2 deletions(-)
13
14 diff --git a/pmstestsuite/library/standard/special_vars.py b/pmstestsuite/library/standard/special_vars.py
15 index 3b3afba..8c35f08 100644
16 --- a/pmstestsuite/library/standard/special_vars.py
17 +++ b/pmstestsuite/library/standard/special_vars.py
18 @@ -34,8 +34,14 @@ class RDependFallbackTest(DBusEbuildTestCase):
19 if not DBusEbuildTestCase.check_dbus_result(self, output, pm):
20 return False
21
22 - meta = pm.installed[self.atom(pm)].metadata
23 - return ((self.eapi == 4) != ('virtual/libc' in meta.RDEPEND.split()))
24 + def _has_our_pkg(deps):
25 + for d in deps:
26 + if d.key == 'virtual/libc':
27 + return True
28 + return False
29 +
30 + rdep = pm.installed[self.atom(pm)].run_dependencies
31 + return ((self.eapi == 4) != _has_our_pkg(rdep))
32
33 class DefinedPhasesTest(DBusEbuildTestCase):
34 """ Test whether DEFINED_PHASES are declared in EAPI 4. """