svn commit: r250321 - head/usr.sbin/bsdconfig/dot
Devin Teske
dteske at FreeBSD.org
Tue May 7 04:46:09 UTC 2013
Author: dteske
Date: Tue May 7 04:46:08 2013
New Revision: 250321
URL: http://svnweb.freebsd.org/changeset/base/250321
Log:
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.
Modified:
head/usr.sbin/bsdconfig/dot/dot
Modified: head/usr.sbin/bsdconfig/dot/dot
==============================================================================
--- head/usr.sbin/bsdconfig/dot/dot Tue May 7 04:40:57 2013 (r250320)
+++ head/usr.sbin/bsdconfig/dot/dot Tue May 7 04:46:08 2013 (r250321)
@@ -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 \
More information about the svn-src-head
mailing list