]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: refresh unit cache when building a transaction if UNIT_NOT_FOUND
authorLuca Boccassi <luca.boccassi@microsoft.com>
Fri, 3 Jul 2020 17:45:19 +0000 (18:45 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 7 Jul 2020 08:09:24 +0000 (10:09 +0200)
commitcda667722c2218cf1a0185284d2a87f8a25f1b2d
tree0e97f4ea9ed8373ddaef00c7cd4fa866e1ceb8c2
parent77ecc1aaa54947d4babd57110e0dee0457f7ba4e
core: refresh unit cache when building a transaction if UNIT_NOT_FOUND

When a command asks to load a unit directly and it is in state
UNIT_NOT_FOUND, and the cache is outdated, we refresh it and
attempto to load again.
Use the same logic when building up a transaction and a dependency in
UNIT_NOT_FOUND state is encountered.
Update the unit test to exercise this code path.
src/core/manager.c
src/core/manager.h
src/core/transaction.c
test/units/testsuite-48.sh