]> 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)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 28 May 2025 20:41:25 +0000 (05:41 +0900)
commitb7777d08846033859c5b734317fbbbfcca4cafcb
treedbd84506fd3d893c66f70b16377b844b380fb226
parent9b6aa9e443859f1eb69cfe37ca755ac4db31c475
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.
src/core/transaction.c
src/core/unit.c
src/core/unit.h