<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/76d2571da15940cdf32b82c67bf03ad9aaa7c7ba">https://github.com/macports/macports-base/commit/76d2571da15940cdf32b82c67bf03ad9aaa7c7ba</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 76d2571da15940cdf32b82c67bf03ad9aaa7c7ba
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Mon Jul 8 17:35:13 2024 +1000
<span style='display:block; white-space:pre;color:#404040;'> selfupdate: use existing file with good signature
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> This situation could arise if the source downloads OK but fails to
</span><span style='display:block; white-space:pre;color:#404040;'> build due to Xcode issues (wrong version, license not accepted, etc).
</span>---
src/macports1.0/selfupdate.tcl | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/selfupdate.tcl b/src/macports1.0/selfupdate.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 956049c10..ea33d72f3 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/selfupdate.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/selfupdate.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -221,6 +221,13 @@ proc selfupdate::download_source {mp_source_path macports_version_new} {
</span> set signature_filename [file tail $signature_url]
set signature_filepath [file join $mp_source_path $signature_filename]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file isfile $filepath] && [file isfile $signature_filepath]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && ![catch {verify_signature $filepath $signature_filepath}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_msg "Verified existing file for $release_url"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set tarball $filepath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Download source code tarball
ui_msg "$ui_prefix Attempting to fetch MacPorts $macports_version_new source code from $release_url"
macports_try -pass_signal {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -241,7 +248,7 @@ proc selfupdate::download_source {mp_source_path macports_version_new} {
</span> }
macports_try -pass_signal {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- selfupdate::verify_signature $filepath $signature_filepath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ verify_signature $filepath $signature_filepath
</span> } on error {eMessage} {
set selfupdate_errors($release_url) "Error verifying signature for $release_url: $eMessage"
ui_info [set selfupdate_errors($release_url)]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -318,7 +325,7 @@ proc selfupdate::download_source_rsync {} {
</span> # verify signature for tarball
set tarball ${mp_source_path}/${tarfile}
set signature ${tarball}.rmd160
<span style='display:block; white-space:pre;background:#ffe0e0;'>- selfupdate::verify_signature_legacy $tarball $signature
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ verify_signature_legacy $tarball $signature
</span>
if {${hfscompression} && [getuid] == 0 &&
![catch {macports::binaryInPath bsdtar}] &&
</pre><pre style='margin:0'>
</pre>