Re: update-desktop-database location
On Thu, 09 Feb 2006 12:03:09 +0100, Christian Westgaard wrote: So I'm back to scripting individual tests per distro and gnome/kde version. Note that autopackage already does this, so before duplicating our work you may wish to investigate if using it would make sense for you. thanks -mike ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg
Re: update-desktop-database location
On Mon, 06 Feb 2006 16:25:15 +0100, Stanislav Brabec [EMAIL PROTECTED] wrote: Matthias Clasen wrote: On Mon, 2006-02-06 at 15:46 +0100, Christian Westgaard wrote: http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html Does not specify the location of the update-desktop-database script. I currently test for XDG support like this: if update-desktop-database --help /dev/null 21; then But when update-desktop-database is not in $PATH, I'm out of luck. Is there a better test? A specced one? Well, common sense suggests to look in /usr/bin. Does that really needs to be explicit in the spec ? Come on. Specifically SuSE has for historical reasons: sbrabec~ which update-desktop-database /opt/gnome/bin/update-desktop-database It should be in PATH in any case. But you can use: update-desktop-database 2/dev/null || true Or specifically in current version of SuSE: SuSEconfig --module desktop-file-utils It is started after installation of any package. I thought the idea was, not to have one check for every distro/version of distro, but to have one common way, defined by a standard. -- Christian Westgaard [EMAIL PROTECTED] Developer and Project Manager Opera Software ASA ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg
Re: update-desktop-database location
On Tue, 2006-02-07 at 15:34 +0100, Christian Westgaard wrote: On Mon, 06 Feb 2006 16:14:03 +0100, Matthias Clasen [EMAIL PROTECTED] wrote: On Mon, 2006-02-06 at 15:46 +0100, Christian Westgaard wrote: http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html Does not specify the location of the update-desktop-database script. I currently test for XDG support like this: if update-desktop-database --help /dev/null 21; then But when update-desktop-database is not in $PATH, I'm out of luck. Is there a better test? A specced one? Well, common sense suggests to look in /usr/bin. Does that really needs to be explicit in the spec ? Come on. Actually on SuSE update-desktop-database is not located in /usr/bin nor in $PATH. One might like to say that this means SuSE does not follow the standard, but one cannot since: The standard does not state explicitly that update-desktop-database must be in $PATH (nor that it must be in a specific location, like /usr/bin or $XDG_BIN_DIRS ) I personally think its silly to put a binary thats supposed to be used by third-party apps out of $PATH. Maybe that should be made explicit in the spec then. I don't think inventing yet another env var for this will make things any better. Matthias ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg
Re: update-desktop-database location
On Tue, 07 Feb 2006 15:51:25 +0100, Matthias Clasen [EMAIL PROTECTED] wrote: On Tue, 2006-02-07 at 15:34 +0100, Christian Westgaard wrote: On Mon, 06 Feb 2006 16:14:03 +0100, Matthias Clasen [EMAIL PROTECTED] wrote: On Mon, 2006-02-06 at 15:46 +0100, Christian Westgaard wrote: http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html Does not specify the location of the update-desktop-database script. I currently test for XDG support like this: if update-desktop-database --help /dev/null 21; then But when update-desktop-database is not in $PATH, I'm out of luck. Is there a better test? A specced one? Well, common sense suggests to look in /usr/bin. Does that really needs to be explicit in the spec ? Come on. Actually on SuSE update-desktop-database is not located in /usr/bin nor in $PATH. One might like to say that this means SuSE does not follow the standard, but one cannot since: The standard does not state explicitly that update-desktop-database must be in $PATH (nor that it must be in a specific location, like /usr/bin or $XDG_BIN_DIRS ) I personally think its silly to put a binary thats supposed to be used by third-party apps out of $PATH. Maybe that should be made explicit in the spec then. Yup, that's what I think. I don't think inventing yet another env var for this will make things any better. I agree. Which is why I put it in parentheses :) -- Christian Westgaard [EMAIL PROTECTED] Developer and Project Manager Opera Software ASA ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg
Re: update-desktop-database location
Christian Westgaard píše v Út 07. 02. 2006 v 15:45 +0100: But you can use: update-desktop-database 2/dev/null || true Or specifically in current version of SuSE: SuSEconfig --module desktop-file-utils It is started after installation of any package. I thought the idea was, not to have one check for every distro/version of distro, but to have one common way, defined by a standard. I understand. And what about adding pkg-config file desktop-file-utils.pc, as other packages do. It can provide correct value of prefix, bindir etc. -- Best Regards / S pozdravem, Stanislav Brabec software developer - SuSE CR, s. r. o. e-mail: [EMAIL PROTECTED] Drahobejlova 27 tel: +420 296 542 382 190 00 Praha 9fax: +420 296 542 374 Czech Republichttp://www.suse.cz/ ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg
Re: update-desktop-database location
On Tue, Feb 07, 2006 at 04:52:39PM +0100, Stanislav Brabec wrote: Daniel Stone wrote: On Tue, Feb 07, 2006 at 04:40:56PM +0100, Stanislav Brabec wrote: And what about adding pkg-config file desktop-file-utils.pc, as other packages do. It can provide correct value of prefix, bindir etc. Surely this just shifts the problem to a more obscure one? This way, you'll need to keep $(prefix)/lib/pkgconfig in $PKG_CONFIG_PATH, rather than only having to remember to update $PATH. Yes, but it is already done in products using obscure paths. In difference to PATH (and which binary), pkg-config is intended to answer questions like: - Is package desktop-file-utils installed? if which desktop-file-utils /dev/null 21; then fi - Where are desktop-file-utils binaries installed? which desktop-file-utils - Which version of desktop-file-utils we are using? desktop-file-utils --version I think it's overkill for your requirements, personally. Cheers, Daniel ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg
Re: update-desktop-database location
Daniel Stone píše v Út 07. 02. 2006 v 15:55 +: On Tue, Feb 07, 2006 at 04:52:39PM +0100, Stanislav Brabec wrote: In difference to PATH (and which binary), pkg-config is intended to answer questions like: - Is package desktop-file-utils installed? if which desktop-file-utils /dev/null 21; then fi - Where are desktop-file-utils binaries installed? which desktop-file-utils - Which version of desktop-file-utils we are using? desktop-file-utils --version I think it's overkill for your requirements, personally. But please compare configure.ac: With pkgconfig: PKG_CHECK_MODULES(foo1, foo2, desktop-file-utils 0.1) DESKTOP_FILE_UTILS_BINDIR=`pkg-config --variable=bindir desktop-file-utils` Without pkgconfig: - AFAIK, which binary is not a part of all UNIXes. - Use AC_PATH_PROG. - Maintain all possible non-standard paths from all distros in AC_PATH_PROG. - Call desktop-file-utils --version, write a 5 lines of a sed script, which parses it (and often contains bugs or fails it --version string changes a little). -- Best Regards / S pozdravem, Stanislav Brabec software developer - SuSE CR, s. r. o. e-mail: [EMAIL PROTECTED] Drahobejlova 27 tel: +420 296 542 382 190 00 Praha 9fax: +420 296 542 374 Czech Republichttp://www.suse.cz/ ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg
Re: update-desktop-database location
On Tue, Feb 07, 2006 at 04:40:56PM +0100, Stanislav Brabec wrote: Christian Westgaard p??e v ?t 07. 02. 2006 v 15:45 +0100: But you can use: update-desktop-database 2/dev/null || true Or specifically in current version of SuSE: SuSEconfig --module desktop-file-utils It is started after installation of any package. I thought the idea was, not to have one check for every distro/version of distro, but to have one common way, defined by a standard. I understand. And what about adding pkg-config file desktop-file-utils.pc, as other packages do. It can provide correct value of prefix, bindir etc. Surely this just shifts the problem to a more obscure one? This way, you'll need to keep $(prefix)/lib/pkgconfig in $PKG_CONFIG_PATH, rather than only having to remember to update $PATH. Cheers, Daniel ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg
Re: update-desktop-database location
Aaron J. Seigo writes: For historical reasons, binary compatibility and lack of features in RPM it is not easy to move. symlinks? If you replace directory by symlink during version update, RPM will delete your new files. Once RPM will be able to do this correctly, it would be easy to move. For now it is planned for GNOME3. -- Best Regards / S pozdravem, Stanislav Brabec software developer - SuSE CR, s. r. o. e-mail: [EMAIL PROTECTED] Drahobejlova 27 tel: +420 296 542 382 190 00 Praha 9fax: +420 296 542 374 Czech Republichttp://www.suse.cz/ ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg
Re: update-desktop-database location
Matthias Clasen wrote: On Mon, 2006-02-06 at 15:46 +0100, Christian Westgaard wrote: http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html Does not specify the location of the update-desktop-database script. I currently test for XDG support like this: if update-desktop-database --help /dev/null 21; then But when update-desktop-database is not in $PATH, I'm out of luck. Is there a better test? A specced one? Well, common sense suggests to look in /usr/bin. Does that really needs to be explicit in the spec ? Come on. Specifically SuSE has for historical reasons: sbrabec~ which update-desktop-database /opt/gnome/bin/update-desktop-database It should be in PATH in any case. But you can use: update-desktop-database 2/dev/null || true Or specifically in current version of SuSE: SuSEconfig --module desktop-file-utils It is started after installation of any package. -- Best Regards / S pozdravem, Stanislav Brabec software developer - SuSE CR, s. r. o. e-mail: [EMAIL PROTECTED] Drahobejlova 27 tel: +420 296 542 382 190 00 Praha 9fax: +420 296 542 374 Czech Republichttp://www.suse.cz/ ___ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg