From 2c5ce2e826a8af69d14429ea4da158bf94d31ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Tue, 6 Apr 2021 11:26:11 +0100 Subject: pkgtool.sh:pkgtoolp_mirror_fetch(): call pkg_fetch_download_clean_dlcache() post-{archive,Git} mirroring. pkgtool.sh:pkgtoolp_mirror_fetch(): mirror both archive as well as Git URL(s). subr/pkg_configure_patch.subr:pkg_configure_patch(): apply patches from within ${PKG_BASE_DIR} given both ${PKG_FNAME} and ${PKG_URLS_GIT}. subr.rtl/rtl_fetch.subr:rtl_fetch_mirror_urls_git(): ignore all but last component in ${_subdir}. subr.rtl/rtl_fetch.subr:rtl_fetch_mirror_urls_git(): create prerequisite directories. subr.rtl/rtl_fetch.subr:rtlp_fetch_url_git(): ignore all but last component in ${_subdir} wrt. ${_cache_dlname}. subr.rtl/rtl_fetch.subr:rtlp_fetch_url_git(): create prerequisite directories wrt. ${_tgtdir}. subr/ex_pkg_env.subr:exp_pkg_env_defaults(): reject absence of ${PKG_SUBDIR} given both ${PKG_FNAME} and ${PKG_URLS_GIT}. subr/pkg_fetch_download.subr:pkg_fetch_download_clean_dlcache(): initial implementation. subr/pkg_fetch_download.subr:pkg_fetch_download(): call pkg_fetch_download_clean_dlcache() post-{archive,Git} download. --- subr/ex_pkg_env.subr | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'subr/ex_pkg_env.subr') diff --git a/subr/ex_pkg_env.subr b/subr/ex_pkg_env.subr index ff2338e1..ebfb8f46 100644 --- a/subr/ex_pkg_env.subr +++ b/subr/ex_pkg_env.subr @@ -24,7 +24,10 @@ exp_pkg_env_defaults() { : ${PKG_FNAME:="${PKG_URL##*/}"}; fi; if [ -z "${PKG_SUBDIR:-}" ]; then - if [ -n "${PKG_URLS_GIT:-}" ]; then + if [ -n "${PKG_URLS_GIT:-}" ]\ + && [ -n "${PKG_FNAME:-}" ]; then + rtl_log_msg fatalexit "Error: \${PKG_SUBDIR} must be specified given both \${PKG_FNAME} and \${PKG_URLS_GIT}."; + elif [ -n "${PKG_URLS_GIT:-}" ]; then PKG_SUBDIR="${PKG_URLS_GIT%%=*}"; else case "${PKG_FNAME:-}" in *.t*) PKG_SUBDIR="${PKG_FNAME%%.t*}"; ;; -- cgit v1.2.3