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 12:45:35PM +0000, Mayuresh Kathe wrote:
> 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?

That is very easy: on registering a package that depends on some other,
the pkg adds itself to the +REQUIRED_BY list of the dependency.

E.g. in my previous example xsane listed gimp as a dependency, and
you can see this by:

 > cat /usr/pkg/pkgdb/gimp-2.10.30/+REQUIRED_BY
xsane-0.99.9nb19

The more elegant way to query this (and a lot more) is via pkg_info
(but I thought you would be asking about how it was implemented).


Martin


Home | Main Index | Thread Index | Old Index