New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should rss2email.json be stored in XDG_DATA_HOME? #164
Comments
AFAIK XDG_DATA_HOME is the place where To the best of my knowledge, XDG overall governs what goes in $HOME, and FHS overall governs what goes in /. Does what I'm saying make sense? |
Hi Léo, thanks for your interest in this ticket! I checked that link that you provided in more detail. To my understanding, the combination of statement…
…and statement…
…in particular means that I find backup for that interpretation at direnv/direnv#406 (comment) but I'd agree with anyone saying that the spec is not explicit enough about state versus non-state: There should a single sentence for us to quote in that spec and we'd have a clear answer. To me personally it is clear that a user-specific version of It seems like it's a hole in XDG, https://wiki.debian.org/XDGBaseDirectorySpecification#Proposal:_STATE_directory on this topic reads like the problem has not been fully addressed yet, either. What do you think? |
My pleasure! I know you have opened other ones, but this one seemed quick enough to answer, while others will have to wait for a longer span of consecutive free time… sorry about it! I agree with you that XDG sounds like XDG_DATA_HOME is a user-specific version of XDG_DATA_DIRS, but user-specific also means that what is read-only becomes read-write — this is also, I think, the reason why XDG_DATA_HOME is not just one more element added to the default XDG_DATA_DIRS list, but a variable by itself. Off the top of my hat, I'd say that we care about supporting XDG as it currently exists more than hypothetical extensions of it that have not yet been standardized. Especially seeing the table at the bottom of your link, I'm not sure I see a meaningful difference between I also see that on my local machine, So I'd say, yes the situation is imperfect, and it'd be nicer if the XDG spec could explicitly state that XDG_DATA_HOME is made for mutable data too, but as things are, there is no de jure standard for a good location for these data, and the de facto standard is to put it in XDG_DATA_HOME. Which makes me not see any better solution than what is currently implemented, at least until a STATE directory is accepted into XDG (and then we'd have to think about a migration plan). Does that make sense? |
The more I think about it, even considering read-only Lines 215 to 237 in 6e6e952
XDG_DATA_HOME nor XDG_DATA_DIRS should have any say about the location of that file (due to /usr/share being read-only a la FHS).
I'm not sure if I have a realistic chance of fixing the XDG spec. If you want to keep the status quo until someone fixed the spec, that's not what I was hoping for, but it's okay with me. |
Uhhh yes we definitely should not be looking through XDG_DATA_DIRS for rss2email.json, only in XDG_DATA_HOME as things currently stand — as you say, it makes no sense to look for a mutable file at globally read-only locations. Thank you for pointing to this code! I'd be glad to accept a PR with a changelog update that fixes that to only look at XDG_DATA_HOME, which currently is the least bad place where we could put this data that I know of :) |
Good.
I don't follow why you consider
I'm happy to help out with a PR but if I do the work
If that's interesting, we have a deal. |
And which XDG variable do I set if I don't want it in |
Hi @auouymous ,
is that needed? Maybe as root in
That's a good question.
I agree.
I do not agree. I think |
The variables are there to let the user choose, so yes, it is needed.
|
Personally, I don't see it. For a user other than root, I don't see why a non-default and variable
The list is missing
Full ack. |
@auouymous @Ekleog I'm preparing a mail to the xdg mailing list now… |
Yup, a directory that is cleaned or doesn't persist sounds like the best choice. ;) |
Well, it has it's own can of worms: There is no clear default, the app needs to warn if it's unset, residual in memory may make it go away on every reboot and the "should not place larger files" is both vague in general and to our very case and "should use this directory for communication and synchronization purposes" does not fit our case either. So not exactly a great match either 😞 |
Mail sent. The thread is up here in the mail archive. Wish me replies 🙏 😃 |
So that e-mail thread on the xdg mailing list uncovered that the is a new variable |
On your spec link, I read:
This, to me, reads like the correct directory is XDG_DATA_HOME even with the updated spec, because if we lose the data stored there you'll potentially receive thousands of new mails — whereas the listed examples just below (“actions history (logs, history, recently used files, …)” and “current state of the application that can be reused on a restart (view, layout, open files, undo history, …)”) don't match the usage rss2email currently does of XDG_DATA_HOME. But then, I may have missed something? |
@Ekleog I think your point is about short-term state versus long-term state. My understanding is that:
But that's my interpretation: The spec does a terrible job at drawing precise lines between things and I understand if we have three different interpretations with three people. |
Hmm? My interpretation of this sentence:
is that by reverting the sentence, I get:
|
I'm not sure I understand. What do you mean? |
What I mean is that if I take the contents of the first quote, and just reword it so the subject is now $XDG_DATA_HOME, it gives a sentence that, to me, sounds like XDG_DATA_HOME should be used to store long-term important state, while XDG_STATE_HOME should be used to store long-term unimportant state (like undo history, etc.) |
Hi @Ekleog, there's an emphasis on "unimportant" there, true, you have a point, yes. The more I think about the spec, the more I'm tearing myself apart about it. It's probably best if I take myself out of the equation here and just let you pick something; whatever I would suggest will be either in conflict with part of what the spec says verbatim or what I believe the spec was meant to say. I still believe that If taking me out of the equation means we're closing the ticket and stick with status quo, okay. If it means we're sticking with |
|
Only look in $XDG_DATA_HOME Fixes rss2email#164
Only look in $XDG_DATA_HOME Fixes #164
Well, I've just pushed and landed #169, IMO this solves this issue so let's close for now, and if other people think the issue was not well-solved with arguments that were not already raised, let's re-discuss it! Thank you everyone for your input :) |
Hi!
The current location
~/.local/share/
is a weird place to keep state with regard to to the file hierarchy standard. It's the.local
equivalent of/usr/share
which is intend for "Architecture-independent" (see/usr/share
) "read-only" (see/usr
) data. Maybe~/.local/var/lib/
— "State information. Persistent data modified by programs as they run" (see/var/lib
)— is a better place for the current use semantic?Best, Sebastian
The text was updated successfully, but these errors were encountered: