aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-01 15:11:14 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-01 15:11:14 +0000
commit4419abbd49a0981feab17c7464a32cd9b15822d6 (patch)
tree575a65bd42ff10f234135992fa100c2f4874c945
parent3360efe8f08925940a6dc82fd30f9c6785a4efdb (diff)
downloadpaludis-4419abbd49a0981feab17c7464a32cd9b15822d6.tar.gz
paludis-4419abbd49a0981feab17c7464a32cd9b15822d6.tar.xz
Warn when naughty ebuilds try to change SLOT
-rwxr-xr-xpaludis/repositories/gentoo/ebuild/ebuild.bash7
1 files changed, 7 insertions, 0 deletions
diff --git a/paludis/repositories/gentoo/ebuild/ebuild.bash b/paludis/repositories/gentoo/ebuild/ebuild.bash
index 0f30cbf..7833f8d 100755
--- a/paludis/repositories/gentoo/ebuild/ebuild.bash
+++ b/paludis/repositories/gentoo/ebuild/ebuild.bash
@@ -249,6 +249,7 @@ ebuild_load_ebuild()
{
export EBUILD="${1}"
unset IUSE DEPEND RDEPEND PDEPEND KEYWORDS
+ local saved_SLOT="${SLOT}"
[[ -f "${1}" ]] || die "Ebuild '${1}' is not a file"
source ${1} || die "Error sourcing ebuild '${1}'"
@@ -261,6 +262,12 @@ ebuild_load_ebuild()
PDEPEND="${PDEPEND} ${E_PDEPEND}"
KEYWORDS="${KEYWORDS} ${E_KEYWORDS}"
[[ ${EAPI-unset} == "unset" ]] && EAPI="0"
+
+ if [[ -n "${saved_SLOT}" ]] && [[ "${SLOT}" != "${saved_SLOT}" ]] ; then
+ ebuild_notice "qa" \
+ "Ebuild ${1} illegally tried to change SLOT from '${saved_SLOT}' to '${SLOT}'"
+ export SLOT=${saved_SLOT}
+ fi
}
perform_hook()