aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'portage_with_autodep/bin/emerge-webrsync')
-rwxr-xr-xportage_with_autodep/bin/emerge-webrsync17
1 files changed, 14 insertions, 3 deletions
diff --git a/portage_with_autodep/bin/emerge-webrsync b/portage_with_autodep/bin/emerge-webrsync
index d933871..bfd9aa2 100755
--- a/portage_with_autodep/bin/emerge-webrsync
+++ b/portage_with_autodep/bin/emerge-webrsync
@@ -12,7 +12,7 @@
#
# gpg key import
-# KEY_ID=0x239C75C4
+# KEY_ID=0x96D8BF6D
# gpg --homedir /etc/portage/gnupg --keyserver subkeys.pgp.net --recv-keys $KEY_ID
# gpg --homedir /etc/portage/gnupg --edit-key $KEY_ID trust
#
@@ -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)
@@ -157,6 +165,7 @@ check_file_signature() {
gpg --homedir "${PORTAGE_GPG_DIR}" --verify "$signature" "$file" && r=0
else
eecho "cannot check signature: gpg binary not found"
+ exit 1
fi
else
r=0
@@ -211,6 +220,8 @@ sync_local() {
emerge --metadata
fi
[ -x /etc/portage/bin/post_sync ] && /etc/portage/bin/post_sync
+ # --quiet suppresses output if there are no relevant news items
+ has news ${FEATURES} && emerge --check-news --quiet
return 0
}