rev-upgrade to determine if binary is distributable
Clemens Lang
cal at macports.org
Wed Jun 6 16:34:05 PDT 2012
Hi,
On Wed, Jun 06, 2012 at 04:16:43PM -0700, Bradley Giesbrecht wrote:
> It's not so much that the tasks are related but rather that
> rev-upgrade is already testing all the links so it seems like an
> efficient place to test the license of files port.
The code required to walk all binaries installed by a given port and
it's dependencies is rather simple, because the component actually doing
most of the work (machista in base/src/machista1.0) can be used
independent from rev-upgrade. A list of binaries is available via
registry::file search:
set files [registry::file search active 1 binary 1 id [$port id]]
and can be iterated by machista:
set handle [machista::create_handle]
if {$handle == "NULL"} {
# error
}
foreach f $files {
set resultlist [machista::parse_file $handle [$f actual_path]]
# walk over architectures, loadcommands
}
machista::destroy_handle $handle
--
Clemens Lang
More information about the macports-dev
mailing list