summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig/dot
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2013-05-07 04:46:08 +0000
committerdteske <dteske@FreeBSD.org>2013-05-07 04:46:08 +0000
commitdd7d8328e3c59b8fa656ee893ece055dbb459ea9 (patch)
tree207f46e8d925d85369a6613902ad177a4a22eb40 /usr.sbin/bsdconfig/dot
parent3876e4f11cd9c76b8afe8e513b84614e9c5c858e (diff)
downloadFreeBSD-src-dd7d8328e3c59b8fa656ee893ece055dbb459ea9.zip
FreeBSD-src-dd7d8328e3c59b8fa656ee893ece055dbb459ea9.tar.gz
Recursively calculate includes. This solves the problem of some includes
missing from the graph, but it also unfortunately forces yet another bug in graphviz dot(1) to appear. When edge labels are enabled (using '\T') with this many edges, dot(1) will do bad things in init_rank() and often crash. So while we're here, let's disable edge labels for the include- relationship graph feature.
Diffstat (limited to 'usr.sbin/bsdconfig/dot')
-rwxr-xr-xusr.sbin/bsdconfig/dot/dot35
1 files changed, 21 insertions, 14 deletions
diff --git a/usr.sbin/bsdconfig/dot/dot b/usr.sbin/bsdconfig/dot/dot
index f536c07..367c152 100755
--- a/usr.sbin/bsdconfig/dot/dot
+++ b/usr.sbin/bsdconfig/dot/dot
@@ -276,20 +276,26 @@ if [ "$SHOW_INCLUDES" ]; then
#
# Search previously-discovered include files for further includes
#
- for file in $include_file_list; do
- include_file_list="$include_file_list $(
- awk "$print_includes_awk" $BSDCFG_SHARE/$file
- )"
- done
+ before="$include_file_list"
+ while :; do
+ for file in $include_file_list; do
+ include_file_list="$include_file_list $(
+ awk "$print_includes_awk" $BSDCFG_SHARE/$file
+ )"
+ done
- #
- # Sort the list of includes and remove duplicate entries [again]
- #
- include_file_list=$(
- for include_file in $include_file_list; do
- echo "$include_file"
- done | sort -u
- )
+ #
+ # Sort list of includes and remove duplicate entries [again]
+ #
+ include_file_list=$(
+ for include_file in $include_file_list; do
+ echo "$include_file"
+ done | sort -u
+ )
+
+ [ "$include_file_list" = "$before" ] && break
+ before="$include_file_list"
+ done
fi
#
@@ -435,7 +441,8 @@ if [ "$SHOW_INCLUDES" ]; then
shape=oval color=black fillcolor=white style=filled edge_color=grey
begin_nodelist "$shape" "$color" "$fillcolor" "$style"
print_node edge "style = dashed" "color = $edge_color"
- print_node edge "label = \"\\T\"" "fontsize = 9"
+ #print_node edge "label = \"\\T\"" "fontsize = 9"
+ # NOTE: Edge labels are buggy on large graphs
file_list=$(
for file in \
$BSDCONFIG \
OpenPOWER on IntegriCloud