From 450711a0d78a8ccc4d837cb39b85c2871d17ccf2 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 8 Nov 2011 08:13:32 -0800 Subject: tests/emerge: best/has_version with prefix EAPI --- pym/portage/tests/emerge/test_simple.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py index d108959ca..db3f496df 100644 --- a/pym/portage/tests/emerge/test_simple.py +++ b/pym/portage/tests/emerge/test_simple.py @@ -62,6 +62,21 @@ pkg_info() { einfo "called pkg_info for $CATEGORY/$PF" } +pkg_preinst() { + einfo "called pkg_preinst for $CATEGORY/$PF" + + # Test that has_version and best_version work correctly with + # prefix (involves internal ROOT -> EROOT calculation in order + # to support ROOT override via the environment with EAPIs 3 + # and later which support prefix). + if has_version $CATEGORY/$PN:$SLOT ; then + einfo "has_version detects an installed instance of $CATEGORY/$PN:$SLOT" + einfo "best_version reports that the installed instance is $(best_version $CATEGORY/$PN:$SLOT)" + else + einfo "has_version does not detect an installed instance of $CATEGORY/$PN:$SLOT" + fi +} + """ ebuilds = { -- cgit v1.2.3-1-g7c22