Dear mailing list,

is there a way to find all dependencies of a package without installing it?

I am looking for that information in a cross-platform way. For example, I have
a Linux amd64 (HOST) and would like to know all dependencies of, say, cmake
on NetBSD 10.0 arm64 (TARGET).

My current ugly hack consists of the following steps:

1. create a file (LIST) with the name of all packages I interested in
2. download and install pkgsrc on HOST but unprivileged,
3. download the SHA512 file of the TARGET binary distribution.
4. download the TARGET binaries for all packages in LIST using the names in
   the SHA512 file.
4. run pkg_add -nf package-version.tgz and grep for dependencies
5. add found dependencies to LIST
6. if new dependencies found, goto 4
7. otherwise, LIST contains the full list of packages including dependencies and
   SHA512 provides the version numbers

I am pretty sure there must exist an elegant way how to do same. Ideally,
without having to fake-install packages.

Any hints?

Cheers,
-- 
Diogo

Reply via email to