From 1a9726b31cc0326ede10a45b02294931d1db7473 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 9 Jan 2009 11:19:07 +0000 Subject: 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 --- bin/isolated-functions.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 9ed933c02..e418bdde6 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 -- cgit v1.2.3-1-g7c22