From e497667bcbc2ca055fa79fb3d68d9ee14677a1b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Thu, 16 Feb 2017 12:54:42 +0000 Subject: subr/pkg_patch.subr: {,un}set noglob correctly, don't apply the same patch multiple times. vars/build.vars: override ${PKG_BZIP2_INSTALL_FILES} for bzip2_flavour_minipix. --- subr/pkg_patch.subr | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'subr') diff --git a/subr/pkg_patch.subr b/subr/pkg_patch.subr index 94fe780b..eba8f6f2 100644 --- a/subr/pkg_patch.subr +++ b/subr/pkg_patch.subr @@ -3,8 +3,8 @@ # pkg_patch() { - local _patch_fname; - set -o noglob; + local _patch_fname _patches_done; + set +o noglob; for _patch_fname in \ ${WORKDIR}/chainport/${PKG_NAME}.midipix.patch \ ${WORKDIR}/chainport/${PKG_SUBDIR}.midipix.patch \ @@ -18,11 +18,13 @@ pkg_patch() { ${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local@${BUILD_HNAME}.patch \ ${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR}.local@${BUILD_HNAME}.patch \ ${MIDIPIX_BUILD_PWD}/patches/${PKG_SUBDIR%-*}.local@${BUILD_HNAME}.patch; do - if [ -r "${_patch_fname}" ]; then + if ! lmatch "${_patches_done}" " " "${_patch_fname}"\ + && [ -r "${_patch_fname}" ]; then patch -b -d "${WORKDIR}/${PKG_SUBDIR}" -p1 < "${_patch_fname}"; + _patches_done="${_patches_done:+${_patches_done} }${_patch_fname}"; fi; done; - set +o noglob; + set -o noglob; }; # vim:filetype=sh -- cgit v1.2.3