summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-28 00:05:11 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-28 01:12:27 (EDT)
commit70618d8bdca57a5503a388eba21c068a61df5b4e (patch)
tree0fdfefe0373fd3498478a7f3fcc4e624f1d0ac57
parent6f21ef6e0249806f9893ee825ac5cfb7f99b9640 (diff)
Mark leaf packages
Technically in graph theory these are called "source" nodes/vertices, but that's confusing in package management terminology.
-rwxr-xr-xbin/depsdot8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/depsdot b/bin/depsdot
index 6522432..411af57 100755
--- a/bin/depsdot
+++ b/bin/depsdot
@@ -16,6 +16,7 @@ my @IGNORE_DEPS = qw(libc.6);
my @src_pkgs;
my %bin_src_map;
my %rdeps_graph;
+my %non_leaf_src_pkgs;
my %deps_graph;
sub read_list
@@ -67,6 +68,7 @@ sub main
my @dep_srcs = keys(%{$bin_src_map{$dep_bin}});
foreach my $dep_src (@dep_srcs) {
next if $dep_src eq $src;
+ $non_leaf_src_pkgs{$dep_src} = 1;
$deps_graph{$src}{$dep_src} = scalar(@dep_srcs);
}
}
@@ -77,7 +79,11 @@ sub main
"digraph deps {\n\toverlap = false;\n\tsplines = true;\n" .
"\tlayout = \"neato\";\n\n\t/* Source packages */\n");
foreach my $src (sort(@src_pkgs)) {
- STDOUT->print("\t\"" . $src . "\";\n");
+ my $attr = '';
+ if (not defined($non_leaf_src_pkgs{$src})) {
+ $attr = ' [style=filled,fillcolor="#C0C0C0"]';
+ }
+ STDOUT->print("\t\"" . $src . '"' . $attr . ";\n");
}
STDOUT->print("\n\t/* Dependencies */\n");
foreach my $src (sort(keys(%deps_graph))) {