Re: XDG_DATA_HOME vs XDG_STATE_HOME usage

2022-09-12 Thread Josef Šimánek
út 13. 9. 2022 v 1:57 odesílatel Thiago Macieira  napsal:
>
> On Monday, 12 September 2022 16:22:32 PDT Josef Šimánek wrote:
> > Would you recommend XDG_STATE_HOME then? It seems it fits the best.
> > Sync across machines for this file really depends on user preference.
> > Sometimes it makes sense, sometimes not.
>
> Is this a notification the user may dismiss?

This notification is not dismissable, it is a one-off notification for
a given time-range.

> If so, then it should be DATA, not STATE.

STATE makes sense.

Thanks for all the insight, info and recommendation!

> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>Software Architect - Intel DCAI Cloud Engineering
>
>
>


Re: XDG_DATA_HOME vs XDG_STATE_HOME usage

2022-09-12 Thread Thiago Macieira
On Monday, 12 September 2022 16:22:32 PDT Josef Šimánek wrote:
> Would you recommend XDG_STATE_HOME then? It seems it fits the best.
> Sync across machines for this file really depends on user preference.
> Sometimes it makes sense, sometimes not.

Is this a notification the user may dismiss? If so, then it should be DATA, not 
STATE.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering





Re: XDG_DATA_HOME vs XDG_STATE_HOME usage

2022-09-12 Thread Josef Šimánek
út 13. 9. 2022 v 0:40 odesílatel Thiago Macieira  napsal:
>
> On Monday, 12 September 2022 15:26:49 PDT Josef Šimánek wrote:
> > Anyway, is that the decision maker for XDG_DATA_HOME vs
> > XDG_STATE_HOME? Synced vs not synced between machines?
>
> No. It should be about the nature of the data.
>
> https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html says
> "state data that should persist between (application) restarts, but that is
> not important or portable enough to the user that ..."
>
> That is to say, if those files were lost, it wouldn't be the end of the world.
> The user may perceive some changes, but not anything that they themselves
> created.
>
> That's again different from cache, which are files that should be periodically
> cleaned up. In my own system, I don't back up cache dirs, but I do back up
> state ones.

XDG_CACHE_HOME wasn't even considered from our side. Currently I'm
trying to find out the difference between XDG_DATA_HOME and
XDG_STATE_HOME for the mentioned usecase.

Would you recommend XDG_STATE_HOME then? It seems it fits the best.
Sync across machines for this file really depends on user preference.
Sometimes it makes sense, sometimes not.

> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>Software Architect - Intel DCAI Cloud Engineering
>
>
>


Re: XDG_DATA_HOME vs XDG_STATE_HOME usage

2022-09-12 Thread Thiago Macieira
On Monday, 12 September 2022 15:26:49 PDT Josef Šimánek wrote:
> Anyway, is that the decision maker for XDG_DATA_HOME vs
> XDG_STATE_HOME? Synced vs not synced between machines?

No. It should be about the nature of the data.

https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html says
"state data that should persist between (application) restarts, but that is 
not important or portable enough to the user that ..."

That is to say, if those files were lost, it wouldn't be the end of the world. 
The user may perceive some changes, but not anything that they themselves 
created.

That's again different from cache, which are files that should be periodically 
cleaned up. In my own system, I don't back up cache dirs, but I do back up 
state ones.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering





Re: XDG_DATA_HOME vs XDG_STATE_HOME usage

2022-09-12 Thread Josef Šimánek
út 13. 9. 2022 v 0:12 odesílatel Thiago Macieira  napsal:
>
> On Monday, 12 September 2022 14:39:26 PDT Josef Šimánek wrote:
> > This file is portable between systems, since the whole content is just
> > a number (UNIX timestamp). It is not crucial to the user, but it is
> > beneficial to sync this across machines to avoid potentially redundant
> > update recommendations. Our plan is to recommend update only once per
> > week thanks to this stored UNIX timestamp.
>
> Why would you not want to generate update recommendations? If the software in
> question is per system, the warning should be per system.

I see your point, but sometimes it is friendlier to sync those
notifications in between systems. We're still not 100% decided on
this.

Anyway, is that the decision maker for XDG_DATA_HOME vs
XDG_STATE_HOME? Synced vs not synced between machines?

> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>Software Architect - Intel DCAI Cloud Engineering
>
>
>


Re: XDG_DATA_HOME vs XDG_STATE_HOME usage

2022-09-12 Thread Thiago Macieira
On Monday, 12 September 2022 14:39:26 PDT Josef Šimánek wrote:
> This file is portable between systems, since the whole content is just
> a number (UNIX timestamp). It is not crucial to the user, but it is
> beneficial to sync this across machines to avoid potentially redundant
> update recommendations. Our plan is to recommend update only once per
> week thanks to this stored UNIX timestamp.

Why would you not want to generate update recommendations? If the software in 
question is per system, the warning should be per system.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering