Binary packages not rebuilding against updated libraries

Perry E. Metzger pmetzger at macports.org
Wed Apr 25 20:10:08 UTC 2018


On Wed, 25 Apr 2018 14:40:55 -0500 Ryan Schmidt
<ryandesign at macports.org> wrote:
> On Apr 25, 2018, at 14:14, Perry E. Metzger wrote:
> 
> > I don't know that this is needed. As I noted, there are other
> > package systems that just note that they have to rebuild
> > dependents if a package they depend on has a major version bump.
> > 
> > Or maybe I don't understand the problem well enough?  
> 
> By what means should MacPorts know that the port it just built has
> a newer library version than the previous version of the port?

Typically other package systems do this by using registration
databases, thus knowing something is being replaced (and what the
version change is). So if you have "libfoo", and there's a new
version of "libfoo" out, you know the old installed one was 1.3 and
the new one is 2.4 or what have you.

> By what means should MacPorts know the list of ports that have to
> be rebuilt as a result?

Typically, package systems maintain information on the dependency
graph of everything installed in the registration database, and are
thus aware that what has just been touched is a dependency of
something else that has been installed.

You then treat the X depends on Y relations as a directed graph and
find the transitive closure, thus finding all things that depend on X
in the whole directed graph.

In the more sophisticated systems, you then decide if you need to
rebuild everything that depended on the thing. In the less
sophisticated ones, everything gets rebuilt, which is kind of ugly.

But again, perhaps I don't understand the problem well enough. I do
know that, for example, opam spends a few moments whenever it updates
computing all dependent packages that must also be updated because of
a change in a package that was depended on, and so do a few other
package managers I've worked with.

And regardless, this might all be too much work to be worth it.

Perry
-- 
Perry E. Metzger		pmetzger at macports.org


More information about the macports-dev mailing list