The units that are not loaded don't have dropin_paths set. This
currently results in units that have fragments to always have
NeedDaemonReload=true when masked:
$ find {/usr/lib,/run/user/8086}/systemd/user/meh.service* |xargs ls -ld
lrwxrwxrwx. 1 lkundrak lkundrak 9 Oct 11 11:19 /run/user/8086/systemd/user/meh.service -> /dev/null
-rw-rw-r--. 1 root root 49 Oct 11 10:16 /usr/lib/systemd/user/meh.service
drwxrwxr-x. 2 root root 4096 Oct 11 10:50 /usr/lib/systemd/user/meh.service.d
-rw-rw-r--. 1 root root 666 Oct 11 10:50 /usr/lib/systemd/user/meh.service.d/override.conf
$ systemctl --user daemon-reload
$ busctl --user get-property org.freedesktop.systemd1 \
/org/freedesktop/systemd1/unit/meh_2eservice \
org.freedesktop.systemd1.Unit NeedDaemonReload
b true
if (fragment_mtime_newer(u->source_path, u->source_mtime, false))
return true;
- (void) unit_find_dropin_paths(u, &t);
+ if (u->load_state == UNIT_LOADED)
+ (void) unit_find_dropin_paths(u, &t);
if (!strv_equal(u->dropin_paths, t))
return true;