On Thursday 12 February 2009 03:22:04 n j wrote: > Hello, > > could anyone help me what command should I use to find out which > logcheck-required port _exactly_ is trying to install half of the X > libraries? > > The logcheck port lists the following build depends (output of > pretty-print-build-depends-list):
# finddep.php security/logcheck x11/xorg-libraries /usr/ports/textproc/docbook-to-man: /usr/local/libdata/xorg/libraries => /usr/ports/x11/xorg-libraries Script below sig. -- Mel #!/usr/local/bin/php -q <?php // vim: ts=4 sw=4 nobackup noet //define('DEBUG', 1); function usage() { $me = $argv[0]; echo("Usage: $me <origin> <dep>\n"); echo("\tFind which dependancy lists dep in origin\n"); exit(1); } function chkdep($val, $check) { if( !is_dir($val) ) { fprintf(STDERR, "No such dir: %s/%s\n", $GLOBALS['PORTSDIR'], $val ); return; } chdir($val); $_deps = preg_split('/\s/', shell_exec("/usr/bin/make -V LIB_DEPENDS -V RUN_DEPENDS -V BUILD_DEPENDS") ); foreach($_deps AS $_dep) { list($pkgname, $origin) = explode(':', $_dep); if( preg_match('/^\s*$/', $origin) ) continue; if( in_array($origin, $GLOBALS['CHECKED']) ) continue; if( $origin == $GLOBALS['PORTSDIR'] . '/' . $check ) echo("$val: $pkgname => $origin\n"); else { if( defined('DEBUG') ) { fprintf(STDERR, "%s != %s/%s\n", $origin, $GLOBALS['PORTSDIR'], $check ); } $GLOBALS['CHECKED'][] = $origin; chkdep($origin, $check); } } } if( $argc < 3 ) usage(); $PORTSDIR=('' != getenv('PORTSDIR') ) ? getenv('PORTSDIR') : '/usr/ports'; $pkg = $argv[1]; $dep = $argv[2]; if(!file_exists("$PORTSDIR/$pkg/Makefile") ) { fprintf(STDERR, "Orphaned port: $pkg\n"); exit(2); } $CHECKED=array(); chkdep($PORTSDIR . '/' . $pkg, $dep); ?> _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"