diff options
-rw-r--r-- | pym/portage/tests/emerge/test_simple.py | 15 |
1 files changed, 15 insertions, 0 deletions
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 = { |