aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/0/portage_stubs.bash
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2012-09-08 18:07:23 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2012-09-08 19:18:14 +0100
commitff863a7160da5dcbe8a007847a0d82aabc9580e4 (patch)
tree8161890f79a134a3cece02a4c0d46a7088d8a4bf /paludis/repositories/e/ebuild/0/portage_stubs.bash
parent714dd6f3faaf0d78ff1b531eeecfa87a970d4d69 (diff)
downloadpaludis-ff863a7160da5dcbe8a007847a0d82aabc9580e4.tar.gz
paludis-ff863a7160da5dcbe8a007847a0d82aabc9580e4.tar.xz
Support {best,has}_version --host-root for EAPI 5
Diffstat (limited to 'paludis/repositories/e/ebuild/0/portage_stubs.bash')
-rw-r--r--paludis/repositories/e/ebuild/0/portage_stubs.bash14
1 files changed, 12 insertions, 2 deletions
diff --git a/paludis/repositories/e/ebuild/0/portage_stubs.bash b/paludis/repositories/e/ebuild/0/portage_stubs.bash
index 49169322e..de8038cff 100644
--- a/paludis/repositories/e/ebuild/0/portage_stubs.bash
+++ b/paludis/repositories/e/ebuild/0/portage_stubs.bash
@@ -60,16 +60,26 @@ portageq()
best_version()
{
+ local type=--root
+ if [[ -n ${PALUDIS_BEST_HAS_VERSION_HOST_ROOT} && ${1} == --host-root ]] ; then
+ type=--slash
+ shift
+ fi
[[ "${#@}" -ne 1 ]] && die "$0 should take exactly one arg"
- local r=$(paludis_pipe_command BEST_VERSION "$EAPI" --root "$1" )
+ local r=$(paludis_pipe_command BEST_VERSION "$EAPI" $type "$1" )
echo ${r#*;}
return ${r%%;*}
}
has_version()
{
+ local type=--root
+ if [[ -n ${PALUDIS_BEST_HAS_VERSION_HOST_ROOT} && ${1} == --host-root ]] ; then
+ type=--slash
+ shift
+ fi
[[ "${#@}" -ne 1 ]] && die "$0 should take exactly one arg"
- local r=$(paludis_pipe_command HAS_VERSION "$EAPI" --root "$1" )
+ local r=$(paludis_pipe_command HAS_VERSION "$EAPI" $type "$1" )
return ${r%%;*}
}