summaryrefslogtreecommitdiffstats
path: root/scripts/lib/ptxd_make_world_patchin.sh
diff options
context:
space:
mode:
authorJuergen Borleis <jbe@pengutronix.de>2017-11-09 12:06:33 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2017-11-17 17:14:51 +0100
commit8b488811b76976c12f6372e19a820fb7bc66841f (patch)
treefb919078a9481eb41052f7fd1ffd5e70044301d4 /scripts/lib/ptxd_make_world_patchin.sh
parent84c5ccf51760d5fb02144f52e107ea5f5bbe3e3c (diff)
downloadptxdist-8b488811b76976c12f6372e19a820fb7bc66841f.tar.gz
ptxdist-8b488811b76976c12f6372e19a820fb7bc66841f.tar.xz
ptxd_make_world_patchin_init: skip patch-in on local source directories
Local sources (e.g. BSP relative paths) are intended for development and should never be patched. The current implementation does it by accident. This change sorts out local paths explicitly. Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_make_world_patchin.sh')
-rw-r--r--scripts/lib/ptxd_make_world_patchin.sh25
1 files changed, 13 insertions, 12 deletions
diff --git a/scripts/lib/ptxd_make_world_patchin.sh b/scripts/lib/ptxd_make_world_patchin.sh
index e59a9437c..57f472130 100644
--- a/scripts/lib/ptxd_make_world_patchin.sh
+++ b/scripts/lib/ptxd_make_world_patchin.sh
@@ -438,6 +438,19 @@ ptxd_make_world_patchin_init()
return
fi
+ if [[ "${pkg_url}" =~ ^file:// ]]; then
+ local url="${pkg_url//file:\/\//}"
+ # local directories are not intended to be patched
+ if [[ ! "${url}" =~ ^/ ]]; then
+ # ensure an absolute path for this BSP relative URL
+ url="${PTXDIST_WORKSPACE}/${url}"
+ fi
+ if [ -d "${url}" ]; then
+ echo "Local source directory detected, skipping patch-in step"
+ return
+ fi
+ fi
+
if [ -n "${pkg_deprecated_patchin_series}" ]; then
ptxd_bailout "a 3rd parameter to patchin ('${pkg_deprecated_patchin_series}') is obsolete, please define <PKG>_SERIES instead"
fi
@@ -445,18 +458,6 @@ ptxd_make_world_patchin_init()
pkg_patchin_dir=${pkg_deprecated_patchin_dir:-${pkg_dir}}
#
- # FIXME: do we still need this check?
- #
- case "${pkg_url}" in
- file://)
- local dir="${pkg_url#file://}"
- if [ -d "${dir}" -a "${pkg_label}" != "kernel" ]; then
- echo "local directory instead of tar file, skipping patch"
- fi
- ;;
- esac
-
- #
# find patch_dir
# for compatibility, look first in 'generic', then in standard
# location