summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-03-27 07:39:57 -0700
committerZac Medico <zmedico@gentoo.org>2012-03-27 08:18:28 -0700
commit8c1ba902154aee09b1c240d5a7a541dcafb46e6c (patch)
tree5e57e5e3828df9b6a89a7718d85eed5ea141b864
parent4e2abb474f0fc624c51948f0939e3123f6382992 (diff)
downloadportage-8c1ba902154aee09b1c240d5a7a541dcafb46e6c.tar.gz
portage-8c1ba902154aee09b1c240d5a7a541dcafb46e6c.tar.bz2
portage-8c1ba902154aee09b1c240d5a7a541dcafb46e6c.zip
emerge-webrsync: use portageq from same prefix
-rw-r--r--Makefile5
-rwxr-xr-xbin/emerge-webrsync12
2 files changed, 13 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 697198ebf..c49cc669c 100644
--- a/Makefile
+++ b/Makefile
@@ -29,8 +29,9 @@ DIRMODE = 0755
SYSCONFDIR_FILES = etc-update.conf dispatch-conf.conf
PORTAGE_CONFDIR_FILES = make.globals
LOGROTATE_FILES = elog-save-summary
-BINDIR_FILES = ebuild egencache emerge portageq quickpkg repoman
-SBINDIR_FILES = archive-conf dispatch-conf emaint emerge-webrsync \
+BINDIR_FILES = ebuild egencache emerge emerge-webrsync \
+ portageq quickpkg repoman
+SBINDIR_FILES = archive-conf dispatch-conf emaint \
env-update etc-update fixpackages regenworld
DOCS = ChangeLog NEWS RELEASE-NOTES
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index e6749f285..bfd9aa2fc 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -27,11 +27,19 @@ wecho() { echo "${argv0}: warning: $*" 1>&2 ; }
eecho() { echo "${argv0}: error: $*" 1>&2 ; }
argv0=$0
-if ! type -P portageq > /dev/null ; then
+
+# Use portageq from the same directory/prefix as the current script, so
+# that we don't have to rely on PATH including the current EPREFIX.
+scriptpath=${BASH_SOURCE[0]}
+if [ -x "${scriptpath%/*}/portageq" ]; then
+ portageq=${scriptpath%/*}/portageq
+elif type -P portageq > /dev/null ; then
+ portageq=portageq
+else
eecho "could not find 'portageq'; aborting"
exit 1
fi
-eval $(portageq envvar -v FEATURES FETCHCOMMAND GENTOO_MIRRORS \
+eval $("${portageq}" envvar -v FEATURES FETCHCOMMAND GENTOO_MIRRORS \
PORTAGE_BIN_PATH PORTAGE_GPG_DIR \
PORTAGE_NICENESS PORTAGE_RSYNC_EXTRA_OPTS PORTAGE_TMPDIR PORTDIR \
SYNC http_proxy ftp_proxy)