NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkgsrc : dependencies : determination : how?
> From bounces-netbsd-users-owner-mayuresh=sdf.org%NetBSD.org@localhost Tue Mar 29 09:30:49 2022
> From: Martin Husemann <martin%duskware.de@localhost>
> To: Mayuresh Kathe <mayuresh%sdf.org@localhost>
> Cc: netbsd-users%netbsd.org@localhost
> Subject: 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
>
thanks for responding martin.
sure, i'll ask this on that list. :)
the point i'm most concerned about is how pkgsrc manages to
figure out if a package has to be uninstalled or not, like
what if there are recursive dependencies shared amongst
multiple packages?
Home |
Main Index |
Thread Index |
Old Index