Remove port-tclsh workaround

Reverts e30835a.
See: https://trac.macports.org/ticket/72359
This commit is contained in:
Joshua Root
2025-04-29 22:45:18 +10:00
parent 5fa50e5df6
commit 0e465824df
8 changed files with 12 additions and 13 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ failcache_key() {
fi
local canonical_variants
canonical_variants=$("$(readlink "${option_prefix}/bin/port-tclsh")" "${thisdir}/tools/canonical-variants.tcl" "$@")
canonical_variants=$("${option_prefix}/bin/port-tclsh" "${thisdir}/tools/canonical-variants.tcl" "$@")
if [ $? -ne 0 ]; then
err "tools/canonical-variants.tcl" "$@" "failed"
return 4
+4 -4
View File
@@ -86,7 +86,7 @@ cleanup() {
echo "----> Uninstalling unneeded ports"
# $thisdir is set by mpbb and points to the directory in which this script resides
# shellcheck disable=SC2154
"$(readlink "${option_prefix}/bin/port-tclsh")" "${thisdir}/tools/uninstall-unneeded-ports.tcl"
"${option_prefix}/bin/port-tclsh" "${thisdir}/tools/uninstall-unneeded-ports.tcl"
fi
if [ ! -L "${option_prefix}/var/macports/distfiles" ]; then
echo
@@ -99,7 +99,7 @@ cleanup() {
if [[ ! -f "$timestamp" || $(($(date +%s) - $(stat -f %m "$timestamp"))) -gt 604800 ]]; then
echo
echo "----> Deleting unneeded failcache entries"
"$(readlink "${option_prefix}/bin/port-tclsh")" "${thisdir}/tools/failcache-cleanup.tcl" --failcache_dir "${option_failcache_dir}"
"${option_prefix}/bin/port-tclsh" "${thisdir}/tools/failcache-cleanup.tcl" --failcache_dir "${option_failcache_dir}"
touch "$timestamp"
fi
fi
@@ -109,7 +109,7 @@ cleanup() {
ports="$(find "${option_prefix}/var/macports/${dir}" -name '.*' -prune -o -depth 2 -type d -print | sed 's,^.*/,,' | sort -fu)"
for port in ${ports}; do
echo "Deleting ${dir} for ${port}"
"$(readlink "${option_prefix}/bin/port-tclsh")" "${thisdir}/tools/noisy-delete.tcl" "${option_prefix}/var/macports/${dir}"/*/"${port}"
"${option_prefix}/bin/port-tclsh" "${thisdir}/tools/noisy-delete.tcl" "${option_prefix}/var/macports/${dir}"/*/"${port}"
done
rm -rf "${option_prefix}/var/macports/${dir}"/*
echo
@@ -124,7 +124,7 @@ cleanup() {
echo "----> Trying to free more disk space"
# $thisdir is set by mpbb and points to the directory in which this script resides
# shellcheck disable=SC2154
"$(readlink "${option_prefix}/bin/port-tclsh")" "${thisdir}/tools/reclaim-space.tcl" "$disk_free_after" "$DISK_FREE_THRESHOLD"
"${option_prefix}/bin/port-tclsh" "${thisdir}/tools/reclaim-space.tcl" "$disk_free_after" "$DISK_FREE_THRESHOLD"
# $option_prefix is set in mpbb
# shellcheck disable=SC2154
disk_free_after=$(disk_free "$option_prefix")
+1 -1
View File
@@ -53,7 +53,7 @@ gather-archives() {
# $option_prefix is set in mpbb
# shellcheck disable=SC2154
tclsh=$(readlink "${option_prefix}/bin/port-tclsh")
tclsh="${option_prefix}/bin/port-tclsh"
if [ -d "${option_staging_dir}" ]; then
find "${option_staging_dir}" -type f -delete -print | sed -E -e "s|^.*/||" -e 's/^/Deleting previously staged archive: /'
+1 -2
View File
@@ -28,10 +28,9 @@ install-dependencies() {
# Script attempts to get to a state where all dependencies (and
# only dependencies) of the port are active
# Use of readlink is due to https://trac.macports.org/ticket/64507
# $option_prefix and $thisdir are set in mpbb
# shellcheck disable=SC2154
"$(readlink "${option_prefix}/bin/port-tclsh")" "${thisdir}/tools/dependencies.tcl" --failcache_dir "${option_failcache_dir}" \
"${option_prefix}/bin/port-tclsh" "${thisdir}/tools/dependencies.tcl" --failcache_dir "${option_failcache_dir}" \
--logs_dir "${option_log_dir}" "$@"
result=$?
if [ $result -ne 0 ]; then
+2 -2
View File
@@ -52,7 +52,7 @@ install-port() {
# $option_prefix and $thisdir are set in mpbb
# shellcheck disable=SC2154
local imagepath=$("$(readlink "${option_prefix}/bin/port-tclsh")" "${thisdir}/tools/archive-path.tcl" "$@")
local imagepath=$("${option_prefix}/bin/port-tclsh" "${thisdir}/tools/archive-path.tcl" "$@")
if [[ -f "$imagepath" || -d "${imagepath%.*}" ]]; then
echo "$* already installed, nothing to do"
# log: summary for the portwatcher
@@ -74,7 +74,7 @@ install-port() {
echo "Fetch of '$port' failed."
if [ -n "$option_mirrordb_url" ]; then
echo "Waiting for '$port' to be mirrored."
if "$(readlink "${option_prefix}/bin/port-tclsh")" "${thisdir}/tools/wait-for-mirror.tcl" \
if "${option_prefix}/bin/port-tclsh" "${thisdir}/tools/wait-for-mirror.tcl" \
"$option_mirrordb_url" "$option_mirrordb_credentials" "$port"; then
echo "Mirroring of '$port' done. Retrying fetch."
if ! "${option_prefix}/bin/port" -d fetch "$@"; then
+1 -1
View File
@@ -35,7 +35,7 @@ print-subports() {
# $option_prefix is set in mpbb
# shellcheck disable=SC2154
tclsh=$(readlink "${option_prefix}/bin/port-tclsh")
tclsh="${option_prefix}/bin/port-tclsh"
# $option_prefix is set in mpbb
# shellcheck disable=SC2154
if [ "${include_deps}" = "yes" ]; then
+1 -1
View File
@@ -73,6 +73,6 @@ mirror-distfiles() {
# Mirror the distfiles.
# $option_prefix is set by mpbb
# shellcheck disable=SC2154
"$(readlink "${option_prefix}/bin/port-tclsh")" "${thisdir}/tools/mirror-multi.tcl" -c "${option_work_dir}/mirrorcache" "$@"
"${option_prefix}/bin/port-tclsh" "${thisdir}/tools/mirror-multi.tcl" -c "${option_work_dir}/mirrorcache" "$@"
#"${option_prefix}/bin/port" -p mirror "$@" $("${option_prefix}/bin/port" -pq rdeps --index "$@" | sed -E -e '/^--$/d' -e 's/^[[:space:]]+//' | sort -u)
}
+1 -1
View File
@@ -37,7 +37,7 @@ print-info() {
# $option_prefix is set in mpbb
# shellcheck disable=SC2154
if portvariants=$("$(readlink "${option_prefix}/bin/port-tclsh")" tools/canonical-variants.tcl "$port"); then
if portvariants=$("${option_prefix}/bin/port-tclsh" tools/canonical-variants.tcl "$port"); then
printf "portvariants=%s\n" "$portvariants"
fi