From: Zac Medico Date: Tue, 8 Nov 2011 16:13:32 +0000 (-0800) Subject: tests/emerge: best/has_version with prefix EAPI X-Git-Tag: v2.2.0_alpha73~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=450711a0d78a8ccc4d837cb39b85c2871d17ccf2;p=portage.git tests/emerge: best/has_version with prefix EAPI --- 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 = {