Replace use of build-essential with constituent parts.#2096
Replace use of build-essential with constituent parts.#2096freakboy3742 merged 3 commits intobeeware:mainfrom
Conversation
…, not the constituent package.
158d8ae to
cddb43f
Compare
rmartin16
left a comment
There was a problem hiding this comment.
I found it isn't actually practical to test this. The dependencies for Toga ultimately require build-essential to be installed. So, one can't easily use apt to get a Debian system in to a state where Toga works but build-essential is not installed. Nonetheless, this works for me on jammy, noble, oracular, and even plucky.
Agreed that it's difficult to test - However, I'm not sure what you mean by this comment. Isn't that what Github Actions is doing (installing gcc et al, but not build-essential)? |
|
Yeah; thinking about it more, I was able to contrive such an environment. Notably, install The GitHub runner image appears rather novel...seems like they are definitely cherry-picking packages to install. |
|
Ok - in which case, I'll call this working and merge. Thanks for the extra manual validation. |
When building a system package on a Debian derivative, Briefcase checks for the
build-essentialmeta-package as a pre-requisite. This ensures that gcc, g++, libc6-dev, make, and dpkg-dev are installed.However, it is also possible to satisfy these requirements by installing those packages directly. This was done recently on GitHub Actions configurations, causing build failures (see beeware/toga#3051).
The immediate workaround is "just install the meta-package"; but installing a no-op package isn't a great option. This PR modifies the runtime check to look for the actual constituent packages.
The Dockerfiles will continue to install
build-essential; but they will pass the system check because installing that meta-package will cause these constituent packages to be installed. However, we'll be able to verify an environment that doesn't have these packages installed; and the help message presented to the user will reference the meta-package, not the constituent packages.Fixes beeware/toga#3051.
PR Checklist: