diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-01-09 11:19:07 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-01-09 11:19:07 +0000 |
commit | 1a9726b31cc0326ede10a45b02294931d1db7473 (patch) | |
tree | a5367a5884f593c245e336f02d909411a2568ad1 /bin | |
parent | 6afefabfb5f442a6844cf60664bf0516f661106d (diff) | |
download | portage-1a9726b31cc0326ede10a45b02294931d1db7473.tar.gz portage-1a9726b31cc0326ede10a45b02294931d1db7473.tar.bz2 portage-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')
-rwxr-xr-x | bin/isolated-functions.sh | 14 |
1 files changed, 13 insertions, 1 deletions
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 |