NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkgsrc : dependencies : determination : how?
On Tue, Mar 29, 2022 at 09:15:34AM +0000, Mayuresh Kathe wrote:
> i would like to understand how pkgsrc determines the
> dependencies for a given package, and how does it go
> about handling them during installs, uninstalls, etc.
> i've heard about some such systems using "sat solvers".
> is there a similar sub-system being used by pkgsrc?
> thank you.
Probably better to ask this on the tech-pkg list ;-)
But there is nothing magic to it, if you look at one of your
installed pkgs and check it registered information you can find something
like this:
> cat /usr/pkg/pkgdb/xsane-0.99.9nb19/+CONTENTS
and in there you see e.g.
@blddep jpeg-9d
that is a build dependency - to build this package, a package name "jpeg-9d"
is needed. And you find e.g.
@pkgdep tiff>=4.0.3nb5
which is a package dependency, that is: to run/use this package, a package
name tiff with version >= 4.0.3nb5 needs to be installed.
During a build pkgsrc creates the transitive closure (by recursing into
make calls for the dependencies) over these dependencies. During
installation pkg_install does something similar for the runtime
dependencies.
No tricky optimizations are done. Other effects in play: the buldlink
technique tries to hide other installed stuff from a build (so only the
actually declared dependencies come to play).
Martin
Home |
Main Index |
Thread Index |
Old Index