[MacPorts] #73827: There are multiple sources.conf files

MacPorts noreply at macports.org
Tue May 12 18:28:48 UTC 2026


#73827: There are multiple sources.conf files
-------------------------+-----------------------------
  Reporter:  ryandesign  |      Owner:  herbygillot
      Type:  defect      |     Status:  closed
  Priority:  Normal      |  Milestone:  MacPorts Future
 Component:  base        |    Version:
Resolution:  fixed       |   Keywords:
      Port:              |
-------------------------+-----------------------------
Changes (by herbygillot):

 * status:  new => closed
 * owner:  (none) => herbygillot
 * resolution:   => fixed


Comment:

 In [changeset:"10849847982ac0e2fdf72152eac5e9ef3bac2be7/macports-base"
 10849847982ac0e2fdf72152eac5e9ef3bac2be7/macports-base] (master):
 {{{
 #!ConfigurableCommitTicketReference repository="macports-base"
 revision="10849847982ac0e2fdf72152eac5e9ef3bac2be7"
 tests: consolidate duplicated test setup code and config files

 Extract the shared boilerplate (macports init, tmp prefix setup,
 mportinit, macports_worker_init) from 27 test files into a single
 test_setup.tcl sourced by all unit test suites.  Merge the three
 divergent copies of macports_worker_init into one consolidated
 superset.  Fixes #73828.

 Eliminate the duplicate sources.conf files in port1.0/tests/ and
 package1.0/tests/ by having init_tmp_prefix derive the path from
 top_srcdir, leaving a single copy in macports1.0/tests/.  Fixes
 #73827.

 Expose the test tclsh path as macports::autoconf::test_tclsh so
 tests can reference it without recomputing the path from
 top_srcdir.

 Replace the hardcoded /tmp/macports-tests path in the integration
 test infrastructure with a unique temporary directory created via
 `file tempfile`, which respects TMPDIR and avoids collisions
 between parallel or repeated runs.  Move macports.conf and
 sources.conf content into static template files with @TEST_ROOT@
 substitution so the config structure is visible on disk rather
 than generated inline.

 Install a ::tcltest::cleanupTestsHook in the integration test
 library so the temporary directory is removed via cleanupTests
 even if a test omits its trailing explicit `cleanup` call.

 Fix tests/test/arch-test/test.tcl, which invoked ${bindir}/port
 via `sh -c` but never had bindir defined anywhere, to run
 port.tcl directly through the test interpreter.

 Replace hardcoded /tmp paths in portutil.test with $pwd-relative
 paths.

 Fixes: https://trac.macports.org/ticket/73828
 Fixes: https://trac.macports.org/ticket/73827

 Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/73827#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list