From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Extracting a reachability path out of a (package) DAG Date: Mon, 23 Jul 2018 15:09:11 +0200 Message-ID: <87d0verte0.fsf@gnu.org> References: <20180717101033.113807d5@alma-ubu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhaaU-0000rk-9j for guix-devel@gnu.org; Mon, 23 Jul 2018 09:09:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhaaP-0003Vx-94 for guix-devel@gnu.org; Mon, 23 Jul 2018 09:09:18 -0400 In-Reply-To: <20180717101033.113807d5@alma-ubu> (=?utf-8?Q?=22Bj=C3=B6rn?= =?utf-8?Q?_H=C3=B6fling=22's?= message of "Tue, 17 Jul 2018 10:10:33 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?utf-8?Q?Bj=C3=B6rn_H=C3=B6fling?= Cc: guix-devel Hi Bj=C3=B6rn, Bj=C3=B6rn H=C3=B6fling skribis: > To answer this, I want to extract from hello's package graph the path > (more precisely: the sub-DAG) leading from the root "hello" to the > target node (or even nodes) "goodbye". > > After several attempts and failures, I wrote a script for gvpr from > the GraphViz suite that does the job. > > Example 1: In bug #30710 Hartmut Goebel asked why qt depends on two > different autoconf-wrapper packages. To answer that, you can find out > the two node names from the .dot file and then call: > > gvpr -f markpath.g -a "ex 64168128 64167936" < qt-thing/qt.package.dot >>qt-acw.dot > > This extracts (ex) the path (sub-DAG) to the two seed nodes and outputs > it in a new graph. This result is quite compact with only 12 nodes (attac= hed). That=E2=80=99s excellent! I didn=E2=80=99t know about gvpr and its scripti= ng capabilities, really nice (GraphViz also has Guile bindings, not sure if they would help here?). It may be nice to have some of this functionality available directly in (guix graph) because these are very common questions one may ask. Future work! Thanks, Ludo=E2=80=99.