41 Commits
Author SHA1 Message Date
Joshua Root 16126b249b mpbb-cleanup: report correct port name for build dirs 2025-08-11 15:19:55 +10:00
Joshua Root 0e465824df Remove port-tclsh workaround
Reverts e30835a.
See: https://trac.macports.org/ticket/72359
2025-04-29 22:45:18 +10:00
Joshua Root 42e51b5cf1 cleanup: avoid timeout when deleting build dirs
Use a script that prints some output every 5 minutes while deleting,
rather than just rm.
2024-01-20 22:39:33 +11:00
Joshua Root 14b563c315 cleanup: only run uninstall-unneeded-ports on watcher
Doing this in response to low disk space had a higher chance of freeing
space by uninstalling something that was just built as a dependency of
the next build, meaning it would be immediately reinstalled.
2024-01-20 21:30:57 +11:00
Joshua Root 8f12db95ce cleanup: delete stuff until there's enough space
See: https://trac.macports.org/ticket/57464
See: https://trac.macports.org/ticket/57869
2022-09-14 00:20:34 +10:00
Joshua Root c9859c9a15 Do extra cleanup on portbuilder if space is low
See: https://trac.macports.org/ticket/57464
2022-09-13 21:23:01 +10:00
Joshua Root b1b2fe2038 Increase failcache clean interval to 1 week
Stale entries don't seem to build up very quickly.
2022-05-24 08:39:32 +10:00
Joshua Root 356e44a651 mpbb-cleanup: print heading for failcache cleanup 2022-05-17 07:47:10 +10:00
Joshua Root 9cae30a703 mpbb-cleanup: clean out failcache daily 2022-05-16 23:41:42 +10:00
Joshua Root e30835a206 mpb: resolve port-tclsh symlink before executing
This avoids an undesirable modification of auto_path due to Tcl trying
to be helpful.

Closes: https://trac.macports.org/ticket/64507
2022-01-25 03:16:52 +11:00
Joshua Root f83c5266f6 mpbb dependency management improvements
* Only deactivate ports that are not needed for the next build, rather
  than always deactivating everything.
* Only deactivate ports before dependency installations if building
  from source (most installs will now be from an archive).
* Fail fast if a dependency is in the failcache, rather than continuing
  to check the rest of the deps. That does mean that multiple failed
  deps might have to be discovered one at a time by maintainers, but
  on the other hand the failcache checks can really add up and cause us
  to spend significant time on a port that we already know will fail.
* Replace much shell code with Tcl in order to take advantage of direct
  API access to avoid repeated work.
* Turn off verbose and debug output during the final activation step.

See: https://trac.macports.org/ticket/62621
2022-01-01 17:54:28 +11:00
Joshua Root 9df6488863 mpbb-cleanup: only delete distfiles in watcher builds
This only cares about files more than 4 hours old, so it doesn't need
to run on every single triggered build.
2021-12-27 15:23:05 +11:00
Joshua Root 7b83efacea mpbb-cleanup: only uninstall ports in watcher builds
It's reasonably common for ports to have a number of dependencies that
aren't used by anything else. Installing one of these ports for the
first time performs very poorly when ports with one or less dependents
are uninstalled between every build, as many of the deps that are
built are immediately uninstalled, only to be installed (and
uninstalled) again and again in subsequent builds.

Only uninstalling these ports as part of portwatcher builds should
greatly mitigate this effect.
2021-12-27 15:00:45 +11:00
Ryan Schmidt 7437ebff07 Reduce frequency of output due to "wait" file 2021-06-23 20:39:31 -05:00
Ryan Schmidt 7c3daba511 Wait before cleaning watcher if "wait" file exists
See: https://trac.macports.org/ticket/53587
2021-06-23 20:33:16 -05:00
Ryan Schmidt 3d00ef01d6 Handle negative numbers in format_size 2019-06-06 22:36:11 -05:00
Ryan SchmidtandRyan Schmidt a6c808a27a Rename uninstall-old-ports.tcl to uninstall-unneeded-ports.tcl 2019-06-06 20:53:09 -05:00
Ryan SchmidtandRyan Schmidt 3fde6c2a86 Show disk space saved by cleanup 2019-06-06 20:53:09 -05:00
Ryan Schmidt 5c9a16d91d Decrease distfile cache time to 4 hours
We don't have enough free disk space on the buildworkers to cache lots
of large distfiles.
2018-10-02 12:55:00 -05:00
Ryan Schmidt f15133325b Don't cleanup distfiles if distfiles is a symlink
It might be a symlink to the master distfiles mirror and we don't want
to risk deleting that.
2018-03-07 08:42:10 -06:00
Joshua Root 98c280c6e5 Use echo instead of installed
Slightly better performance.
2017-02-12 20:41:46 +11:00
Lawrence Velázquez 20072aff77 mpbb: Remove --port and --prefix from subcommands
The updated Buildbot configuration is now live.

Shortest deprecation periods ever!

git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@152624 d073be05-634f-4543-b044-5fe20cf6d1d6
2016-09-13 14:25:42 +00:00
Lawrence Velázquez d39d16cc99 mpbb: Implement new help system
The `--help` option has been replaced by a new `help` subcommand.
Invoking `mpbb help` displays global usage and available subcommands,
while `mpbb help <subcommand>` displays subcommand-specific usage.

Each subcommand script `mpbb-FOO` must now define a function `FOO-usage`
that prints its specific help to standard out.

git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@152528 d073be05-634f-4543-b044-5fe20cf6d1d6
2016-09-12 01:59:04 +00:00
Lawrence Velázquez d717dc3e7d mpbb: Separate global and subcommand options
À la Git, command-line options that are applicable to all subcommands
(e.g., `--prefix`) are now given before the subcommand name, while
options that are specific to particular subcommands (e.g.,
`--archive-site`) come after. For example, this:

    mpbb checkout --prefix /opt/local --svn /usr/bin/svn

is now:

    mpbb --prefix /opt/local checkout --svn /usr/bin/svn

This is a practical improvement as well as a conceptual one, as the
Buildbot configuration will be able to factor out the common command
prefix like so:

    cmd = ('./mpbb/mpbb', '--prefix', WithProperties(prefix))
    cmd_selfupdate = cmd + ('selfupdate',)
    cmd_checkout = cmd + ('checkout', '--svn-url', svnurl)
    [...]

For backwards compatibility with our current Buildbot deployment, all
subcommands except `list-subports` still accept `--prefix`.

git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@152525 d073be05-634f-4543-b044-5fe20cf6d1d6
2016-09-12 01:58:56 +00:00
Rainer Müller d3d8ba3632 buildbot: skip cleanup if port is not installed
git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@152507 d073be05-634f-4543-b044-5fe20cf6d1d6
2016-09-11 18:47:58 +00:00