After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 672939 - add API to retrieve tempdir for big/semi-persistent files
add API to retrieve tempdir for big/semi-persistent files
Status: RESOLVED DUPLICATE of bug 677272
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-03-27 17:13 UTC by Christian Persch
Modified: 2012-07-06 02:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Persch 2012-03-27 17:13:02 UTC
https://fedoraproject.org/wiki/Features/tmp-on-tmpfs says that one shouldn't store big files and semi-persistent stuff in /tmp, but instead use /var/tmp. 

IRC discussion with mezcalero came to these conclusions:

- g_get_tmp_dir() should continue to point to /tmp and take $TMPDIR into account

- instead of hardcoding /var/tmp, there should be API to retrieve the path, taking into account some yet-to-be-defined env var to make it relocatable
Comment 1 Christian Persch 2012-03-28 14:48:27 UTC
See also: http://0pointer.de/blog/projects/tmp.html
Comment 2 Matthias Clasen 2012-03-29 11:13:36 UTC
Any suggestion for a name ? g_get_var_tmp_dir() ?
Comment 3 Christian Dywan 2012-03-29 11:40:15 UTC
How about g_get_system_cache_dir() analogous to g_get_user_cache_dir(). Both are persistent across reboots and not fully featured. An XDG_CACHE_DIR couldbe introduced to re-define it.
Comment 4 Matthias Clasen 2012-07-06 02:43:14 UTC
Bug 677272 has more comprehensive discussion, so duping this bug there

*** This bug has been marked as a duplicate of bug 677272 ***