pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: list of all prerequisites/ dependencies on a package



Hi Roland,

On Friday 2022-04-08 23:20, Roland Illig wrote:
Am 08.04.2022 um 00:43 schrieb Jason Bacon:
 On 4/7/22 16:53, Greg Troxel wrote:
 Jason Bacon <jtocino%gmx.com@localhost> writes:
 On 4/7/22 09:19, Greg Troxel wrote:

 make show-depends-pkgpaths

 See mk/bsd.utils.mk and mk/scripts/depends-depth-first.awk

 I would like to see indentation, perhaps optional, basically 2 spaces
 before each package that is a dependency of dependency, and so on, but
 given that it's not a tree, that's harder.

 Note that show-depends does not recurse.  I've wondered if there's a
 canonical way to get the full recursive list.  In the past I've used the
 hack of just running make clean-depends.

The target clean-depends is a good hint.  I had a look at all
occurrences of _DEPENDS_WALK_CMD, and none of them is intended to use as
a query of its own.  There is indeed a hacky, ugly way of listing all
dependencies, without touching anything in mk/:

$ bmake clean-depends RECURSIVE_MAKE='echo $$dir; :'

(If you want to see how and why it works, have a look at
mk/bsd.pkg.clean.mk.)

There should be a cleaner way of listing all of a package's
dependencies.  My first idea was to define a target named
'show-all-depends', but that name is already used as part of 'show-all'.
Therefore I suggest 'show-depends-all'.  The implementation is
trivial, to be added to mk/bsd.utils.mk:

show-depends-all: .PHONY
	 ${RUN} ${_DEPENDS_WALK_CMD} ${PKGPATH}

#  Support for an indented dependency tree would require additional
#  work in mk/scripts/depends-depth-first.mk.
# $ bmake show-depends-all INDENT=' '

I really like it,  I support adding it to pkgsr.

Thank You,

--
Boyd Gerber <gerberb%zenez.com@localhost> 801 849-0213
ZENEZ   1042 East Fort Union #135, Midvale Utah  84047



Home | Main Index | Thread Index | Old Index