Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/elt-patches:master commit in: /
Date: Thu, 04 Nov 2021 10:33:48
Message-Id: 1636021176.c4ea896a322a84876a92bc530ef506c098f40c2c.vapier@gentoo
1 commit: c4ea896a322a84876a92bc530ef506c098f40c2c
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 4 10:19:36 2021 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 4 10:19:36 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=c4ea896a
7
8 eltpatch: allow ELT_patchdir to be overridden via env
9
10 This will allow for local testing.
11
12 Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
13
14 eltpatch.in | 6 ++++--
15 1 file changed, 4 insertions(+), 2 deletions(-)
16
17 diff --git a/eltpatch.in b/eltpatch.in
18 index 887fc6f..7d3980e 100644
19 --- a/eltpatch.in
20 +++ b/eltpatch.in
21 @@ -7,6 +7,8 @@ type -P gfind &>/dev/null && FIND=gfind || FIND=find
22 type -P gpatch &>/dev/null && PATCH=gpatch || PATCH=patch
23 type -P gsed &>/dev/null && SED=gsed || SED=sed
24
25 +: "${ELT_patchdir:=@ELT_patchdir@}"
26 +
27 source "@ELT_gentoofuncs@" || exit 1
28
29 die() {
30 @@ -74,7 +76,7 @@ ELT_walk_patches() {
31 local ret=1
32 local file=$1
33 local patch_set=$2
34 - local patch_dir="@ELT_patchdir@/${patch_set}"
35 + local patch_dir="${ELT_patchdir}/${patch_set}"
36 local rem_int_dep=$3
37
38 [[ -z ${patch_set} ]] && return 1
39 @@ -88,7 +90,7 @@ ELT_walk_patches() {
40 sed_args+=( -e "s|@REM_INT_DEP@|${rem_int_dep}|g" )
41 fi
42
43 - pushd "@ELT_patchdir@" >/dev/null || die "pushd to elt-patch dir failed"
44 + pushd "${ELT_patchdir}" >/dev/null || die "pushd to elt-patch dir failed"
45
46 # Go through the patches in reverse order (newer version to older)
47 for patch in $(${FIND} "${patch_set}" -maxdepth 1 -type f | LC_ALL=C sort -r) ; do