summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-01-09 11:19:07 +0000
committerZac Medico <zmedico@gentoo.org>2009-01-09 11:19:07 +0000
commit1a9726b31cc0326ede10a45b02294931d1db7473 (patch)
treea5367a5884f593c245e336f02d909411a2568ad1 /bin/isolated-functions.sh
parentBug #253563 - Replace hardcoded green/red color strings with GOOD/BAD. Thanks (diff)
downloadportage-multirepo-1a9726b31cc0326ede10a45b02294931d1db7473.tar.gz
portage-multirepo-1a9726b31cc0326ede10a45b02294931d1db7473.tar.bz2
portage-multirepo-1a9726b31cc0326ede10a45b02294931d1db7473.zip
Make die() to show a message indicating the repository that an ebuild came
from, and do it during any phase for both ebuilds and binary packages. Now PORTAGE_REPO_NAME is initialized inside config.setcpv() for both ebuilds and binary packages, so it's always available inside ebuild.sh. svn path=/main/trunk/; revision=12402
Diffstat (limited to 'bin/isolated-functions.sh')
-rwxr-xr-xbin/isolated-functions.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 9ed933c0..e418bdde 100755
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -123,7 +123,19 @@ die() {
local overlay=${EBUILD%/*}
overlay=${overlay%/*}
overlay=${overlay%/*}
- eerror "This ebuild is from an overlay: '${overlay}/'"
+ if [[ -n $PORTAGE_REPO_NAME ]] ; then
+ eerror "This ebuild is from an overlay named" \
+ "'$PORTAGE_REPO_NAME': '${overlay}/'"
+ else
+ eerror "This ebuild is from an overlay: '${overlay}/'"
+ fi
+ elif [[ -n $PORTAGE_REPO_NAME && -f "$PORTDIR"/profiles/repo_name ]] ; then
+ local portdir_repo_name=$(<"$PORTDIR"/profiles/repo_name)
+ if [[ -n $portdir_repo_name && \
+ $portdir_repo_name != $PORTAGE_REPO_NAME ]] ; then
+ eerror "This ebuild is from a repository" \
+ "named '$PORTAGE_REPO_NAME'"
+ fi
fi
eerror