<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/f97e05527cd9715e8e6aa26ac2f801e678b8521d">https://github.com/macports/macports-base/commit/f97e05527cd9715e8e6aa26ac2f801e678b8521d</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit f97e05527cd9715e8e6aa26ac2f801e678b8521d
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sat Apr 6 19:40:50 2024 +1100
<span style='display:block; white-space:pre;color:#404040;'> Don't write out clean caches
</span>---
src/macports1.0/macports.tcl | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
<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 7c3f525c0..3ca660177 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;'>@@ -94,6 +94,7 @@ namespace eval macports {
</span>
variable ui_prefix {---> }
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable cache_dirty [dict create]
</span> variable tool_path_cache [dict create]
variable variant_descriptions [dict create]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1791,9 +1792,10 @@ proc mportshutdown {} {
</span> global macports::portdbpath
# save cached values
if {[file writable $portdbpath]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::ping_cache macports::compiler_version_cache
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Only save the cache if it was used
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[trace info variable ping_cache] eq ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global macports::ping_cache macports::compiler_version_cache \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports::cache_dirty
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Only save the cache if it was updated
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $cache_dirty pingtimes]} {
</span> # don't save expired entries
set now [clock seconds]
set pinglist_fresh [dict filter $ping_cache script {host entry} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1801,7 +1803,7 @@ proc mportshutdown {} {
</span> }]
macports::save_cache pingtimes $pinglist_fresh
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[trace info variable compiler_version_cache] eq ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[dict exists $cache_dirty compiler_versions]} {
</span> macports::save_cache compiler_versions $compiler_version_cache
}
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6176,6 +6178,8 @@ proc macports::get_pingtime {host} {
</span> proc macports::set_pingtime {host ms} {
variable ping_cache
dict set ping_cache $host [list $ms [clock seconds]]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable cache_dirty
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set cache_dirty pingtimes 1
</span> }
# Deferred loading of compiler version cache
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6235,6 +6239,8 @@ proc macports::get_compiler_version {compiler developer_dir} {
</span> return -code error "couldn't determine build number of compiler \"${compiler}\""
}
dict set compiler_version_cache versions $developer_dir $compiler $compiler_version
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ variable cache_dirty
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set cache_dirty compiler_versions 1
</span> return $compiler_version
}
</pre><pre style='margin:0'>
</pre>