<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/eb69960ef9caba8387888cad02d682b3c4de091a">https://github.com/macports/macports-base/commit/eb69960ef9caba8387888cad02d682b3c4de091a</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new eb69960ef portindex: preserve attributes of PortIndex if possible
</span>eb69960ef is described below
<span style='display:block; white-space:pre;color:#808000;'>commit eb69960ef9caba8387888cad02d682b3c4de091a
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Thu Dec 14 08:37:24 2023 +1100
<span style='display:block; white-space:pre;color:#404040;'> portindex: preserve attributes of PortIndex if possible
</span>---
src/port/portindex.tcl | 9 +++++++++
1 file changed, 9 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port/portindex.tcl b/src/port/portindex.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index d3013e6c0..a23a26e9a 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port/portindex.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port/portindex.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -399,6 +399,13 @@ set outpath [file join $outdir PortIndex]
</span> # open old index for comparison
if {[file isfile $outpath] && [file isfile ${outpath}.quick]} {
set oldmtime [file mtime $outpath]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set attrlist [list -permissions]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[getuid] == 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend attrlist -owner -group
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach attr $attrlist {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend oldattrs $attr [file attributes $outpath $attr]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> set newest $oldmtime
if {![catch {set oldfd [open $outpath r]}] && ![catch {set quickfd [open ${outpath}.quick r]}]} {
if {![catch {set quicklist [read $quickfd]}]} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -410,6 +417,7 @@ if {[file isfile $outpath] && [file isfile ${outpath}.quick]} {
</span> }
} else {
set newest 0
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set oldattrs [list -permissions 00644]
</span> }
set fd [file tempfile tempportindex mports.portindex.XXXXXXXX]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -456,6 +464,7 @@ if {$exit_fail} {
</span>
file rename -force $tempportindex $outpath
file mtime $outpath $newest
<span style='display:block; white-space:pre;background:#e0ffe0;'>+file attributes $outpath {*}$oldattrs
</span> mports_generate_quickindex $outpath
puts "\nTotal number of ports parsed:\t$stats(total)\
\nPorts successfully parsed:\t[expr {$stats(total) - $stats(failed)}]\
</pre><pre style='margin:0'>
</pre>