summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-04-06 11:32:28 +0100
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2021-04-06 11:32:28 +0100
commit84398bdc8a999f4f537e8f98d8853c63dcdda8b0 (patch)
tree8aa50bc1ec5c686fe4af9c8927ef438bc84fd56e /subr
parent0b34be07625808976bb62318a2520960fdbc4926 (diff)
downloadmidipix_build-84398bdc8a999f4f537e8f98d8853c63dcdda8b0.tar.bz2
midipix_build-84398bdc8a999f4f537e8f98d8853c63dcdda8b0.tar.xz
subr/pkg_configure_patch.subr:pkg_configure_patch(): correctly reference possibly undefined ${PKG_{FNAME,URLS_GIT}}.
subr/pkg_fetch_download.subr:pkg_fetch_download_clean_dlcache(): correctly reference possibly undefined ${_pkg_fname}.
Diffstat (limited to 'subr')
-rw-r--r--subr/pkg_configure_patch.subr4
-rw-r--r--subr/pkg_fetch_download.subr18
2 files changed, 11 insertions, 11 deletions
diff --git a/subr/pkg_configure_patch.subr b/subr/pkg_configure_patch.subr
index b789a80e..7569c6ac 100644
--- a/subr/pkg_configure_patch.subr
+++ b/subr/pkg_configure_patch.subr
@@ -6,8 +6,8 @@ pkg_configure_patch() {
local _patch_cwd="" _patch_dir="${MIDIPIX_BUILD_PWD}/patches" _patch_fname=""\
_patches_done="" _pkg_name_full="${PKG_NAME}${PKG_VERSION:+-${PKG_VERSION}}";
- if [ -n "${PKG_FNAME}" ]\
- && [ -n "${PKG_URLS_GIT}" ]; then
+ if [ -n "${PKG_FNAME:-}" ]\
+ && [ -n "${PKG_URLS_GIT:-}" ]; then
_patch_cwd="${PKG_BASE_DIR}";
else
_patch_cwd="${PKG_BASE_DIR}/${PKG_SUBDIR}";
diff --git a/subr/pkg_fetch_download.subr b/subr/pkg_fetch_download.subr
index 2b94d720..0affb358 100644
--- a/subr/pkg_fetch_download.subr
+++ b/subr/pkg_fetch_download.subr
@@ -10,14 +10,14 @@ pkg_fetch_download_clean_dlcache() {
_pkg_urls_git_dname="${_pkg_urls_git%%=*}";
_pkg_urls_git_dname="${_pkg_urls_git_dname##*/}";
fi;
- for _fname in $(cd "${_dlcachedir}/${_pkg_name}" && find \
- -mindepth 1 \
- -not -name "${_pkg_fname}" \
- -not -name "${_pkg_fname}.fetched" \
- ${_pkg_urls_git_dname:+ \
- -not -path "./${_pkg_urls_git_dname}" \
- -not -path "./${_pkg_urls_git_dname}/*" \
- -not -path "./${_pkg_urls_git_dname}.git" \
+ for _fname in $(cd "${_dlcachedir}/${_pkg_name}" && find \
+ -mindepth 1 \
+ ${_pkg_fname:+-not -name "${_pkg_fname}"} \
+ ${_pkg_fname:+-not -name "${_pkg_fname}.fetched"} \
+ ${_pkg_urls_git_dname:+ \
+ -not -path "./${_pkg_urls_git_dname}" \
+ -not -path "./${_pkg_urls_git_dname}/*" \
+ -not -path "./${_pkg_urls_git_dname}.git" \
-not -path "./${_pkg_urls_git_dname}.git/*"}); do
_fname="${_dlcachedir}/${_pkg_name}/${_fname#./}"
rtl_log_msg notice "Deleting redundant file \`%s' for package \`%s'." "${_fname}" "${_pkg_name}";
@@ -59,7 +59,7 @@ pkg_fetch_download() {
return 1;
fi;
fi;
- pkg_fetch_download_clean_dlcache "${BUILD_DLCACHEDIR}" "${PKG_NAME}" "${PKG_FNAME}" "${PKG_URLS_GIT}";
+ pkg_fetch_download_clean_dlcache "${BUILD_DLCACHEDIR}" "${PKG_NAME}" "${PKG_FNAME:-}" "${PKG_URLS_GIT:-}";
fi;
};