diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-01-12 08:20:30 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-01-12 08:20:30 +0000 |
commit | 33a8590717506f9ee2df79ea3ef4ab5767c7d9b5 (patch) | |
tree | b3949a3dc068884c59aa76411496e3e343963b0a /bin/isolated-functions.sh | |
parent | 61da8d34efa170966597ec4f131bb10a4d64d928 (diff) | |
download | portage-33a8590717506f9ee2df79ea3ef4ab5767c7d9b5.tar.gz portage-33a8590717506f9ee2df79ea3ef4ab5767c7d9b5.tar.bz2 portage-33a8590717506f9ee2df79ea3ef4ab5767c7d9b5.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. (trunk r12402)
svn path=/main/branches/2.1.6/; revision=12462
Diffstat (limited to 'bin/isolated-functions.sh')
-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 |