From f7b3bb04710e8b9ed84fedddea7af73ec2b6459f Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Fri, 11 Nov 2016 14:27:08 +0300 Subject: [PATCH] Fix for patching procedure --- common.sh | 3 +-- general.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/common.sh b/common.sh index d135964d3..0b96d7dd8 100644 --- a/common.sh +++ b/common.sh @@ -347,8 +347,7 @@ process_patch_file() local description=$2 # detect and remove files which patch will create - LANGUAGE=english patch --batch --dry-run -p1 -N < $patch | grep create \ - | awk '{print $NF}' | sed -n 's/,//p' | xargs -I % sh -c 'rm %' + lsdiff -s --strip=1 $patch | grep '^+' | awk '{print $2}' | xargs -I % sh -c 'rm -f %' # main patch command echo "Processing file $patch" >> $DEST/debug/patching.log diff --git a/general.sh b/general.sh index f08123cbf..837fc5904 100644 --- a/general.sh +++ b/general.sh @@ -473,7 +473,7 @@ prepare_host() gawk gcc-arm-linux-gnueabihf gcc-arm-linux-gnueabi qemu-user-static u-boot-tools uuid-dev zlib1g-dev unzip libusb-1.0-0-dev ntpdate \ parted pkg-config libncurses5-dev whiptail debian-keyring debian-archive-keyring f2fs-tools libfile-fcntllock-perl rsync libssl-dev \ nfs-kernel-server btrfs-tools gcc-aarch64-linux-gnu ncurses-term p7zip-full dos2unix dosfstools libc6-dev-armhf-cross libc6-dev-armel-cross \ - libc6-dev-arm64-cross curl gcc-arm-none-eabi libnewlib-arm-none-eabi" + libc6-dev-arm64-cross curl gcc-arm-none-eabi libnewlib-arm-none-eabi patchutils" local codename=$(lsb_release -sc) display_alert "Build host OS release" "${codename:-(unknown)}" "info"