commit:     85d2d98e0ca58f724b51ad37f01cd703f37bbeb6
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 30 16:03:46 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Aug 30 16:03:46 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=85d2d98e

gkbuild.sh: _initialize(): Source gkbuild after $S was defined

This will allow gkbuilds to overwrite $S like known from ebuilds.

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 worker_modules/gkbuild.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/worker_modules/gkbuild.sh b/worker_modules/gkbuild.sh
index 92c7379..74a2505 100644
--- a/worker_modules/gkbuild.sh
+++ b/worker_modules/gkbuild.sh
@@ -247,9 +247,6 @@ _initialize() {
                die "Unable to build ${P}: '${GK_SHARE}/gkbuilds/${PN}.gkbuild' 
does NOT exist!"
        fi
 
-       source "${GKBUILD}" \
-               || die "Failed to source '${GKBUILD}'!"
-
        declare -gr WORKDIR=$(mktemp -d -p "${TEMP}" ${PN}.XXXXXXXX 2>/dev/null)
        [ -z "${WORKDIR}" ] && die "mktemp failed!"
 
@@ -282,6 +279,9 @@ _initialize() {
 
        S="${WORKDIR}/${GKPKG_SRCDIR}"
 
+       source "${GKBUILD}" \
+               || die "Failed to source '${GKBUILD}'!"
+
        # Some tools like eltpatch (libtoolize) depend on these variables
        export S D
 

Reply via email to