Browse Source

overlay: enhanced .patch handling

karasz/new-early
Alejandro Mery 16 years ago
parent
commit
1c1cda8902
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      lib/overlay/overlay-functions.in

+ 3
- 1
lib/overlay/overlay-functions.in

@ -41,6 +41,7 @@ overlay_apply() {
local overlaydir="$1" rootfs="${2:-$root}" local overlaydir="$1" rootfs="${2:-$root}"
local file= source= target= ext= local file= source= target= ext=
local type= mode= ref= targetdir= local type= mode= ref= targetdir=
local patchopt="-p1 --no-backup-if-mismatch -N"
for file in "$overlaydir"/*; do for file in "$overlaydir"/*; do
# only consider known overlay types # only consider known overlay types
@ -72,7 +73,8 @@ overlay_apply() {
ln -snf "$ref" "$rootfs/$target" ln -snf "$ref" "$rootfs/$target"
;; ;;
patch) patch)
echo_status "$(patch -p1 -d "${rootfs}" 2>&1 < $file )"
echo_status "$(patch $patchopt \
-d "${rootfs}" 2>&1 < $file )"
;; ;;
esac esac
done done

Loading…
Cancel
Save