summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2017-09-02 23:24:42 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2017-09-02 23:28:16 -0700
commit1c0c5daadb6632fa503bf980104789f74db72c7f (patch)
treead6378be93e64542b88dbe876c26662dbf12efbf
parentsoftware: newer mdadm is xz-compressed. (diff)
downloadgenkernel-1c0c5daadb6632fa503bf980104789f74db72c7f.tar.gz
genkernel-1c0c5daadb6632fa503bf980104789f74db72c7f.tar.bz2
genkernel-1c0c5daadb6632fa503bf980104789f74db72c7f.zip
gen_compile: be a little bit more verbose about patching.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-xgen_compile.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/gen_compile.sh b/gen_compile.sh
index f3f9ef1..76e11a8 100755
--- a/gen_compile.sh
+++ b/gen_compile.sh
@@ -208,17 +208,19 @@ reset_args()
apply_patches() {
util=$1
version=$2
+ patchdir=${GK_SHARE}/patches/${util}/${version}
- if [ -d "${GK_SHARE}/patches/${util}/${version}" ]
+ if [ -d "${patchdir}" ]
then
print_info 1 "${util}: >> Applying patches..."
- for i in ${GK_SHARE}/patches/${util}/${version}/*{diff,patch}
+ for i in ${patchdir}/*{diff,patch}
do
[ -f "${i}" ] || continue
patch_success=0
for j in `seq 0 5`
do
- patch -p${j} --backup-if-mismatch -f < "${i}" >/dev/null
+ patch -p${j} --backup-if-mismatch -f < "${i}" --dry-run >/dev/null && \
+ patch -p${j} --backup-if-mismatch -f < "${i}"
if [ $? = 0 ]
then
patch_success=1
@@ -232,6 +234,8 @@ apply_patches() {
gen_die "could not apply patch ${i} for ${util}-${version}"
fi
done
+ else
+ print_info 1 "${util}: >> No patches found in $patchdir ..."
fi
}