aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-06 19:56:04 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-06 19:56:04 +0000
commita426609bcecd6e4fff490582e86703262ce2e170 (patch)
treec2b7a03ab679631aa43f97b568ab65fb4549b372
parent31e675b431d0b5719c83c1ac43b88eb74773785f (diff)
downloadpaludis-a426609bcecd6e4fff490582e86703262ce2e170.tar.gz
paludis-a426609bcecd6e4fff490582e86703262ce2e170.tar.xz
For portageq emulation, canonicalise the paths when checking that the current ROOT is being queried
-rw-r--r--ebuild/portage_stubs.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/ebuild/portage_stubs.bash b/ebuild/portage_stubs.bash
index f58b666..e51cd3d 100644
--- a/ebuild/portage_stubs.bash
+++ b/ebuild/portage_stubs.bash
@@ -30,7 +30,7 @@ portageq()
{
# \todo Make this suck less...
if [[ "$1" == "has_version" ]] ; then
- if [[ "$2" != "$ROOT" ]] ; then
+ if [[ "$(readlink -f $2 )" != "$(readlink -f $ROOT )" ]] ; then
eerror "Error emulating 'portageq $@':"
die "portageq has_version emulation only works on current ROOT"
else
@@ -38,7 +38,7 @@ portageq()
has_version "$@"
fi
elif [[ "$1" == "best_version" ]] ; then
- if [[ "$2" != "$ROOT" ]] ; then
+ if [[ "$(readlink -f $2 )" != "$(readlink -f $ROOT )" ]] ; then
eerror "Error emulating 'portageq $@':"
die "portageq best_version emulation only works on current ROOT"
else