1 |
commit: 844998daa50e9db0a337bc0cf9f665d224779665 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 1 17:49:07 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 1 17:52:02 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=844998da |
7 |
|
8 |
SimpleEmergeTestCase: EAPI 7_pre1 has/best_version -b |
9 |
|
10 |
pym/portage/tests/emerge/test_simple.py | 18 ++++++++++++------ |
11 |
1 file changed, 12 insertions(+), 6 deletions(-) |
12 |
|
13 |
diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py |
14 |
index f99c77927..17dcd548d 100644 |
15 |
--- a/pym/portage/tests/emerge/test_simple.py |
16 |
+++ b/pym/portage/tests/emerge/test_simple.py |
17 |
@@ -69,6 +69,12 @@ pkg_info() { |
18 |
} |
19 |
|
20 |
pkg_preinst() { |
21 |
+ local root_arg |
22 |
+ if ___eapi_best_version_and_has_version_support_-b_-d_-r; then |
23 |
+ root_arg="-b" |
24 |
+ else |
25 |
+ root_arg="--host-root" |
26 |
+ fi |
27 |
einfo "called pkg_preinst for $CATEGORY/$PF" |
28 |
|
29 |
# Test that has_version and best_version work correctly with |
30 |
@@ -82,11 +88,11 @@ pkg_preinst() { |
31 |
einfo "has_version does not detect an installed instance of $CATEGORY/$PN:$SLOT" |
32 |
fi |
33 |
if [[ ${EPREFIX} != ${PORTAGE_OVERRIDE_EPREFIX} ]] ; then |
34 |
- if has_version --host-root $CATEGORY/$PN:$SLOT ; then |
35 |
- einfo "has_version --host-root detects an installed instance of $CATEGORY/$PN:$SLOT" |
36 |
- einfo "best_version --host-root reports that the installed instance is $(best_version $CATEGORY/$PN:$SLOT)" |
37 |
+ if has_version ${root_arg} $CATEGORY/$PN:$SLOT ; then |
38 |
+ einfo "has_version ${root_arg} detects an installed instance of $CATEGORY/$PN:$SLOT" |
39 |
+ einfo "best_version ${root_arg} reports that the installed instance is $(best_version $CATEGORY/$PN:$SLOT)" |
40 |
else |
41 |
- einfo "has_version --host-root does not detect an installed instance of $CATEGORY/$PN:$SLOT" |
42 |
+ einfo "has_version ${root_arg} does not detect an installed instance of $CATEGORY/$PN:$SLOT" |
43 |
fi |
44 |
fi |
45 |
} |
46 |
@@ -110,12 +116,12 @@ pkg_preinst() { |
47 |
"MISC_CONTENT": install_something, |
48 |
}, |
49 |
"dev-libs/C-1": { |
50 |
- "EAPI" : "6", |
51 |
+ "EAPI" : "7_pre1", |
52 |
"KEYWORDS": "~x86", |
53 |
"RDEPEND": "dev-libs/D[flag]", |
54 |
}, |
55 |
"dev-libs/D-1": { |
56 |
- "EAPI" : "6", |
57 |
+ "EAPI" : "7_pre1", |
58 |
"KEYWORDS": "~x86", |
59 |
"IUSE" : "flag", |
60 |
}, |