Bug 947647 - icedtea web should use .config/icedtea and .cache/icedtea
Summary: icedtea web should use .config/icedtea and .cache/icedtea
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: icedtea-web
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: jiri vanek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-02 23:09 UTC by Rahul Sundaram
Modified: 2013-07-20 13:42 UTC (History)
3 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2013-07-20 13:42:17 UTC


Attachments (Terms of Use)

Description Rahul Sundaram 2013-04-02 23:09:16 UTC
Description of problem:

http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

XDG basedir spec is followed by most modern desktop apps and specifies that the cache directory should be $XDG_CACHE_HOME/icedtea if that variable is set or .cache/icedtea otherwise.  Please use this setting by default.  Thanks!

Comment 1 Rahul Sundaram 2013-04-02 23:19:18 UTC
Also .config/icedtea should be used in general instead of .icedtea

Comment 2 jiri vanek 2013-05-13 11:08:32 UTC
This is huger task then it looks. I will add it to goals for ITW 1.5
http://icedtea.classpath.org/wiki/IcedTea-Web#IcedTea-Web_1.5

Comment 3 jiri vanek 2013-05-20 15:07:29 UTC
Actually for ITW itself this is not so evil, But I'm hesitating how to process the with the files and settings in previous directories. 
Have  specification any magical approach?

Comment 4 Rahul Sundaram 2013-05-20 17:03:19 UTC
The spec itself doesn't say but most implementations, just migrate the legacy directories if any to the new locations during launch time. 

https://git.gnome.org/browse/gtk+/tree/gtk/gtkbookmarksmanager.c#n202

If it is a gui, you may optionally prompt the user for confirmation but it is a implementation detail and not necessary.   the rationale for the new locations is described in http://ploum.net/post/207-modify-your-application-to-use-xdg-folders.

Comment 5 jiri vanek 2013-05-20 19:12:16 UTC
Thanx for comment, the reasons are pretty clear, and for "solution" I had hoped for some magic ;)
 I have posted the initial patch: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2013-May/023356.html

Comment 6 Rahul Sundaram 2013-05-20 19:17:41 UTC
Thanks for working on it.  From what I understand from that patch, you are hard coding the directories which isn't following the spec correctly.  You are supposed to read the environment variables first and use the folders as fallback allowing deployments to customize the folder per their needs if needed.  

So the logic would be,  read $XDG_CACHE_HOME first and if it doesn't exist, use ~/.cache and similarly for other folders.

Comment 7 jiri vanek 2013-05-21 08:15:10 UTC
Yes. I know. This was first and early stage of patch. It is always better to have at least some patch before starting the discussion :).

Anyway, thanx for comments!

Comment 8 jiri vanek 2013-07-15 17:55:26 UTC
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2013-July/023981.html
With some luck final version of patch.


Note You need to log in before you can comment on or make changes to this bug.