diff options
-rw-r--r-- | etc/README.md | 5 | ||||
-rw-r--r-- | etc/pkgtool.usage | 5 | ||||
-rwxr-xr-x | pkgtool.sh | 43 | ||||
-rw-r--r-- | subr.rtl/rtl_fetch.subr | 159 | ||||
-rw-r--r-- | subr/pkg_fetch_download.subr | 16 | ||||
-rw-r--r-- | subr/pkgtool_init.subr | 14 | ||||
-rw-r--r-- | vars/gcc.vars | 4 | ||||
-rw-r--r-- | vars/python2.vars | 2 | ||||
-rw-r--r-- | vars/python2_host.vars | 2 | ||||
-rw-r--r-- | vars/python3.vars | 2 | ||||
-rw-r--r-- | vars/python3_host.vars | 2 |
11 files changed, 151 insertions, 103 deletions
diff --git a/etc/README.md b/etc/README.md index 5e171155..98760ee1 100644 --- a/etc/README.md +++ b/etc/README.md @@ -379,12 +379,13 @@ for a list of package build steps and how they are overriden. ## 3.5. ``pkgtool.sh`` ``` -usage: ./pkgtool.sh [-a nt32|nt64] [-b debug|release] [-i|-r|-s|-t] - [<variable name>=<variable override>[ ..]] name +usage: ./pkgtool.sh [-a nt32|nt64] [-b debug|release] [-i|-m <dname>|-r|-s|-t] + [<variable name>=<variable override>[ ..]] name -a nt32|nt64 Selects 32-bit or 64-bit architecture; defaults to nt64. -b debug|release Selects debug or release build kind; defaults to debug. -i List package variables and dependencies of single named package. + -m <dname> Setup package archives mirror in <dname> -r List reverse dependencies of single named package. -s Enter interactive package build shell environment for single named package; requires a package dump file. If the package diff --git a/etc/pkgtool.usage b/etc/pkgtool.usage index 9f665d37..3031180d 100644 --- a/etc/pkgtool.usage +++ b/etc/pkgtool.usage @@ -1,9 +1,10 @@ -usage: ./pkgtool.sh [-a nt32|nt64] [-b debug|release] [-i|-r|-s|-t] - [<variable name>=<variable override>[ ..]] name +usage: ./pkgtool.sh [-a nt32|nt64] [-b debug|release] [-i|-m <dname>|-r|-s|-t] + [<variable name>=<variable override>[ ..]] name -a nt32|nt64 Selects 32-bit or 64-bit architecture; defaults to nt64. -b debug|release Selects debug or release build kind; defaults to debug. -i List package variables and dependencies of single named package. + -m <dname> Setup package archives mirror in <dname> -r List reverse dependencies of single named package. -s Enter interactive package build shell environment for single named package; requires a package dump file. If the package @@ -50,6 +50,48 @@ pkgtoolp_info() { fi; return "${_rc}"; }; +pkgtoolp_mirror() { + local _mirror_dname="${1}" _group_name="" _pkg_name="" _pkg_parent="" _rc=0; + umask 022; + if ! ex_pkg_load_groups; then + _rc=1; _status="Error: failed to load build groups."; + else for _group_name in ${EX_PKG_BUILD_GROUPS}; do + for _pkg_name in $(ex_pkg_get_packages "${_group_name}"); do + _pkg_parent="$(rtl_get_var_unsafe -u "PKG_${_pkg_name}_INHERIT_FROM")"; + pkgtoolp_mirror_fetch "${_mirror_dname}" "${_pkg_name}" "${_pkg_parent:-${_pkg_name}}"; _rc="${?}"; + done; + done; + fi; return "${_rc}"; +}; + +pkgtoolp_mirror_fetch() { + local _mirror_dname="${1}" _pkg_name="${2}" _pkg_name_real="${3}" _pkg_sha256sum="" _pkg_url=""; + if _pkg_url="$(rtl_get_var_unsafe -u "PKG_${_pkg_name_real}_URL")"\ + && _pkg_sha256sum="$(rtl_get_var_unsafe -u "PKG_${_pkg_name_real}_SHA256SUM")"; then + if [ "${_pkg_name}" != "${_pkg_name_real}" ]; then + rtl_log_msg info "Mirroring package \`%s' (parent package: \`%s'), archive URL(s): \`%s'..." "${_pkg_name}" "${_pkg_name_real}" "${_pkg_url}"; + else + rtl_log_msg info "Mirroring package \`%s', archive URL(s): \`%s'..." "${_pkg_name}" "${_pkg_url}"; + fi; + if ! rtl_fileop mkdir "${_mirror_dname}/${_pkg_name}"\ + || ! rtl_fetch_url_wget "${_pkg_url}" "${_pkg_sha256sum}" "${_mirror_dname}/${_pkg_name}" "${_pkg_url##*/}" "${_pkg_name_real}" ""; then + _rc="${?}"; rtl_log_msg warning "Failed to mirror package \`%s', skipping." "${_pkg_name}"; + fi; + elif _pkg_url="$(rtl_get_var_unsafe -u "PKG_${_pkg_name_real}_URLS_GIT")"; then + if [ "${_pkg_name}" != "${_pkg_name_real}" ]; then + rtl_log_msg info "Mirroring package \`%s' (parent package: \`%s'), Git URL(s): \`%s'..." "${_pkg_name}" "${_pkg_name_real}" "${_pkg_url}"; + else + rtl_log_msg info "Mirroring package \`%s', Git URL(s): \`%s'..." "${_pkg_name}" "${_pkg_url}"; + fi; + if ! rtl_fileop mkdir "${_mirror_dname}/${_pkg_name}"\ + || ! rtl_fetch_urls_git "${_mirror_dname}/${_pkg_name}" "${_mirror_dname}/${_pkg_name}" "" ${_pkg_url}; then + _rc="${?}"; rtl_log_msg warning "Failed to mirror package \`%s', skipping." "${_pkg_name}"; + fi; + else + rtl_log_msg warning "Package \`%s' has neither archive nor Git URL(s), skipping." "${_pkg_name}"; + fi; +}; + pkgtoolp_restart_at() { local _pkg_name="${1}" _rc=0; _status=""; if ! ex_pkg_load_dump "${_pkg_name}" "${BUILD_WORKDIR}"; then @@ -194,6 +236,7 @@ pkgtool() { _rc=1; _status="${_status}"; else case "1" in "${ARG_INFO:-0}") pkgtoolp_info "${PKGTOOL_PKG_NAME}"; ;; + "${ARG_MIRROR:-0}") pkgtoolp_mirror "${ARG_MIRROR_DNAME}"; ;; "${ARG_RDEPENDS:-0}") pkgtoolp_rdepends "${PKGTOOL_PKG_NAME}"; ;; "${ARG_RESTART_AT:+1}") pkgtoolp_restart_at "${PKGTOOL_PKG_NAME}"; ;; "${ARG_SHELL:-0}") pkgtoolp_shell "${PKGTOOL_PKG_NAME}"; ;; diff --git a/subr.rtl/rtl_fetch.subr b/subr.rtl/rtl_fetch.subr index 64eac921..7f44346c 100644 --- a/subr.rtl/rtl_fetch.subr +++ b/subr.rtl/rtl_fetch.subr @@ -3,29 +3,38 @@ # rtlp_fetch_url_git() { - local _tgtdir="${1}" _subdir="${2}" _url="${3}" _branch="${4}" \ - _oldpwd=""; + local _cache_dname="${1}" _git_branch="${2}" _mirrors="${3}" _subdir="${4}" _tgtdir="${5}" _url="${6}"\ + _clonefl=0 _oldpwd="" _url_base=""; (set -o errexit -o noglob -o nounset; rtl_flock_acquire 4 || exit "${?}"; - trap "rm -f \"${BUILD_DLCACHEDIR}/${_subdir%%[/]}.fetching\"" EXIT; - if [ -e "${BUILD_DLCACHEDIR}/${_subdir}" ]; then - (rtl_fileop cd "${BUILD_DLCACHEDIR}/${_subdir}" &&\ - git pull ${DEFAULT_GIT_ARGS} origin "${_branch:-main}"); - (rtl_fileop cd "${BUILD_DLCACHEDIR}/${_subdir}" &&\ + trap "rm -f \"${_cache_dname}/${_subdir%%[/]}.fetching\"" EXIT; + if [ -e "${_cache_dname}/${_subdir}" ]; then + (rtl_fileop cd "${_cache_dname}/${_subdir}" &&\ + git pull ${DEFAULT_GIT_ARGS} origin "${_git_branch:-main}"); + (rtl_fileop cd "${_cache_dname}/${_subdir}" &&\ git submodule update); else - git clone ${DEFAULT_GIT_ARGS} "${_url}" "${BUILD_DLCACHEDIR}/${_subdir}"; - if [ -n "${_branch}" ]; then - (rtl_fileop cd "${BUILD_DLCACHEDIR}/${_subdir}" &&\ - git checkout "${_branch}"); + for _url_base in ${_url%/*} ${_mirrors}; do + if git clone ${DEFAULT_GIT_ARGS} "${_url_base}/${_url##*/}" "${_cache_dname}/${_subdir}"; then + _clonefl=1; break; + fi; + done; + if [ "${_clonefl}" -eq 0 ]; then + return 1; + else if [ -n "${_git_branch}" ]; then + (rtl_fileop cd "${_cache_dname}/${_subdir}" &&\ + git checkout "${_git_branch}"); + fi; + (rtl_fileop cd "${_cache_dname}/${_subdir}" &&\ + git submodule update --init); fi; - (rtl_fileop cd "${BUILD_DLCACHEDIR}/${_subdir}" &&\ - git submodule update --init); fi; - _oldpwd="${PWD}"; rtl_fileop cd "${PKG_BASE_DIR}"; - rtl_fileop rm "${_tgtdir}/${_subdir}"; - rtl_fileop cp "${BUILD_DLCACHEDIR}/${_subdir}" "${_tgtdir}"; - rtl_fileop cd "${_oldpwd}";) 4<>"${BUILD_DLCACHEDIR}/${_subdir%%[/]}.fetching"; + if [ "${_cache_dname}" != "${_tgtdir}" ]; then + _oldpwd="${PWD}"; rtl_fileop cd "${_tgtdir}"; + rtl_fileop rm "${_tgtdir}/${_subdir}"; + rtl_fileop cp "${_cache_dname}/${_subdir}" "${_tgtdir}"; + rtl_fileop cd "${_oldpwd}"; + fi) 4<>"${_cache_dname}/${_subdir%%[/]}.fetching"; if [ "${?}" -eq 0 ]; then cd "$(pwd)"; else @@ -34,81 +43,71 @@ rtlp_fetch_url_git() { }; rtl_fetch_urls_git() { - local _tgtdir="" _url_spec="" _subdir="" _url="" _git_branch=""; - _tgtdir="${1}"; shift; - if [ "${ARG_FETCH_FORCE}" = "offline" ]; then - return 0; - fi; + local _cache_dname="${1}" _tgtdir="${2}" _mirrors="${3}" _git_branch="" _subdir="" _url="" _url_spec=""; shift 3; for _url_spec in "${@}"; do - _subdir="${_url_spec%=*}"; - _url="${_url_spec#*=}"; - _url="${_url%@*}"; + _subdir="${_url_spec%=*}"; _url="${_url_spec#*=}"; _url="${_url%@*}"; if [ "${_url_spec#*@}" != "${_url_spec}" ]; then _git_branch=${_url_spec#*@}; fi; - rtlp_fetch_url_git "${_tgtdir}" "${_subdir}" \ - "${_url}" "${_git_branch}"; + rtlp_fetch_url_git "${_cache_dname}" "${_git_branch}" "${_mirrors}" "${_subdir}" "${_tgtdir}" "${_url}"; done; }; # N.B. URLs ($1) may contain `?' or '&' characters. rtl_fetch_url_wget() { - local _urls="${1}" _sha256sum_src="${2}" _target_fname="${3}" _target_name="${4}" _mirrors="${5:-}" \ + local _urls="${1}" _sha256sum_src="${2}" _target_dname="${3}" _target_fname="${4}" _target_name="${5}" _mirrors="${6:-}" \ _rc=0 _target_fname_full="" _url="" _url_base="" _urls_count=0 _urls_full=""; - if [ "${ARG_FETCH_FORCE}" = "offline" ]; then - return 0; - else _urls_full="${_urls}"; - for _url_base in ${_mirrors}; do - _urls_full="$(rtl_lconcat "${_urls_full}" "${_url_base%/}/${_target_name}/${_target_fname}")"; - done; - _urls_count="$(rtl_llength "${_urls_full}")"; - for _url in ${_urls_full}; do - if [ -z "${_target_fname}" ]; then - _target_fname="$(rtl_basename "${_url}")"; + _urls_full="${_urls}"; + for _url_base in ${_mirrors}; do + _urls_full="$(rtl_lconcat "${_urls_full}" "${_url_base%/}/${_target_name}/${_target_fname}")"; + done; + _urls_count="$(rtl_llength "${_urls_full}")"; + for _url in ${_urls_full}; do + if [ -z "${_target_fname}" ]; then + _target_fname="$(rtl_basename "${_url}")"; + fi; + _target_fname_full="${_target_dname}/${_target_fname}"; + (set +o errexit -o noglob -o nounset; + rtl_flock_acquire 4 || exit 1; + trap "_rc=\"\${?}\"; rm -f \"${_target_fname_full}.fetching\"; exit \"\${_rc}\";" EXIT; + if [ -z "${_sha256sum_src}" ]\ + || ! rtl_check_digest_file "${_target_fname_full}" "${_sha256sum_src}" "${_target_fname_full}.fetched"; then + wget ${DEFAULT_WGET_ARGS} -O "${_target_fname_full}" "${_url}"; _rc="${?}"; + if [ "${_rc}" -ne 0 ]; then + exit $((${_rc}+2)); + elif [ -n "${_sha256sum_src}" ]\ + && ! rtl_check_digest "${_target_fname_full}" "${_sha256sum_src}"; then + exit 2; + else + printf "%s" "${RTL_CHECK_DIGEST_DIGEST}" > "${_target_fname_full}.fetched"; exit 0; fi; - _target_fname_full="${BUILD_DLCACHEDIR}/${_target_fname}"; - (set +o errexit -o noglob -o nounset; - rtl_flock_acquire 4 || exit 1; - trap "_rc=\"\${?}\"; rm -f \"${_target_fname_full}.fetching\"; exit \"\${_rc}\";" EXIT; - if [ -z "${_sha256sum_src}" ]\ - || ! rtl_check_digest_file "${_target_fname_full}" "${_sha256sum_src}" "${_target_fname_full}.fetched"; then - wget ${DEFAULT_WGET_ARGS} -O "${_target_fname_full}" "${_url}"; _rc="${?}"; - if [ "${_rc}" -ne 0 ]; then - exit $((${_rc}+2)); - elif [ -n "${_sha256sum_src}" ]\ - && ! rtl_check_digest "${_target_fname_full}" "${_sha256sum_src}"; then - exit 2; - else - printf "%s" "${RTL_CHECK_DIGEST_DIGEST}" > "${_target_fname_full}.fetched"; exit 0; - fi; + else + exit 0; + fi;) 4<>"${_target_fname_full}.fetching"; _rc="${?}"; : $((_urls_count-=1)); + case "${_rc}" in + 0) break; ;; + 1) if [ "${_urls_count}" -ge 1 ]; then + rtl_log_msg warning "Warning: failed to acquire fetching lock for URL \`%s', retrying with alternative URL..." "${_url}"; else - exit 0; - fi;) 4<>"${_target_fname_full}.fetching"; _rc="${?}"; : $((_urls_count-=1)); - case "${_rc}" in - 0) break; ;; - 1) if [ "${_urls_count}" -ge 1 ]; then - rtl_log_msg warning "Warning: failed to acquire fetching lock for URL \`%s', retrying with alternative URL..." "${_url}"; - else - rtl_log_msg fatalexit "Error: failed to acquire fetching lock for URL \`%s'." "${_url}"; - fi; ;; - 2) if [ "${_urls_count}" -ge 1 ]; then - rtl_log_msg warning "Warning: hash mismatch for URL \`%s', retrying with alternative URL... (from build variables: %s.)"\ - "${_url}" "${_sha256sum_src}"; - else - rtl_log_msg fatalexit "Error: hash mismatch for URL \`%s' (from build variables: %s.)"\ - "${_url}" "${_sha256sum_src}"; - fi; ;; - *) if [ "${_urls_count}" -ge 1 ]; then - rtl_log_msg warning "Warning: failed to fetch URL \`%s', retrying with alternative URL... (wget(1) exit status: %s)"\ - "${_url}" "$((${_rc}-2))"; - else - rtl_log_msg fatalexit "Error: failed to fetch URL \`%s' (wget(1) exit status: %s)"\ - "${_url}" "$((${_rc}-2))"; - fi; ;; - esac; - done; - return "${_rc}"; - fi; + rtl_log_msg fatal "Error: failed to acquire fetching lock for URL \`%s'." "${_url}"; break; + fi; ;; + 2) if [ "${_urls_count}" -ge 1 ]; then + rtl_log_msg warning "Warning: hash mismatch for URL \`%s', retrying with alternative URL... (from build variables: %s.)"\ + "${_url}" "${_sha256sum_src}"; + else + rtl_log_msg fatal "Error: hash mismatch for URL \`%s' (from build variables: %s.)"\ + "${_url}" "${_sha256sum_src}"; break; + fi; ;; + *) if [ "${_urls_count}" -ge 1 ]; then + rtl_log_msg warning "Warning: failed to fetch URL \`%s', retrying with alternative URL... (wget(1) exit status: %s)"\ + "${_url}" "$((${_rc}-2))"; + else + rtl_log_msg fatal "Error: failed to fetch URL \`%s' (wget(1) exit status: %s)"\ + "${_url}" "$((${_rc}-2))"; break; + fi; ;; + esac; + done; + return "${_rc}"; }; # vim:filetype=sh diff --git a/subr/pkg_fetch_download.subr b/subr/pkg_fetch_download.subr index bfe358f6..75d49f50 100644 --- a/subr/pkg_fetch_download.subr +++ b/subr/pkg_fetch_download.subr @@ -3,14 +3,16 @@ # pkg_fetch_download() { - if [ -n "${PKG_URL:-}" ]; then - if ! rtl_fetch_url_wget "${PKG_URL}" "${PKG_SHA256SUM}" "${PKG_FNAME}" "${PKG_NAME}" "${PKG_MIRRORS}"; then - return 1; + if [ "${ARG_FETCH_FORCE:-}" != "offline" ]; then + if [ -n "${PKG_URL:-}" ]; then + if ! rtl_fetch_url_wget "${PKG_URL}" "${PKG_SHA256SUM}" "${BUILD_DLCACHEDIR}" "${PKG_FNAME}" "${PKG_NAME}" "${PKG_MIRRORS:-}"; then + return 1; + fi; fi; - fi; - if [ -n "${PKG_URLS_GIT:-}" ]; then - if ! rtl_fetch_urls_git "${PKG_BASE_DIR}" ${PKG_URLS_GIT}; then - return 1; + if [ -n "${PKG_URLS_GIT:-}" ]; then + if ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${PKG_BASE_DIR}" "${PKG_MIRRORS:-}" ${PKG_URLS_GIT}; then + return 1; + fi; fi; fi; }; diff --git a/subr/pkgtool_init.subr b/subr/pkgtool_init.subr index 76e1c33b..b33795ee 100644 --- a/subr/pkgtool_init.subr +++ b/subr/pkgtool_init.subr @@ -4,12 +4,12 @@ pkgtoolp_init_args() { local _rc=0; _status=""; - if [ "$((${ARG_INFO:-0} + ${ARG_RDEPENDS:-0} + ${ARG_SHELL:-0} + ${ARG_TARBALL:-0}))" -gt 1 ]; then + if [ "$((${ARG_INFO:-0} + ${ARG_MIRROR:-0} + ${ARG_RDEPENDS:-0} + ${ARG_SHELL:-0} + ${ARG_TARBALL:-0}))" -gt 1 ]; then cat etc/pkgtool.usage; _rc=1; _status="Error: only one of -i, -r, -s, or -t must be specified."; - elif [ "$((${ARG_INFO:-0} + ${ARG_RDEPENDS:-0} + ${ARG_SHELL:-0} + ${ARG_TARBALL:-0}))" -eq 0 ]\ + elif [ "$((${ARG_INFO:-0} + ${ARG_MIRROR:-0} + ${ARG_RDEPENDS:-0} + ${ARG_SHELL:-0} + ${ARG_TARBALL:-0}))" -eq 0 ]\ && [ -z "${ARG_RESTART_AT}" ]\ && [ "${ARG_UPDATE_DIFF:-0}" -eq 0 ]; then - cat etc/pkgtool.usage; _rc=1; _status="Error: one of -i, -r, -s, or -t must be specified."; + cat etc/pkgtool.usage; _rc=1; _status="Error: one of -i, -m, -r, -s, or -t must be specified."; else _rc=0; export TMP="${BUILD_WORKDIR}" TMPDIR="${BUILD_WORKDIR}"; fi; return "${_rc}"; }; @@ -30,7 +30,7 @@ pkgtoolp_init_env() { pkgtoolp_init_getopts() { local _opt="" _shiftfl=0 _rc=0 OPTIND=0; _status=""; : ${ARCH:="nt64"}; : ${BUILD_KIND:="debug"}; - ARG_INFO=0; ARG_RESTART_AT=""; ARG_RDEPENDS=0; ARG_UPDATE_DIFF=0; ARG_SHELL=0; ARG_TARBALL=0; + ARG_INFO=0; ARG_MIRROR=0; ARG_MIRROR_DNAME=""; ARG_RESTART_AT=""; ARG_RDEPENDS=0; ARG_UPDATE_DIFF=0; ARG_SHELL=0; ARG_TARBALL=0; while [ "${#}" -gt 0 ]; do case "${1}" in --update-diff) @@ -48,12 +48,13 @@ pkgtoolp_init_getopts() { break; elif [ "${_shiftfl:-0}" -gt 0 ]; then shift "${_shiftfl}"; continue; - elif getopts a:b:hirst _opt; then + elif getopts a:b:him:rst _opt; then case "${_opt}" in a) ARCH="${OPTARG}"; ;; b) BUILD_KIND="${OPTARG}"; ;; h) cat etc/pkgtool.usage; exit 0; ;; i) ARG_INFO=1; ;; + m) ARG_MIRROR=1; ARG_MIRROR_DNAME="${OPTARG}"; ;; r) ARG_RDEPENDS=1; ;; s) ARG_SHELL=1; ;; t) ARG_TARBALL=1; ;; @@ -66,7 +67,8 @@ pkgtoolp_init_getopts() { fi; done; if [ "${_rc}" -eq 0 ]; then - if [ -z "${PKGTOOL_PKG_NAME:-}" ]; then + if [ -z "${PKGTOOL_PKG_NAME:-}" ]\ + && [ "${ARG_MIRROR:-0}" -eq 0 ]; then _rc=1; _status="Error: missing package name."; else export PKGTOOL_PKG_NAME; fi; diff --git a/vars/gcc.vars b/vars/gcc.vars index eacb9910..92a56202 100644 --- a/vars/gcc.vars +++ b/vars/gcc.vars @@ -122,7 +122,7 @@ pkgp_gcc_stage1_all() { return 1; fi; if ! ex_pkg_state_test "${PKG_NAME}" fetch "${_restart_at}"; then - rtl_fetch_urls_git "${PKG_BASE_DIR}" "cbb-gcc-${PKG_VERSION}=${PKG_GITROOT}/cbb/cbb-gcc-${PKG_VERSION}" || return 1; + rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${PKG_BASE_DIR}" "${PKG_MIRRORS:-}" "cbb-gcc-${PKG_VERSION}=${PKG_GITROOT}/cbb/cbb-gcc-${PKG_VERSION}" || return 1; pkgp_gcc_state_set "fetch" -"patch"; fi; if ! ex_pkg_state_test "${PKG_NAME}" patch "${_restart_at}"; then @@ -210,7 +210,7 @@ pkg_gcc_full_all() { export MAKE="make LIBTOOL=slibtool ${_vis_hide}"; pkgp_gcc_build_dir "cbb-gcc-${PKG_VERSION}" native; if ! ex_pkg_state_test "${PKG_NAME}" fetch "${_restart_at}"; then - rtl_fetch_urls_git "${PKG_BASE_DIR}" "cbb-gcc-${PKG_VERSION}=${PKG_GITROOT}/cbb/cbb-gcc-${PKG_VERSION}" || return 1; + rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${PKG_BASE_DIR}" "${PKG_MIRRORS:-}" "cbb-gcc-${PKG_VERSION}=${PKG_GITROOT}/cbb/cbb-gcc-${PKG_VERSION}" || return 1; pkgp_gcc_state_set "fetch" -"patch"; fi; if ! ex_pkg_state_test "${PKG_NAME}" patch "${_restart_at}"; then diff --git a/vars/python2.vars b/vars/python2.vars index 59691f39..047b0bbc 100644 --- a/vars/python2.vars +++ b/vars/python2.vars @@ -5,7 +5,7 @@ pkg_python2_fetch_download() { if ! pkg_fetch_download\ || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython2"\ - || ! rtl_fetch_urls_git "${PKG_BASE_DIR}/build" "sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"\ + || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${PKG_BASE_DIR}/build" "${PKG_MIRRORS:-}" "sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"\ || ! ex_pkg_state_set "${PKG_NAME}" "fetch_download" "-fetch_extract"; then return 1; fi; diff --git a/vars/python2_host.vars b/vars/python2_host.vars index 00fe3790..b4fa01bd 100644 --- a/vars/python2_host.vars +++ b/vars/python2_host.vars @@ -5,7 +5,7 @@ pkg_python2_host_fetch_download() { if ! pkg_fetch_download\ || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython2"\ - || ! rtl_fetch_urls_git "${PKG_BASE_DIR}/build" "sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"\ + || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${PKG_BASE_DIR}/build" "${PKG_MIRRORS:-}" "sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"\ || ! rtl_fileop cp "../sbpython2/project/config/cfgdefs.sh" "../sbpython2/project/config/cfgdefs.sh.orig"\ || ! sed -i"" -e"s/-ltinfo/&w/" -e"s/mb_ncurses_libs='\([^']*\)'/mb_ncurses_libs='\1 -ltinfow'/" ../sbpython2/project/config/cfgdefs.sh\ || ! sed -i"" -e'108a\ diff --git a/vars/python3.vars b/vars/python3.vars index d7d31c68..c21d3a01 100644 --- a/vars/python3.vars +++ b/vars/python3.vars @@ -5,7 +5,7 @@ pkg_python3_fetch_download() { if ! pkg_fetch_download\ || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython3"\ - || ! rtl_fetch_urls_git "${PKG_BASE_DIR}/build" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"\ + || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${PKG_BASE_DIR}/build" "${PKG_MIRRORS:-}" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"\ || ! ex_pkg_state_set "${PKG_NAME}" "fetch_download" "-fetch_extract"; then return 1; fi; diff --git a/vars/python3_host.vars b/vars/python3_host.vars index 547d40f6..dac0f5de 100644 --- a/vars/python3_host.vars +++ b/vars/python3_host.vars @@ -5,7 +5,7 @@ pkg_python3_host_fetch_download() { if ! pkg_fetch_download\ || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython3"\ - || ! rtl_fetch_urls_git "${PKG_BASE_DIR}/build" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"\ + || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}" "${PKG_BASE_DIR}/build" "${PKG_MIRRORS:-}" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"\ || ! rtl_fileop cp "../sbpython3/project/config/cfgdefs.sh" "../sbpython3/project/config/cfgdefs.sh.orig"\ || ! sed -i"" -e"s/-ltinfo/&w/" -e"s/mb_ncurses_libs='\([^']*\)'/mb_ncurses_libs='\1 -ltinfow'/" "../sbpython3/project/config/cfgdefs.sh"\ || ! sed -i"" -e'108a\ |