analyze-dot: also show BindsTo= in --require

This commit is contained in:
Mike Yuan 2024-03-23 03:18:42 +08:00
parent de91848c3a
commit 147e7b4446
No known key found for this signature in database
GPG key ID: 417471C0A40F58B3
2 changed files with 11 additions and 10 deletions

View file

@ -1018,16 +1018,12 @@ x86-64 native</programlisting>
<term><option>--order</option></term>
<term><option>--require</option></term>
<listitem><para>When used in conjunction with the
<command>dot</command> command (see above), selects which
dependencies are shown in the dependency graph. If
<option>--order</option> is passed, only dependencies of type
<varname>After=</varname> or <varname>Before=</varname> are
shown. If <option>--require</option> is passed, only
dependencies of type <varname>Requires=</varname>,
<varname>Requisite=</varname>,
<varname>Wants=</varname> and <varname>Conflicts=</varname>
are shown. If neither is passed, this shows dependencies of
<listitem><para>When used in conjunction with the <command>dot</command> command (see above),
selects which dependencies are shown in the dependency graph. If <option>--order</option> is passed,
only dependencies of type <varname>After=</varname> or <varname>Before=</varname> are shown.
If <option>--require</option> is passed, only dependencies of type <varname>Requires=</varname>,
<varname>Requisite=</varname>, <varname>BindsTo=</varname>, <varname>Wants=</varname>, and
<varname>Conflicts=</varname> are shown. If neither is passed, this shows dependencies of
all these types.</para>
<xi:include href="version-info.xml" xpointer="v198"/></listitem>

View file

@ -79,6 +79,10 @@ static int graph_one(
if (r < 0)
return r;
r = graph_one_property(bus, u, "BindsTo", "gold", patterns, from_patterns, to_patterns);
if (r < 0)
return r;
r = graph_one_property(bus, u, "Wants", "grey66", patterns, from_patterns, to_patterns);
if (r < 0)
return r;
@ -182,6 +186,7 @@ int verb_dot(int argc, char *argv[], void *userdata) {
log_info(" Color legend: black = Requires\n"
" dark blue = Requisite\n"
" gold = BindsTo\n"
" dark grey = Wants\n"
" red = Conflicts\n"
" green = After\n");