1 |
commit: 1c0c5daadb6632fa503bf980104789f74db72c7f |
2 |
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 3 06:24:42 2017 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 3 06:28:16 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=1c0c5daa |
7 |
|
8 |
gen_compile: be a little bit more verbose about patching. |
9 |
|
10 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
11 |
|
12 |
gen_compile.sh | 10 +++++++--- |
13 |
1 file changed, 7 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/gen_compile.sh b/gen_compile.sh |
16 |
index f3f9ef1..76e11a8 100755 |
17 |
--- a/gen_compile.sh |
18 |
+++ b/gen_compile.sh |
19 |
@@ -208,17 +208,19 @@ reset_args() |
20 |
apply_patches() { |
21 |
util=$1 |
22 |
version=$2 |
23 |
+ patchdir=${GK_SHARE}/patches/${util}/${version} |
24 |
|
25 |
- if [ -d "${GK_SHARE}/patches/${util}/${version}" ] |
26 |
+ if [ -d "${patchdir}" ] |
27 |
then |
28 |
print_info 1 "${util}: >> Applying patches..." |
29 |
- for i in ${GK_SHARE}/patches/${util}/${version}/*{diff,patch} |
30 |
+ for i in ${patchdir}/*{diff,patch} |
31 |
do |
32 |
[ -f "${i}" ] || continue |
33 |
patch_success=0 |
34 |
for j in `seq 0 5` |
35 |
do |
36 |
- patch -p${j} --backup-if-mismatch -f < "${i}" >/dev/null |
37 |
+ patch -p${j} --backup-if-mismatch -f < "${i}" --dry-run >/dev/null && \ |
38 |
+ patch -p${j} --backup-if-mismatch -f < "${i}" |
39 |
if [ $? = 0 ] |
40 |
then |
41 |
patch_success=1 |
42 |
@@ -232,6 +234,8 @@ apply_patches() { |
43 |
gen_die "could not apply patch ${i} for ${util}-${version}" |
44 |
fi |
45 |
done |
46 |
+ else |
47 |
+ print_info 1 "${util}: >> No patches found in $patchdir ..." |
48 |
fi |
49 |
} |