On Mon, Apr 20, 2020 at 02:48:20PM +0100, Chris Rawnsley wrote:
> > BTW, any supplementary tool that does similar things directly in shell
> > has exactly zero chance to be included in the distribution.
> 
> Acknowledged. I put it out there for those that might find it useful
> but was not expecting it to be included.
> 
> 
> > The offical parser for PackingList *is* the perl code, dependency handling
> > as well.
> > 
> > Anything else is very likely to miss special cases and break atrociously.
> 
> As I am sure is the case in my shell scripting :)
> 
> Would a patch for such a feature, if it were using the proper Perl
> machinery, be considered? Or is this something that you absolutely
> do not wish to included at this time?

The main problem is the user interface: there are already a lot of things
in pkg_info, those are not really consistent, etc.

The code is already there from the most part, there *is* a compute_closure
method in RequiredBy/Requiring.

it's almost a one-liner:

#! /usr/bin/perl
use OpenBSD::RequiredBy;

print join(' ', sort OpenBSD::Requiring->compute_closure(shift)), "\n";


all the stem back-and-forth is also available.

Reply via email to