No subject


Thu Sep 24 17:57:32 PDT 2015


If no binary builds existed, this should more or less cover all possible cases. It would be nice to have the option to "prefer the one but can make do with the other too" vs. "require the one over the other" (aborting when the requirement is not met), but if that's even possible it can be a next evolution.

Binary builds exist however, so something should be done to prevent pulling in a binary build for (against) foo-mac when foo-kde is installed, and vice-versa. I think I have a solution for that, which should work if my assumption is correct that binary packages are built each starting with a virgin MacPorts install, i.e. pulling in only the required dependencies.
It works like this: the foo-xdg defines a `fooxdg` variant (if it doesn't exist already), and makes it default. That way, any port that "inherits" port:foo-xdg without requesting it specifically will get a (default) variant that exists only on the user's end and not on the build bots, and therefore, `port install somePortDependsOnFoo` will be a request for somePortDependsOnFoo+fooxdg, leading to an install-from-source. On the other hand, a port that prefers/requests foo-xdg will have the +fooxdg variant set as a default also on the buildbots, and thus be available as a binary build against port:foo-xdg .

The default_variant could be set only when the variant is defined in the PortGroup or when foo.prefer_xdg is set, but I do not currently see why that would be necessary or preferable.
However, I'm not sure how best to ensure that someone with port:foo-mac installed will not end up installing a binary package that is built against port:foo-xdg , and I think that isn't already ensured. Maybe those ports should simply do a pre-fetch check if foo-xdg is indeed the one installed (via a proc to be provided by the foo-xdg PortGroup)?


I think this is completely orthogonal to questions about reproducible builds, before anyone mentions that principle :) and I can only hope that this is not "MacPorts doesn't support this". (The real-world implementation of port:foo-xdb, port:qt5-kde, is quite likely to be a requirement for KF5 ports currently in preparation.)

Thoughts and feedback welcome!

R.


More information about the macports-dev mailing list