apply_user_patches: die if EBUILD_PHASE is wrong
authorZac Medico <zmedico@gentoo.org>
Sun, 2 Sep 2012 02:24:46 +0000 (19:24 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 2 Sep 2012 02:24:46 +0000 (19:24 -0700)
bin/phase-helpers.sh

index f23abdf751cca60e6912693cf94535c9ae22111f..46f713211f0fb6d31f22b03598452ce080dc95f2 100644 (file)
@@ -639,6 +639,8 @@ apply_user_patches() {
 }
 
 _eapi5_apply_user_patches() {
+       [[ ${EBUILD_PHASE} == prepare ]] || \
+               die "apply_user_patches may only be called during src_prepare"
        # This is a no-op that is just enough to fullfill the spec.
        [[ -f ${PORTAGE_BUILDDIR}/.apply_user_patches ]] && return 1
        > "${PORTAGE_BUILDDIR}/.apply_user_patches" || die