[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.3-8-g2c607ec



The following commit has been merged in the master branch:
commit 2c607ec89587e352ebf37bb848f162a9195bc31b
Author: Niels Thykier <niels@thykier.net>
Date:   Wed Sep 14 15:07:16 2011 +0200

    Added a small utility to create a dependency graph

diff --git a/private/graph b/private/graph
new file mode 100755
index 0000000..42e94cd
--- /dev/null
+++ b/private/graph
@@ -0,0 +1,37 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+BEGIN {
+    my $root = $ENV{'LINTIAN_ROOT'}//'.';
+    $ENV{'LINTIAN_ROOT'} = $root;
+}
+use lib "$ENV{'LINTIAN_ROOT'}/lib";
+
+use Util;
+
+my %coll_needs;
+
+my $LINTIAN_ROOT = $ENV{'LINTIAN_ROOT'};
+
+foreach my $collf (glob ("$LINTIAN_ROOT/collection/*.desc")) {
+    my $coll = get_dsc_info($collf) or die "$collf: $!";
+    my $name = $coll->{'collector-script'} or die "$collf is missing collector-script field.\n";
+    my @needs = split m/\s*+,\s*+/o, $coll->{'needs-info'}//'';
+    $coll_needs{$name} = \@needs;
+}
+
+print <<EOF ;
+digraph "lintian-collections" {
+// This graph shows the dependency relation ships between various
+// collections.
+EOF
+
+foreach my $coll (sort keys %coll_needs) {
+    foreach my $dep (@{ $coll_needs{$coll} }) {
+        print "\"$coll\" -> \"$dep\"\n";
+    }
+}
+
+print "}\n";

-- 
Debian package checker


Reply to: