<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/4c63e8d0a0ae3b89f25138b340a87049901206a3">https://github.com/macports/macports-base/commit/4c63e8d0a0ae3b89f25138b340a87049901206a3</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 4c63e8d0a0ae3b89f25138b340a87049901206a3
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sun Feb 25 12:47:59 2024 +1100
<span style='display:block; white-space:pre;color:#404040;'> Move pingtimes into cache subdir
</span>---
Makefile.in | 5 +++++
portmgr/dmg/postflight.in | 5 +++++
src/macports1.0/macports.tcl | 20 +++-----------------
3 files changed, 13 insertions(+), 17 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/Makefile.in b/Makefile.in
</span><span style='display:block; white-space:pre;color:#808080;'>index 3db2734fe..c6b83911b 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -33,6 +33,7 @@ include $(srcdir)/Mk/macports.subdir.mk
</span>
install::
[ ! -f "$(DESTDIR)${sysconfdir}/macports/mp_version" ] || rm -vf "$(DESTDIR)${sysconfdir}/macports/mp_version"
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "$(DESTDIR)${localstatedir}/macports/cache"
</span> $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "$(DESTDIR)${datadir}/macports/"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 setupenv.bash "$(DESTDIR)${datadir}/macports/"
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 $(srcdir)/macports-pubkey.pem "$(DESTDIR)${datadir}/macports/"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -93,6 +94,10 @@ ifeq ($(DESTDIR),)
</span> else \
echo "Can't find ${DSCL} / ${DSEDITGROUP}, not creating user \"${RUNUSR}\"" ; \
fi
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Move ping cache to new location
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ @if [ -f "${localstatedir}/macports/pingtimes" ]; then \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mv "${localstatedir}/macports/pingtimes" "${localstatedir}/macports/cache/pingtimes"; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span> # Add [default] tag to the central MacPorts repository, if it isn't already
$(TCLSH) $(srcdir)/src/upgrade_sources_conf_default.tcl "${prefix}"
# Convert image directories (and direct mode installs) to image archives
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/portmgr/dmg/postflight.in b/portmgr/dmg/postflight.in
</span><span style='display:block; white-space:pre;color:#808080;'>index 004359af7..538fafd75 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/portmgr/dmg/postflight.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/portmgr/dmg/postflight.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -223,6 +223,11 @@ cleanup_man
</span> delete_old_tcl_package_link
delete_old_tcl_packages
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Move ping cache to new location
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if [[ -f "${PREFIX}/var/macports/pingtimes" ]]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mv "${PREFIX}/var/macports/pingtimes" "${PREFIX}/var/macports/cache/pingtimes"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Determine the user's shell, in order to choose an appropriate configuration file we'll be tweaking.
# Exit nicely if the shell is any other than bash or tcsh, as that's considered non-standard.
USHELL=$(${DSCL} . -read "/Users/${USER}" shell) || {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/macports.tcl b/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 36512cbb8..c93d761c8 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1588,17 +1588,7 @@ match macports.conf.default."
</span> set env(CCACHE_DIR) $macports::ccache_dir
# load cached ping times
<span style='display:block; white-space:pre;background:#ffe0e0;'>- macports_try -pass_signal {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set pingfile -1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set pingfile [open ${macports::portdbpath}/pingtimes r]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::ping_cache [dict create {*}[gets $pingfile]]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } on error {} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set macports::ping_cache [dict create]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } finally {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$pingfile != -1} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- close $pingfile
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set macports::ping_cache [macports::load_cache pingtimes]
</span> if {![info exists macports::host_blacklist]} {
set macports::host_blacklist {}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1648,17 +1638,13 @@ proc mportshutdown {} {
</span> # save cached values
if {[file writable $portdbpath]} {
global macports::ping_cache macports::compiler_version_cache
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists ping_cache]} {
</span> # don't save expired entries
set now [clock seconds]
set pinglist_fresh [dict filter $ping_cache script {host entry} {
expr {$now - [lindex $entry 1] < 86400}
}]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set pingfile [open ${portdbpath}/pingtimes w]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- puts $pingfile $pinglist_fresh
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- close $pingfile
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } result]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Error writing ${portdbpath}/pingtimes: $result"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::save_cache pingtimes $pinglist_fresh
</span> }
if {[info exists compiler_version_cache]} {
macports::save_cache compiler_versions $compiler_version_cache
</pre><pre style='margin:0'>
</pre>