lifecycle: add lif_lifecycle_count_rdepends(), which calculates reverse dependency depth
This commit is contained in:
parent
a5eebda391
commit
2569503afa
4 changed files with 68 additions and 0 deletions
|
@ -290,6 +290,12 @@ ifquery_main(int argc, char *argv[])
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (!lif_lifecycle_count_rdepends(&exec_opts, &collection))
|
||||
{
|
||||
fprintf(stderr, "%s: could not validate dependency tree\n", argv0);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* --list --state is not allowed */
|
||||
if (listing && listing_stat)
|
||||
generic_usage(self_applet, EXIT_FAILURE);
|
||||
|
|
|
@ -229,6 +229,12 @@ ifupdown_main(int argc, char *argv[])
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (!lif_lifecycle_count_rdepends(&exec_opts, &collection))
|
||||
{
|
||||
fprintf(stderr, "%s: could not validate dependency tree\n", argv0);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (!lif_state_sync(&state, &collection))
|
||||
{
|
||||
fprintf(stderr, "%s: could not sync state\n", argv0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue