Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-portage-dev] [PATCH] EAPI 6: Fail if eapply_user is not called in src_prepare()
Date: Tue, 17 Nov 2015 22:20:59
Message-Id: 1447798842-5013-1-git-send-email-mgorny@gentoo.org
1 ---
2 bin/phase-functions.sh | 6 ++++++
3 bin/phase-helpers.sh | 1 +
4 2 files changed, 7 insertions(+)
5
6 diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
7 index 7bf4d63..abbc602 100644
8 --- a/bin/phase-functions.sh
9 +++ b/bin/phase-functions.sh
10 @@ -374,6 +374,12 @@ __dyn_prepare() {
11 __ebuild_phase pre_src_prepare
12 __vecho ">>> Preparing source in $PWD ..."
13 __ebuild_phase src_prepare
14 +
15 + # keep path in eapply_user in sync!
16 + if [[ ! -f ${T}/.portage_user_patches_applied ]]; then
17 + die "eapply_user (or default) must be called in src_prepare()!"
18 + fi
19 +
20 >> "$PORTAGE_BUILDDIR/.prepared" || \
21 die "Failed to create $PORTAGE_BUILDDIR/.prepared"
22 __vecho ">>> Source prepared."
23 diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
24 index 6c45c25..da9aa7c 100644
25 --- a/bin/phase-helpers.sh
26 +++ b/bin/phase-helpers.sh
27 @@ -1079,6 +1079,7 @@ fi
28
29 if ___eapi_has_eapply_user; then
30 eapply_user() {
31 + # keep path in __dyn_prepare in sync!
32 local tagfile=${T}/.portage_user_patches_applied
33 [[ -f ${tagfile} ]] && return
34 >> "${tagfile}"
35 --
36 2.6.3

Replies