Commit Graph

9037 Commits

Author SHA1 Message Date
Fred Wright 928dc476a4 Fix possible PortIndex rsync update failure.
When attempting to update the local PortIndex from the precomputed
version for the current OS/arch, there is sometimes a preexisting
version with the correct mtime and size, but not the correct content.
With the default options, rsync fails to update it.  This change
suppresses skipping based on size and time (for the index-related
files, not the tarball).

This bug has no obvious user-visible effect, since the bad PortIndex
fails the signature check and is then regenerated, costing extra
time but not malfunctioning.  It's visible in the debug output.

TESTED:
Now correctly uses the downloaded index in a formerly failing case.
2026-06-26 09:52:30 +10:00
Joshua Root 705a14db2b portfile.7: attempt to fix syntax error
See: https://trac.macports.org/ticket/74123
2026-06-21 02:03:03 +10:00
Joshua Root dc32ae80b9 macports.tcl: add missing msgcat package
Closes: https://trac.macports.org/ticket/74119
2026-06-20 07:04:01 +10:00
Joshua Root e545ebe8c5 Defer loading of some packages 2026-06-18 05:39:46 +10:00
Joshua Root 63e51116d7 fetch_common: remove unused variable 2026-06-18 04:46:27 +10:00
Joshua Root ea7f26f176 mportsync: call getuid once outside loop
Closes: https://trac.macports.org/ticket/74113
2026-06-16 18:37:58 +10:00
Paul Guyot 4665f63232 Parse ar files for Mach-O code
Signed-off-by: Paul Guyot <pguyot@kallisys.net>
2026-06-15 21:49:26 +02:00
Clemens Lang 1db3e7ff4a darwintrace: Retry for EBADF when socket is closed
This currently triggers during the gtk3 build, suggesting there's a way
to close the file descriptors that isn't being caught by trace mode.
Work around this by re-establishing the connection when this happens.
2026-06-11 22:23:12 +02:00
Joshua Root 2229835b16 restore::main: add missing variable declaration 2026-06-11 07:34:38 +10:00
Joshua Root 445c7954c6 Document extract.methods
Also correct extract.suffix values
2026-06-04 16:49:17 +10:00
Joshua Root 52a975c0e7 Update ChangeLog 2026-06-04 16:14:49 +10:00
Joshua Root 6a6ec8067b Show phase durations at info level if using -T 2026-06-04 15:46:15 +10:00
Joshua Root 17defca435 Update ChangeLog 2026-05-25 03:51:36 +10:00
Joshua Root 22e1abd866 Add --purge option for port clean 2026-05-25 03:49:53 +10:00
Joshua Root 76d81e59d8 mportsync: clean up daily tarball's sig too 2026-05-21 21:07:58 +10:00
Joshua Root 6002a04f8c mportsync: factor out common code for extraction
Use the code that was being used to extract rsynced tarballs for the
tarball over http/ftp case as well. It looks like this also fixes the
bug that in the latter case, files no longer present in the tarball
were never deleted from the extracted location. (This appears to have
been the case since the daily tarball feature was added.)
2026-05-21 20:59:09 +10:00
Joshua Root 4266d00ade tcllib: fix tar header reading bug
Upstream: https://core.tcl-lang.org/tcllib/info/b01462dff791ba84
2026-05-21 20:36:29 +10:00
Joshua Root c6ef6c89ac mportsync: ensure ports tree is owned by root
The unprivileged macports user should not be able to modify the ports.
2026-05-21 01:36:28 +10:00
Herby Gillot 1084984798 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@anthropic.com>
2026-05-12 14:28:40 -04:00
Joshua Root ffdb12fff0 livecheck: ensure temp files are always cleaned up 2026-05-11 19:49:40 +10:00
Joshua Root 6d9edb07a8 Don't rely on env vars for curl in worker threads 2026-05-04 13:08:50 +10:00
Joshua Root 6d4444ab20 tcl: add gcc version check for __builtin_unreachable
https://core.tcl-lang.org/tcl/tktview/d0801e89aa4009ad7877a4d42413ce9f315f32d4
2026-05-01 22:49:47 +10:00
Joshua Root 9fa5676238 sysctl.c: remove trailing whitespace 2026-04-29 23:06:51 +10:00
Joshua Root 7f73b3e46d ReleaseProcess: remove macports-ci-files 2026-04-25 21:03:47 +10:00
Joshua Root 6bce7be7a3 mport_fetch_thread: improve main loop
Simplify by using lpop on queues. If a thread was not available, don't
try to get one for the next queue(s) before waiting.
2026-04-25 03:08:49 +10:00