[systemd-devel] ConditionNeedsUpdate date comparison

Lennart Poettering lennart at poettering.net
Mon Jan 26 16:35:27 PST 2015

On Mon, 26.01.15 14:00, Umut Tezduyar Lindskog (umut at tezduyar.com) wrote:

> Hi,
> condition_test_needs_update() wants the timestamp of /usr to be newer
> than what is being checked.
> Is there a reason why we don't check for "/usr !=
> Condition.parameter"?

Well, when I hacked that up, I didn't think of this case.

What are you saying ConditionNeedsUpdate=/usr is supposed to even

Not that we explicitly document that /etc and /var are the only valid
parameters currently (because we only manage those stamp
files with systemd-update-done.service). Hence,
ConditionNeedsUpdate=/usr is undefined currently, and it's not clear
to me what is should mean?

> It makes sense to check for "/usr > Condition.parameter" in a package
> managed linux but our embedded system is upgrading the entire /usr
> partition.
> ConditionNeedsUpdate=/etc is working fine when we upgrade our image
> but it fails when we downgrade it since the timestamp of /usr is older
> than /etc/.updated.

Well, this stuf is not intended to support downgrades. I don't think
that can ever work... 

But anyway, I don't really understand what you are trying to say I
must admit. Could you please elaborate?


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list