how to figure out reverse package dependency?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

how to figure out reverse package dependency?

Matthias
How do I figure out which packages directly or indirectly depend on a
specific package? Let's assume that only installed packages shall be
considered.

For example, if 'glib2' is the package in question, 'cairo',
'gdk-pixbuf', 'shared-mime-info', 'ImageMagick', etc. should be returned
as all those depend on 'glib2'.

Thank you.

Reply | Threaded
Open this post in threaded view
|

Re: how to figure out reverse package dependency?

Jonathan Gray-11
On Sun, Aug 23, 2020 at 08:15:01AM +0200, Matthias wrote:
> How do I figure out which packages directly or indirectly depend on a
> specific package? Let's assume that only installed packages shall be
> considered.
>
> For example, if 'glib2' is the package in question, 'cairo',
> 'gdk-pixbuf', 'shared-mime-info', 'ImageMagick', etc. should be returned
> as all those depend on 'glib2'.
>
> Thank you.

This is really a question for ports@

One way would be to install databases/sqlports then run
'show-reverse-deps devel/glib2'

Reply | Threaded
Open this post in threaded view
|

Re: how to figure out reverse package dependency?

Marcus MERIGHI
Hello,

[hidden email] (Jonathan Gray), 2020.08.23 (Sun) 08:58 (CEST):

> On Sun, Aug 23, 2020 at 08:15:01AM +0200, Matthias wrote:
> > How do I figure out which packages directly or indirectly depend on a
> > specific package? Let's assume that only installed packages shall be
> > considered.
> >
> > For example, if 'glib2' is the package in question, 'cairo',
> > 'gdk-pixbuf', 'shared-mime-info', 'ImageMagick', etc. should be returned
> > as all those depend on 'glib2'.
> >
> > Thank you.
>
> This is really a question for ports@
>
> One way would be to install databases/sqlports then run
> 'show-reverse-deps devel/glib2'

I thought Matthias was just asking for "pkg_info -R".
("Show which packages require a given package")

Marcus

Reply | Threaded
Open this post in threaded view
|

Re: how to figure out reverse package dependency?

Matthias

On 2020-08-23 15:36, Marcus MERIGHI wrote:

> Hello,
>
> [hidden email] (Jonathan Gray), 2020.08.23 (Sun) 08:58 (CEST):
>> On Sun, Aug 23, 2020 at 08:15:01AM +0200, Matthias wrote:
>>> How do I figure out which packages directly or indirectly depend on a
>>> specific package? Let's assume that only installed packages shall be
>>> considered.
>>>
>>> For example, if 'glib2' is the package in question, 'cairo',
>>> 'gdk-pixbuf', 'shared-mime-info', 'ImageMagick', etc. should be returned
>>> as all those depend on 'glib2'.
>>>
>>> Thank you.
>>
>> This is really a question for ports@
>>
>> One way would be to install databases/sqlports then run
>> 'show-reverse-deps devel/glib2'
>
> I thought Matthias was just asking for "pkg_info -R".
> ("Show which packages require a given package")
>
> Marcus
>

Almost. 'pkg_info -R' only returns direct dependents. In case of
'glib2', for example, 'ImageMagick' would not be found as its closest
dependency (in my case) is of 3rd degree:

glib2 <- shared-mime-info <- djvulibre <- ImageMagick

Reply | Threaded
Open this post in threaded view
|

Re: how to figure out reverse package dependency?

Stuart Henderson
On 2020-08-23, [hidden email] <[hidden email]> wrote:

>
> On 2020-08-23 15:36, Marcus MERIGHI wrote:
>> Hello,
>>
>> [hidden email] (Jonathan Gray), 2020.08.23 (Sun) 08:58 (CEST):
>>> On Sun, Aug 23, 2020 at 08:15:01AM +0200, Matthias wrote:
>>>> How do I figure out which packages directly or indirectly depend on a
>>>> specific package? Let's assume that only installed packages shall be
>>>> considered.
>>>>
>>>> For example, if 'glib2' is the package in question, 'cairo',
>>>> 'gdk-pixbuf', 'shared-mime-info', 'ImageMagick', etc. should be returned
>>>> as all those depend on 'glib2'.
>>>>
>>>> Thank you.
>>>
>>> This is really a question for ports@
>>>
>>> One way would be to install databases/sqlports then run
>>> 'show-reverse-deps devel/glib2'
>>
>> I thought Matthias was just asking for "pkg_info -R".
>> ("Show which packages require a given package")
>>
>> Marcus
>>
>
> Almost. 'pkg_info -R' only returns direct dependents. In case of
> 'glib2', for example, 'ImageMagick' would not be found as its closest
> dependency (in my case) is of 3rd degree:
>
> glib2 <- shared-mime-info <- djvulibre <- ImageMagick

Not *only* direct dependencies, but also some others (maybe those coming
via a library rather than run dependency?). "pkg_info -R glib2" does list
xcowsay, which pulls in glib2 via gtk+3.


Reply | Threaded
Open this post in threaded view
|

Re: how to figure out reverse package dependency?

mpfr
In reply to this post by Jonathan Gray-11
Just tried something more simple. Works fine for me so far.

https://github.com/mpfr/pkg_depts


On 2020-08-23 08:58, Jonathan Gray wrote:

> On Sun, Aug 23, 2020 at 08:15:01AM +0200, Matthias wrote:
>> How do I figure out which packages directly or indirectly depend on a
>> specific package? Let's assume that only installed packages shall be
>> considered.
>>
>> For example, if 'glib2' is the package in question, 'cairo',
>> 'gdk-pixbuf', 'shared-mime-info', 'ImageMagick', etc. should be returned
>> as all those depend on 'glib2'.
>>
>> Thank you.
>
> This is really a question for ports@
>
> One way would be to install databases/sqlports then run
> 'show-reverse-deps devel/glib2'
>