]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: introduce Unit.dependency_generation counter and restart loop when dependency...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 15 May 2025 03:34:35 +0000 (12:34 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 25 Jun 2025 12:36:10 +0000 (13:36 +0100)
commit4dc4fdcfe051b10aa4f7fe4d3ab220c27084eaf5
treedc551cc5ecb8237f87d366130abef21df9f892f0
parent0e5fc0a29c4a98f781d4d4911b5f589f31c9f10e
core: introduce Unit.dependency_generation counter and restart loop when dependency is updated in the loop

When starting unit A, a dependent unit B may be loaded if it is not
loaded yet, and the dependencies in unit A may be updated.
As Hashmap does not allow a new entry to be added in a loop, we need to
restart loop in such case.

Fixes a bug introduced by cda667722c2218cf1a0185284d2a87f8a25f1b2d.
Fixes #36031.

(cherry picked from commit b7777d08846033859c5b734317fbbbfcca4cafcb)
src/core/transaction.c
src/core/unit.c
src/core/unit.h