diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-10-08 20:21:25 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-10-09 08:47:13 +0200 |
commit | 22e1ddfc62bf36331c28eef79e1540253e84e576 (patch) | |
tree | 959739502bb0eb8f8d58b76e26daa83586b6bc26 | |
parent | e357567f4301def83b00e46ed798c7fb9e581b99 (diff) | |
download | ptxdist-22e1ddfc62bf36331c28eef79e1540253e84e576.tar.gz ptxdist-22e1ddfc62bf36331c28eef79e1540253e84e576.tar.xz |
ptxd_make_world_{extract,patchin}: handle lndir:// like file://
PTXDIST_PATH_LAYERS is used to find the absolute path for
Relative file:// URLs. Do the same thing for lndir://.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_make_world_extract.sh | 2 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_world_patchin.sh | 2 | ||||
-rw-r--r-- | scripts/libptxdist.sh | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/scripts/lib/ptxd_make_world_extract.sh b/scripts/lib/ptxd_make_world_extract.sh index f458f9d1e..199a72a4a 100644 --- a/scripts/lib/ptxd_make_world_extract.sh +++ b/scripts/lib/ptxd_make_world_extract.sh @@ -28,7 +28,7 @@ ptxd_make_world_extract() { case "${pkg_url}" in lndir://*) - local url="${pkg_url//lndir:\/\//}" + local url="$(ptxd_file_url_path "${pkg_url}")" if [ -n "${pkg_src}" ]; then ptxd_bailout "<PKG>_SOURCE must not be defined when using a lndir:// URL!" fi diff --git a/scripts/lib/ptxd_make_world_patchin.sh b/scripts/lib/ptxd_make_world_patchin.sh index e57da6406..606d9ebc0 100644 --- a/scripts/lib/ptxd_make_world_patchin.sh +++ b/scripts/lib/ptxd_make_world_patchin.sh @@ -221,7 +221,7 @@ ptxd_make_world_patchin_apply() pkg_patch_series \ pkg_patch_tool - if [[ "${pkg_url}" =~ ^file:// ]]; then + if [[ "${pkg_url}" =~ ^file:// || "${pkg_url}" =~ ^lndir:// ]]; then local url="$(ptxd_file_url_path "${pkg_url}")" # local directories are not intended to be patched if [ -d "${url}" ]; then diff --git a/scripts/libptxdist.sh b/scripts/libptxdist.sh index 65c1234e3..2153e510e 100644 --- a/scripts/libptxdist.sh +++ b/scripts/libptxdist.sh @@ -522,6 +522,7 @@ export -f ptxd_abs2rel # ptxd_file_url_path() { local url="${1//file:\/\//}" + url="${url//lndir:\/\//}" if [[ ! "${url}" =~ ^/ ]]; then # relative to absolute path if ptxd_in_path PTXDIST_PATH_LAYERS "${url}"; then |