[MacPorts] #74198: luarocks portgroup attempts to redefine private procedures
MacPorts
noreply at macports.org
Thu Jul 9 11:23:30 UTC 2026
#74198: luarocks portgroup attempts to redefine private procedures
---------------------+--------------------
Reporter: Veence | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: |
---------------------+--------------------
Comment (by Veence):
Ok, here is the analysis of Claude:
Found it — this is the exact mechanism, and it's not luarocks_org-1.0.tcl
you found earlier by that name in the debug log (that must be a different
variant/naming), it's this luarocks-1.1.tcl. Near the bottom, inside the
subport ${name} {} stub block, there's this loop:
{{{
tcluplevel 2 {
foreach phase {patch configure build destroot test} {
foreach part {pre procedure post} {
foreach p [ditem_key [set org.macports.${phase}] ${part}] {
if {[info procs user${p}] ne ""} {
set proc_name user${p}
} else {
set proc_name ${p}
}
proc ${proc_name} {{args ""}} {}
}
}
}
}
}}}
For phase = build and phase = test, with part = procedure, ditem_key
returns the fully-qualified internal phase-procedure names — which are
exactly portbuild::build_main and porttest::test_main. The code then does
a bare proc ${proc_name} {{args ""}} {}, i.e. it directly redefines those
namespaced internal procs as no-ops, in order to stub out the dummy parent
subport so it does nothing during those phases.
So I suppose tcl8.6 permits the override while tcl9 forbids it.
--
Ticket URL: <https://trac.macports.org/ticket/74198#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list