From owner-freebsd-questions@FreeBSD.ORG Mon Feb 16 20:19:03 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 048981065670 for ; Mon, 16 Feb 2009 20:19:03 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id DB10C8FC0C for ; Mon, 16 Feb 2009 20:19:01 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (mail.lan.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id 07703AFC1FE; Mon, 16 Feb 2009 11:18:57 -0900 (AKST) From: Mel To: freebsd-questions@freebsd.org Date: Mon, 16 Feb 2009 11:18:56 -0900 User-Agent: KMail/1.9.10 References: <92bcbda50902120422x7c73808dy650d6918054af9f4@mail.gmail.com> In-Reply-To: <92bcbda50902120422x7c73808dy650d6918054af9f4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902161118.56864.fbsd.questions@rachie.is-a-geek.net> Cc: n j Subject: Re: Logcheck dependency hell X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2009 20:19:03 -0000 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 \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); ?>