mirror of https://github.com/dynup/kpatch
Merge pull request #102 from jpoimboe/patch-no-reverse
kpatch-build: improve error handling for an already applied patch
This commit is contained in:
commit
e87b37aafe
|
@ -184,8 +184,8 @@ fi
|
|||
|
||||
echo "Testing patch file"
|
||||
cd "$SRCDIR" || die
|
||||
patch -N -p1 < "$PATCHFILE" || die "source patch file failed to apply"
|
||||
cp "$PATCHFILE" "$APPLIEDPATCHFILE" || die
|
||||
patch -p1 < "$APPLIEDPATCHFILE" || die "source patch file failed to apply"
|
||||
patch -p1 -R < "$APPLIEDPATCHFILE" &> /dev/null || die "reverse patch apply failed"
|
||||
|
||||
echo "Building original kernel"
|
||||
|
@ -195,7 +195,7 @@ cp -LR "$DATADIR/patch" "$TEMPDIR" || die
|
|||
cp "$OBJDIR/vmlinux" "$TEMPDIR" || die
|
||||
|
||||
echo "Building patched kernel"
|
||||
patch -p1 < "$APPLIEDPATCHFILE" >> "$LOGFILE" 2>&1 || die
|
||||
patch -N -p1 < "$APPLIEDPATCHFILE" >> "$LOGFILE" 2>&1 || die
|
||||
make "-j$CPUS" vmlinux "O=$OBJDIR" 2>&1 | tee -a "$TEMPDIR/patched_build.log" >> "$LOGFILE"
|
||||
[[ "${PIPESTATUS[0]}" -eq 0 ]] || die
|
||||
|
||||
|
|
Loading…
Reference in New Issue