PortGroup directory hierarchy/priority

Rainer Müller raimue at macports.org
Mon Apr 4 07:22:27 PDT 2016


On 2016-04-04 10:42, René J.V. Bertin wrote:
> On Monday April 04 2016 07:34:32 Clemens Lang wrote:
>> That would potentially cause ports to build different depending on
>> which packages you have installed in your environment, which is
>> not reproducible.
> 
> Yes, but that is already the case when a user replaces a mainstream
> port with one from an alternative source. There's only one way to
> enforce the reproducible build principle all the way, and that's to
> remove the whole possibility of building from source so that users
> can only install official, binary packages. If you cannot go there
> (because it'd mean too many sacrifices) you just have to accept that
> the reproducible build principle can only go so far in making support
> easier, and live with that.

A user already installed port A with the official port group foo-1.0.
Then they add a new source, overriding the port group foo-1.0, which
redefines some paths. This will not cause A to be outdated and no
rebuild of A will be triggered. Now installing B, which depends on A,
will use the new port group. The result is unspecified and the build
would also most likely fail.

Note this will already be a problem if you tell users to replace port
groups in the official tree.

The only way to ensure the port group matches the port is to keep them
in the same ports tree where the revision could be increment when
needed, or the version of the port group could be changed.

As soon as a port group was overridden for a port we would have to
disable binary archives completely for this port. If you mix and match
ports and port groups, from which archive site would you try to get a
binary? What if a ports uses multiple port groups from different trees?

However, if you copy the port into the customized ports tree with the
new port group, custom binary archives can always be distributed from
the corresponding archive_sites for this ports tree.

With regard to this, the current implementation was wrong. Only archive
sites defined for this ports tree or the globally defined archive sites
should be checked. Falling back to the default might use a binary
archive with incompatible contents.

https://trac.macports.org/changeset/147456

Rainer


More information about the macports-dev mailing list