[gentoo-dev] Re: New eclass: xdg-basedir
Le mercredi 29 janvier 2014 à 22:37 -0500, Mike Gilbert a écrit : One difference: it creates 3 of the 4 directories under ${HOME} instead of ${T}, just to mimic the default behavior in the XDG basedir spec a bit more closely. The thing with ${HOME} is that it should not be a directory where XDG compliants tools should be able to store anything permanent while building since this would affect consecutive builds (say gobject-introspection, gstreamer registry, etc). This is why it is set to ${T} in gnome2-utils.eclass. -- Gilles Dartiguelongue e...@gentoo.org Gentoo
[gentoo-dev] Re: New eclass: xdg-basedir
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 01/30/2014 03:11 AM, Gilles Dartiguelongue wrote: Le mercredi 29 janvier 2014 à 22:37 -0500, Mike Gilbert a écrit : One difference: it creates 3 of the 4 directories under ${HOME} instead of ${T}, just to mimic the default behavior in the XDG basedir spec a bit more closely. The thing with ${HOME} is that it should not be a directory where XDG compliants tools should be able to store anything permanent while building since this would affect consecutive builds (say gobject-introspection, gstreamer registry, etc). This is why it is set to ${T} in gnome2-utils.eclass. I don't know about other package managers, but portage at least sets $HOME to ${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/homedir, so this is a non-issue for portage. -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCgAGBQJS6gxWAAoJELHSF2kinlg43+0QAIRQta3FrJCG0rwC8eVN0TrQ heU/UG5xxBXlnYfSx1KZMH2lasGsZ6d31oycW404muSt7L7gOnpQGAa0upXGMMeq aC6dKyxj5psb0WQRp4NeNkofPyGzOGlK7LYiEgGdl63yEadWkU+1cTK8HCwNpYEt iOyDE5o/W05M3iPSkdjetrvADh2w3jK6paVekPWKoeawADalJQ9pjPcNUdiNZSzb D2L7Td/IAiEOUYt6sQVTs4idExhDc3ndSFNcd8Z/C1/L60EZlJd+CWcP7mReOJkA pToVXOAACxCRUBR4tUq23BZmBGN7d891SfybLbkAc/UjyS7f1gvCLPq4WLvmE+G/ wVmqbnhilRkfP/ecjaZKDg+l32sf+yNbqth+aD9CvYvIo4wvhbFqxlu3tyut37fn OdlwWi6vrMIHicem5NBx/u7E7lh/mnUFKGtPBY/jSPlPCGf/D2T9ET4M7PH5UIRQ fQePKx1GrNvlm5R80qENl/qL72NxX5sEd+fFZ4O6utEnceKQFcLwn6js6HsHetXM DQsEsiCnex+f204MQ+fFInqNU5Sfk5u207zwLELDiinfms9jSSsa6ovemC7NtmNq bJZagpdm51Y5oKjJLZhHad3gwc5u1uJnc9vZGOYeoO0tlD0ad3Zq5PRYkxouWTqQ 5YrXNfLdT0tQ/NXngdWe =JJd7 -END PGP SIGNATURE-
[gentoo-dev] Re: New eclass: xdg-basedir
On Thu, 30 Jan 2014, Gilles Dartiguelongue wrote: The thing with ${HOME} is that it should not be a directory where XDG compliants tools should be able to store anything permanent while building since this would affect consecutive builds (say gobject-introspection, gstreamer registry, etc). This is why it is set to ${T} in gnome2-utils.eclass. HOME is as temporary as T during build time. PMS says: The full path to an appropriate temporary directory for use by any programs invoked by the ebuild that may read or modify the home directory. With Portage, HOME will point to: ${PORTAGE_TMPDIR}/${CATEGORY}/${PF}/homedir/ Ulrich pgpwttJIn7vUy.pgp Description: PGP signature
Re: [gentoo-dev] Re: New eclass: xdg-basedir
Le jeudi 30 janvier 2014 à 09:29 +0100, Ulrich Mueller a écrit : On Thu, 30 Jan 2014, Gilles Dartiguelongue wrote: The thing with ${HOME} is that it should not be a directory where XDG compliants tools should be able to store anything permanent while building since this would affect consecutive builds (say gobject-introspection, gstreamer registry, etc). This is why it is set to ${T} in gnome2-utils.eclass. HOME is as temporary as T during build time. PMS says: The full path to an appropriate temporary directory for use by any programs invoked by the ebuild that may read or modify the home directory. With Portage, HOME will point to: ${PORTAGE_TMPDIR}/${CATEGORY}/${PF}/homedir/ Very well then. -- Gilles Dartiguelongue e...@gentoo.org Gentoo signature.asc Description: This is a digitally signed message part
[gentoo-dev] Re: New eclass: xdg-basedir
On 01/30/2014 02:37 PM, Mike Gilbert wrote: Here's a simple eclass that pretty much just extracts the XDG stuff from the gnome2_environment_reset function. One difference: it creates 3 of the 4 directories under ${HOME} instead of ${T}, just to mimic the default behavior in the XDG basedir spec a bit more closely. Please give a look. Hi, Thanks for working on this. Two thoughts: 1. Would it be worth consolidating this, fdo-mime.eclass, and some other gnome2-utils stuff (eg. gnome2_icon_cache_update) into a larger freedesktop eclass? 2. xdg-basedir-setup - xdg-basedir_setup is more consistent with other modern eclasses, especially if there are additional functions in the future. Best regards, Michael
[gentoo-dev] Re: New eclass: xdg-basedir
On Thu, 30 Jan 2014, Michael Palimaka wrote: 2. xdg-basedir-setup - xdg-basedir_setup is more consistent with other modern eclasses, especially if there are additional functions in the future. It may be little known, but strictly speaking, hyphens in bash identifiers are illegal: `name' A `word' consisting solely of letters, numbers, and underscores, and beginning with a letter or underscore. `Name's are used as shell variable and function names. Also referred to as an `identifier'. This isn't specific to xdg-basedir though, but a problem that most of our eclasses suffer from. Ulrich pgpr8eAY4oCIg.pgp Description: PGP signature
Re: [gentoo-dev] Re: New eclass: xdg-basedir
On Thu, 30 Jan 2014 14:03:52 +0100 Ulrich Mueller u...@gentoo.org wrote: It may be little known, but strictly speaking, hyphens in bash identifiers are illegal: `name' A `word' consisting solely of letters, numbers, and underscores, and beginning with a letter or underscore. `Name's are used as shell variable and function names. Also referred to as an `identifier'. That looks wrong for all kinds of reasons and it is directly contradicted in the same document and in the source code. But we digress... :) Regards, jer
Re: [gentoo-dev] Re: New eclass: xdg-basedir
On Thu, Jan 30, 2014 at 6:48 AM, Michael Palimaka kensing...@gentoo.org wrote: On 01/30/2014 02:37 PM, Mike Gilbert wrote: Here's a simple eclass that pretty much just extracts the XDG stuff from the gnome2_environment_reset function. One difference: it creates 3 of the 4 directories under ${HOME} instead of ${T}, just to mimic the default behavior in the XDG basedir spec a bit more closely. Please give a look. Hi, Thanks for working on this. Two thoughts: 1. Would it be worth consolidating this, fdo-mime.eclass, and some other gnome2-utils stuff (eg. gnome2_icon_cache_update) into a larger freedesktop eclass? That sounds like a reasonable idea to me, but I'm not sure I'm the right person to make that call. I don't maintain many desktop packages. If some others chime in saying this would be desirable, I could certainly work on that. Ideally, I would like the freedesktop maintainers to agree on any/all functions that should be moved to the new eclass. Otherwise, I will stick with the current xdg-basedir eclass and leave the consolidation work to someone else. 2. xdg-basedir-setup - xdg-basedir_setup is more consistent with other modern eclasses, especially if there are additional functions in the future. Personally, I think that looks stupid. ^_^ Not something I'm going to fight over if it bothers people though.
[gentoo-dev] Re: New eclass: xdg-basedir
On 01/31/2014 04:32 AM, Mike Gilbert wrote: On Thu, Jan 30, 2014 at 6:48 AM, Michael Palimaka kensing...@gentoo.org wrote: On 01/30/2014 02:37 PM, Mike Gilbert wrote: Here's a simple eclass that pretty much just extracts the XDG stuff from the gnome2_environment_reset function. One difference: it creates 3 of the 4 directories under ${HOME} instead of ${T}, just to mimic the default behavior in the XDG basedir spec a bit more closely. Please give a look. Hi, Thanks for working on this. Two thoughts: 1. Would it be worth consolidating this, fdo-mime.eclass, and some other gnome2-utils stuff (eg. gnome2_icon_cache_update) into a larger freedesktop eclass? That sounds like a reasonable idea to me, but I'm not sure I'm the right person to make that call. I don't maintain many desktop packages. If some others chime in saying this would be desirable, I could certainly work on that. Ideally, I would like the freedesktop maintainers to agree on any/all functions that should be moved to the new eclass. Speaking as part of KDE team which is part of freedesktop, I would specifically like to see: * xdg-basedir-setup * fdo-mime_desktop_database_update * fdo-mime_mime_database_update * gnome2_icon_savelist * gnome2_icon_cache_update I understand the GNOME team had some ideas too (I saw a mail but it didn't end up on the list here), so hopefully they will chime in as well.