[systemd-devel] ConditionNeedsUpdate date comparison

Umut Tezduyar Lindskog umut at tezduyar.com
Tue Jan 27 02:17:57 PST 2015


On Tue, Jan 27, 2015 at 1:35 AM, Lennart Poettering
<lennart at poettering.net> wrote:
> 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
> mean?

We are not on the same page. I never meant ConditionNeedsUpdate=/usr.

> 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?


Pretty much what I am saying is we wan't to use
ConditionNeedsUpdate=/etc for downgrade case. Why do you think it
won't work?

Instead of "IF time(/usr) > time(/etc/.updated)", we can check "IF
time(/usr) != time(/etc/.updated)".


> Lennart
> --
> Lennart Poettering, Red Hat

More information about the systemd-devel mailing list