commit:     4a9fb374532ca70035fab163afd24769d01d6bcb
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 17 22:20:17 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Nov 17 22:20:17 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=4a9fb374

EAPI 6: Fail if eapply_user is not called in src_prepare()

 bin/phase-functions.sh | 6 ++++++
 bin/phase-helpers.sh   | 1 +
 2 files changed, 7 insertions(+)

diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index 7bf4d63..abbc602 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -374,6 +374,12 @@ __dyn_prepare() {
        __ebuild_phase pre_src_prepare
        __vecho ">>> Preparing source in $PWD ..."
        __ebuild_phase src_prepare
+
+       # keep path in eapply_user in sync!
+       if [[ ! -f ${T}/.portage_user_patches_applied ]]; then
+               die "eapply_user (or default) must be called in src_prepare()!"
+       fi
+
        >> "$PORTAGE_BUILDDIR/.prepared" || \
                die "Failed to create $PORTAGE_BUILDDIR/.prepared"
        __vecho ">>> Source prepared."

diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 6c45c25..da9aa7c 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -1079,6 +1079,7 @@ fi
 
 if ___eapi_has_eapply_user; then
        eapply_user() {
+               # keep path in __dyn_prepare in sync!
                local tagfile=${T}/.portage_user_patches_applied
                [[ -f ${tagfile} ]] && return
                >> "${tagfile}"

Reply via email to