47 Commits
Author SHA1 Message Date
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 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 f2248d8a74 mpbb-install-dependencies: log time taken for each task 2021-12-29 17:57:53 +11:00
Joshua Root be743153f9 Don't install deps for already installed ports
This was previously done so that the dependencies' archives could be
gathered if needed, but now that will have been done in separate
builds.

Closes: https://trac.macports.org/ticket/57568
2021-12-27 17:57:38 +11:00
Joshua Root bb4a1f6089 mpbb: preprocessing improvements
* Start separate builds for unbuilt dependencies.
* gather-archives can therefore consider only the port being built and
  not worry about its deps.
* Exclude ports that have any dependency that sets 'known_fail yes'.
* Exclude dependencies that have a failcache entry or have a recursive
  dependency that does. The ports that the build was actually requested
  for are still built even if a dep is in the failcache, so that the
  failure will be reported to maintainers.
* Delete stale entries from the failcache for relevant ports while
  we're at it.

Fixes: https://trac.macports.org/ticket/60935
2021-01-04 23:31:46 +11:00
Rainer Müller f808328118 mpbb-install-dependencies: Run archivefetch first 2018-04-04 19:32:28 +02:00
Rainer Müller 639def5ad9 mpbb-install-*: Fetch in separate command first
This makes it easier to identify fetch failures. Do not write to
failcache when fetching failed as this is likely a temporary problem.
2018-04-04 18:47:33 +02:00
Ryan Schmidt 78270750b2 Fix typo in comment 2018-03-19 18:46:38 -05:00
Ryan Schmidt e060d60a99 Move get-maintainers to functions 2018-03-07 06:39:46 -06:00
Joshua Root 17f1018819 Fix check for already installed port 2017-08-09 08:39:38 +10:00
Joshua Root f6e46815a5 Only request variants explicitly when needed. 2017-07-08 19:43:05 +10:00
Joshua Root 4162046ce0 Fix gathering archives when ports are inactive 2017-02-12 21:26:34 +11:00
Joshua Root ccb7c12c68 Update get-maintainers for 2.4 2017-01-29 18:44:21 +11:00
Joshua Root 65756210fd Skip upgrading deps when installing ports
The way mpbb works ensures that the deps will already be the latest
version.
2016-12-27 11:03:15 +11:00
Rainer Müller ec5c52f33b Remove executable bits on sourced files
These scripts are not meant to be executed directly.
2016-12-02 21:22:16 +01:00
Joshua Root f95d4e3fce use install instead of activate to avoid variant ambiguity 2016-11-30 10:20:21 +11:00
Joshua Root 426f9e7b17 add successcache support to mpbb
Check if the archive for the requested port exists in its installed
location, and if so, simply skip installing.

Do the same for each dependency. Dependencies are still built if not
already installed (even if the requested port is somehow already
installed), so their archives can be uploaded.

Deactivate all ports between builds when installing dependencies.
Activate all the dependencies after they are all installed iff the
requested port will need to be built.

Fixes: https://trac.macports.org/ticket/52765
2016-11-30 10:06:17 +11:00
Mojca Miklavec 355f21fc65 mpbb: Fix maintainers' e-mail extraction
MacPorts 2.3.5 lists maintainers in a different format:
    Email: username@macports.org, GitHub: username
which broke extraction of maintainers' emails.

This is a temporary workaround before a better fix is committed to base.
2016-11-25 08:24:00 +01: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
Clemens Lang 4c4cc7ae32 mp-buildbot: Don't re-run previously failed builds
If a port's build has previously failed, we do not want to waste cycles
to re-attempt it (e.g. as dependencies of other ports), unless the
failed port's definition has changed.

To achieve that, create a file with a reference to the last failed build
for every failing port, and fail builds that depend on failed ports
early.

git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@152581 d073be05-634f-4543-b044-5fe20cf6d1d6
2016-09-12 19:14:24 +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
Lawrence Velázquez 42ff40d0e2 mpbb: Rename "logdir" to "log_dir"
In option names, consistently separate words with underscores (e.g.,
"option_staging_dir").

git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@152164 d073be05-634f-4543-b044-5fe20cf6d1d6
2016-08-30 21:59:26 +00:00
Lawrence Velázquez 80dc5a74bb mpbb: Remove "--variants" option
Variants will be passed in the positional parameters along with port
names. Not implemented yet.

git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@152163 d073be05-634f-4543-b044-5fe20cf6d1d6
2016-08-30 20:50:48 +00:00