system turns suddenly off with current master

Stefan Seyfried stefan.seyfried at googlemail.com
Fri Mar 5 18:25:28 CET 2021


On 01.03.21 16:58, Olaf Hering wrote:
> Am Sat, 13 Feb 2021 18:42:38 +0100
> schrieb Stefan Seyfried <stefan.seyfried at googlemail.com>:
> 
>> The magic value for "never suspend" changed from 14 to 4 (in minutes).
> 
> Thanks. I went back to the commit prior this change, but had not time to dig further into the issue.
> 
> I suggest to convert the expanded magic value '14' into a macro and and a comment to avoid future attempts that try to fiddle with it.

It's not that easy.
Intermediate versions should save a distinct value for "off". 0 or -1 
might be a good idea.
Or just remove the value from the setting if it is off (it then defaults 
to off).

But right now, we have "14" in there if we ever played with that setting 
and later turned it off again.
And now an update to a package where the magic value changed will break. 
Because suddenly "14" is a valid setting.

Maybe having a version in the config, so that we know "if version < x 
and value == 14 then value = off" would be good, because even if 
intermediate versions are now created, this will not ensure that users 
do not upgrade from 4.12 to 4.18 5 years from now.

Alternatively, just forbidding "14" in the new version, so that 
basically you can just use either 13 or 15 minutes and treating 14 as 
magic value for the next years might be a workable -- albeit ugly -- 
hack ;-)

Have fun!

seife
-- 
Stefan Seyfried

"For a successful technology, reality must take precedence over
  public relations, for nature cannot be fooled." -- Richard Feynman


More information about the Xfce4-dev mailing list