--- portage-prefix-2.1.14/bin/ebuild.sh.orig 2006-07-19 22:19:43.000000000 +0200 +++ portage-prefix-2.1.14/bin/ebuild.sh 2006-07-19 22:20:01.000000000 +0200 @@ -169,7 +169,7 @@ fi # return shell-true/shell-false if exists. # Takes single depend-type atoms. - if @PORTAGE_BASE@/bin/portageq 'has_version' "${ROOT}" "$1"; then + if portageq 'has_version' "${ROOT%${EPREFIX}/}/" "$1"; then return 0 else return 1 @@ -180,7 +180,7 @@ if [ "${EBUILD_PHASE}" == "depend" ]; then die "portageq calls are not allowed in the global scope" fi - @PORTAGE_BASE@/bin/portageq "$@" + ROOT="${ROOT%${EPREFIX}/}/" @PORTAGE_BASE@/bin/portageq "$@" } @@ -195,7 +195,7 @@ fi # returns the best/most-current match. # Takes single depend-type atoms. - @PORTAGE_BASE@/bin/portageq 'best_version' "${ROOT}" "$1" + portageq 'best_version' "${ROOT%${EPREFIX}/}/" "$1" } with_bindir() {