-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failure due to deleted etc
files from built dependencies
#805
Labels
Comments
Good catch @cho-m. This will need a bug fix to test-bot. |
carlocab
added a commit
to carlocab/homebrew-test-bot
that referenced
this issue
Sep 26, 2022
1. Doing `brew install --only-dependencies` and `brew postinstall` can be quite expensive. Let's defer this to when we're sure we have dependents to test. 2. Calling `brew uses` is slow, because this requires traversing the dependency tree. [*] Let's avoid doing this unless we know we really need to. Here, we test for "needing to" by checking if another `.rb` file in the tap that might be a formula contains a `depends_on` line declaring a dependency on the formula being tested. 3. Restrict the second `brew uses` call to when we are building dependents from source, since that is the only instance where we are interested in the build dependents. While we're here, make sure to call `brew postinstall` on all dependencies that were rebuilt, and not just the one being tested currently. This may address Homebrew#805. Locally, this results in the following speed up for a formula with no dependents: Before ( brew test-bot --only-formulae-dependents --testing-formulae=hello --dry-run) 28.95s user 6.70s system 76% cpu 46.875 total After ( brew test-bot --only-formulae-dependents --testing-formulae=hello --dry-run) 0.91s user 1.02s system 51% cpu 3.738 total This makes testing formulae with dependents slightly slower. However, the vast majority of formulae in Homebrew/core have no dependents (on macOS, at least), so this is likely a net win for the average workflow. [*] Potential future optimisation: calling `Dependency.expand` directly might give us better opportunities to exploit caching.
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was debugging
ocaml
bump failure (Homebrew/homebrew-core#102436) and noticed that newly builtocaml-findlib
was causing failures for subsequent formulae that depended on it due to missingetc/findlib.conf
.I think the issue is due to the
etc
files getting cleaned up and not being restored for dependents that are also being bottled:homebrew-test-bot/lib/tests/formulae.rb
Lines 450 to 451 in c2c4be7
Was able to test that modifying
etc
topkgshare/"etc"
avoided issue, but that loses the advantage of preserving user-modifications viaetc
directory.The text was updated successfully, but these errors were encountered: