[opensuse-packaging] drop %suse_update_desktop_files macro
Hi all! In order to make our specs more cross-distro-friendly we would like to drop %suse_update_desktop_files macro. It is currently being discussed in this feature: https://features.opensuse.org/310621 . Ludwig suggested that all translation magic we do could be moved into brp-script instead of doing it in %install phase. Is it possible? Do we have an expert in this area who could help porting it? :-) Once this is done, we can replace %suse_update_desktop_files with desktop-file-install if needed (but for most cases removing the call should be enough). -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9 prusnak[at]opensuse.org Czech Republic -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le lundi 25 octobre 2010, à 17:07 +0200, Pavol Rusnak a écrit :
Hi all!
In order to make our specs more cross-distro-friendly we would like to drop %suse_update_desktop_files macro. It is currently being discussed in this feature: https://features.opensuse.org/310621 . Ludwig suggested that all translation magic we do could be moved into brp-script instead of doing it in %install phase. Is it possible? Do we have an expert in this area who could help porting it? :-) Once this is done, we can replace %suse_update_desktop_files with desktop-file-install if needed (but for most cases removing the call should be enough).
And I can fix desktop-file-install upstream to add missing features that would be needed. Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Montag 25 Oktober 2010 schrieb Pavol Rusnak:
Hi all!
In order to make our specs more cross-distro-friendly we would like to drop %suse_update_desktop_files macro. It is currently being discussed in this feature: https://features.opensuse.org/310621 . Ludwig suggested Wow, you managed to discuss removing the macro without adding the maintainer to the feature?
that all translation magic we do could be moved into brp-script instead of doing it in %install phase. Is it possible? Do we have an expert in this area who could help porting it? :-) Once this is done, we can replace %suse_update_desktop_files with desktop-file-install if needed (but for most cases removing the call should be enough). For all cases where this is done for translation only, it can most likely be dropped. But there are many cases were this is used to change the name or genericname (and remove outdated translations) without having to use a patch that would break whenver translations change.
Because packagers are lazy, they would end up changing the genericname without removing outdated translations, providing the macro is a good way to make lazy packagers do the right thing. And you have a way to mark desktop files _not_ to be translated, something you can't find out with just a brp script. But that sounds like a plan: 1. move the translation magic to a brp script (possibly even one added by prjconf, so we can remove the ugly hack that checks things based on project name) 2. change the calls that add and remove categories in the package to use some upstream technology 3. make suse_update_desktop_file fail if it's a noop 4. leave the rest in and make them optional if building against openSUSE Greeings, Stephan -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 10/25/2010 05:18 PM, Stephan Kulow wrote:
Am Montag 25 Oktober 2010 schrieb Pavol Rusnak:
Hi all!
In order to make our specs more cross-distro-friendly we would like to drop %suse_update_desktop_files macro. It is currently being discussed in this feature: https://features.opensuse.org/310621 . Ludwig suggested Wow, you managed to discuss removing the macro without adding the maintainer to the feature?
This cannot be done via openFATE.
that all translation magic we do could be moved into brp-script instead of doing it in %install phase. Is it possible? Do we have an expert in this area who could help porting it? :-) Once this is done, we can replace %suse_update_desktop_files with desktop-file-install if needed (but for most cases removing the call should be enough). For all cases where this is done for translation only, it can most likely be dropped. But there are many cases were this is used to change the name or genericname (and remove outdated translations) without having to use a patch that would break whenver translations change.
Utility desktop-file-install can do this as well (see desktop-file-install --help-edit). If there is something missing Vincent will add it ...
Because packagers are lazy, they would end up changing the genericname without removing outdated translations, providing the macro is a good way to make lazy packagers do the right thing.
And you have a way to mark desktop files _not_ to be translated, something you can't find out with just a brp script.
From what I see files in standard locations (/usr/share/applications, /usr/share/applications/kde4, /usr/share/applications/YaST2) are usually translated, the rest is usually not. But we can work on that as well.
But that sounds like a plan: 1. move the translation magic to a brp script (possibly even one added by prjconf, so we can remove the ugly hack that checks things based on project name)
This is why I wrote my origin email. Me nor Vincent could do it, that's why we asked for help.
2. change the calls that add and remove categories in the package to use some upstream technology
Should be relatively easy.
3. make suse_update_desktop_file fail if it's a noop 4. leave the rest in and make them optional if building against openSUSE
I'm not sure if I understand. Why not removing macro completely?
Greeings, Stephan
-- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9 prusnak[at]opensuse.org Czech Republic -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Mon, 25 Oct 2010 17:49:24 +0200 Pavol Rusnak <prusnak@opensuse.org> wrote:
4. leave the rest in and make them optional if building against openSUSE
I'm not sure if I understand. Why not removing macro completely?
Hi I imagine deprecated, not dropped as this would break how many packages (lots)? -- Cheers Malcolm °¿° (Linux Counter #276890) SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.23-0.3-default up 12:20, 2 users, load average: 0.00, 0.04, 0.03 GPU GeForce 8600 GTS Silent - Driver Version: 260.19.12 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 10/25/2010 06:06 PM, Malcolm wrote:
On Mon, 25 Oct 2010 17:49:24 +0200 Pavol Rusnak <prusnak@opensuse.org> wrote:
4. leave the rest in and make them optional if building against openSUSE
I'm not sure if I understand. Why not removing macro completely?
Hi I imagine deprecated, not dropped as this would break how many packages (lots)?
I meant dropping the macro in newest release (upcoming 11.4) of course. We can't remove macro from old SUSE distributions. -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9 prusnak[at]opensuse.org Czech Republic -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Mon, 25 Oct 2010 18:18:56 +0200 Pavol Rusnak <prusnak@opensuse.org> wrote:
On 10/25/2010 06:06 PM, Malcolm wrote:
On Mon, 25 Oct 2010 17:49:24 +0200 Pavol Rusnak <prusnak@opensuse.org> wrote:
4. leave the rest in and make them optional if building against openSUSE
I'm not sure if I understand. Why not removing macro completely?
Hi I imagine deprecated, not dropped as this would break how many packages (lots)?
I meant dropping the macro in newest release (upcoming 11.4) of course. We can't remove macro from old SUSE distributions.
Hi But if it's present in a spec file to build 11.1, 11.2, 11.3 and Factory (aka 11.4) as well as SLE, then it should still work, or are you saying I need to modify all my spec files just to build for factory? IMHO it should just work like the macros.gconf2 # Preamble: # %gconf_schemas_requires # (note: %gconf_schemas_prereq works, but is deprecated) -- Cheers Malcolm °¿° (Linux Counter #276890) SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.23-0.3-default up 12:48, 2 users, load average: 0.10, 0.06, 0.01 GPU GeForce 8600 GTS Silent - Driver Version: 260.19.12 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 10/25/2010 06:36 PM, Malcolm wrote:
On Mon, 25 Oct 2010 18:18:56 +0200 Pavol Rusnak <prusnak@opensuse.org> wrote:
On 10/25/2010 06:06 PM, Malcolm wrote:
On Mon, 25 Oct 2010 17:49:24 +0200 Pavol Rusnak <prusnak@opensuse.org> wrote:
4. leave the rest in and make them optional if building against openSUSE
I'm not sure if I understand. Why not removing macro completely?
Hi I imagine deprecated, not dropped as this would break how many packages (lots)?
I meant dropping the macro in newest release (upcoming 11.4) of course. We can't remove macro from old SUSE distributions.
Hi But if it's present in a spec file to build 11.1, 11.2, 11.3 and Factory (aka 11.4) as well as SLE, then it should still work, or are you saying I need to modify all my spec files just to build for factory?
If we drop macro in Factory, then the following should work: --- in preamble: %if 0%{?suse_version} && 0%{?suse_version} < 1140 BuildRequires: update-desktop-files %endif --- in %install phase: %if 0%{?suse_version} && 0%{?suse_version} < 1140 %suse_update_desktop_file %{name} %endif Usually you don't need to call anything. If you need to alter desktop file then you would use this: --- in preamble: BuildRequires: desktop-file-utils %if 0%{?suse_version} && 0%{?suse_version} < 1140 BuildRequires: update-desktop-files %endif --- in %install phase: %if 0%{?suse_version} && 0%{?suse_version} < 1140 %suse_update_desktop_file %{name} %else desktop-file-install .... %endif -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9 prusnak[at]opensuse.org Czech Republic -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Mon, 25 Oct 2010 18:45:00 +0200 Pavol Rusnak <prusnak@opensuse.org> wrote:
If we drop macro in Factory, then the following should work:
--- in preamble:
%if 0%{?suse_version} && 0%{?suse_version} < 1140 BuildRequires: update-desktop-files %endif
--- in %install phase:
%if 0%{?suse_version} && 0%{?suse_version} < 1140 %suse_update_desktop_file %{name} %endif
Usually you don't need to call anything. If you need to alter desktop file then you would use this:
--- in preamble:
BuildRequires: desktop-file-utils %if 0%{?suse_version} && 0%{?suse_version} < 1140 BuildRequires: update-desktop-files %endif
--- in %install phase:
%if 0%{?suse_version} && 0%{?suse_version} < 1140 %suse_update_desktop_file %{name} %else desktop-file-install .... %endif
Hi <is confused> So I would have to modify my spec file with the above for it to build on >= Factory? -- Cheers Malcolm °¿° (Linux Counter #276890) SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.23-0.3-default up 13:15, 2 users, load average: 0.04, 0.08, 0.08 GPU GeForce 8600 GTS Silent - Driver Version: 260.19.12 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 10/25/2010 06:45 PM, Pavol Rusnak wrote:
On 10/25/2010 06:36 PM, Malcolm wrote:
On Mon, 25 Oct 2010 18:18:56 +0200 Pavol Rusnak <prusnak@opensuse.org> wrote:
On 10/25/2010 06:06 PM, Malcolm wrote:
On Mon, 25 Oct 2010 17:49:24 +0200 Pavol Rusnak <prusnak@opensuse.org> wrote:
4. leave the rest in and make them optional if building against openSUSE
I'm not sure if I understand. Why not removing macro completely?
Hi I imagine deprecated, not dropped as this would break how many packages (lots)?
I meant dropping the macro in newest release (upcoming 11.4) of course. We can't remove macro from old SUSE distributions.
Hi But if it's present in a spec file to build 11.1, 11.2, 11.3 and Factory (aka 11.4) as well as SLE, then it should still work, or are you saying I need to modify all my spec files just to build for factory?
If we drop macro in Factory, then the following should work:
--- in preamble:
%if 0%{?suse_version} && 0%{?suse_version} < 1140 BuildRequires: update-desktop-files %endif
--- in %install phase:
%if 0%{?suse_version} && 0%{?suse_version} < 1140 %suse_update_desktop_file %{name} %endif
Usually you don't need to call anything. If you need to alter desktop file then you would use this:
--- in preamble:
BuildRequires: desktop-file-utils %if 0%{?suse_version} && 0%{?suse_version} < 1140 BuildRequires: update-desktop-files %endif
--- in %install phase:
%if 0%{?suse_version} && 0%{?suse_version} < 1140 %suse_update_desktop_file %{name} %else desktop-file-install .... %endif
I maintain 6 packages that use one or more desktop files and then I have a few more in my home project and sub projects not to mention multimedia:apps that aren't in my home. It looks like a couple of hours of unnecessary, mundane work for somebody who donates their time and is also in the middle of a couple of major updates which will most probably take another couple of weeks. Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Usually you don't need to call anything. If you need to alter desktop file then you would use this:
--- in preamble:
BuildRequires: desktop-file-utils %if 0%{?suse_version} && 0%{?suse_version} < 1140 BuildRequires: update-desktop-files %endif
Could we add desktop-file-utils to all (old) distros and make it include update-desktop-files' functionality for them? That would make it a one-liner again. cheers, JW- -- o \ Juergen Weigert paint it green! __/ _=======.=======_ <V> | jw@suse.de back to ascii! __/ _---|____________\/ \ | 0911 74053-508 __/ (____/ /\ (/) | _____________________________/ _/ \_ vim:set sw=2 wm=8 SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) SuSE. Supporting Linux since 1992. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 10/25/2010 11:40 PM, Juergen Weigert wrote:
Could we add desktop-file-utils to all (old) distros and make it include update-desktop-files' functionality for them? That would make it a one-liner again.
The package is already there for ages. Moving update-desktop-files' functionality into desktop-file-utils and dropping update-desktop-files package seems like a nice idea. It would solve a lot of problems I mentioned in the previous email. -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9 prusnak[at]opensuse.org Czech Republic -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Montag 25 Oktober 2010 schrieb Pavol Rusnak:
If we drop macro in Factory, then the following should work:
--- in preamble:
%if 0%{?suse_version} && 0%{?suse_version} < 1140 BuildRequires: update-desktop-files %endif
--- in %install phase:
%if 0%{?suse_version} && 0%{?suse_version} < 1140 %suse_update_desktop_file %{name} %endif
Usually you don't need to call anything. If you need to alter desktop file then you would use this:
--- in preamble:
BuildRequires: desktop-file-utils %if 0%{?suse_version} && 0%{?suse_version} < 1140 BuildRequires: update-desktop-files %endif
--- in %install phase:
%if 0%{?suse_version} && 0%{?suse_version} < 1140 %suse_update_desktop_file %{name} %else desktop-file-install .... %endif
Seriously you consider proposing this as an improvement to the current situation? Greetings, Stephan -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 10/26/2010 10:09 AM, Stephan Kulow wrote:
Seriously you consider proposing this as an improvement to the current situation?
Not really :-) -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9 prusnak[at]opensuse.org Czech Republic -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Montag 25 Oktober 2010 schrieb Pavol Rusnak:
Utility desktop-file-install can do this as well (see desktop-file-install --help-edit). If there is something missing Vincent will add it ...
And then we have nice little desktop-file-utils source links in everyone's home project to avoid nested %if %suse_version > 1130 ? Not so nice improvement IMO ;(
But that sounds like a plan: 1. move the translation magic to a brp script (possibly even one added by
prjconf, so we can remove the ugly hack that checks things based on project name)
This is why I wrote my origin email. Me nor Vincent could do it, that's why we asked for help.
The brp-script usually has no access to rpm macros, so you will have to find some other magic way to figure you build in openSUSE:Factory and not one project building against it (you only want to extract translations in projects that are harvested for po files).
3. make suse_update_desktop_file fail if it's a noop 4. leave the rest in and make them optional if building against openSUSE
I'm not sure if I understand. Why not removing macro completely? Because I consider it useful for backward compatibility. It may be that you care more for fedora compatibility (for whatever reason), but I care that it's still possible to build packages for all openSUSE versions and ignore fedora.
Greetings, Stephan -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 10/26/2010 10:08 AM, Stephan Kulow wrote:
I'm not sure if I understand. Why not removing macro completely? Because I consider it useful for backward compatibility. It may be that you care more for fedora compatibility (for whatever reason), but I care that it's still possible to build packages for all openSUSE versions and ignore fedora.
I get it now, sorry for the noise. I thought you wanted to keep it in distro forever. I agree we should phase it out gradually. -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9 prusnak[at]opensuse.org Czech Republic -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
2010/10/25 Stephan Kulow <coolo@suse.de>:
Am Montag 25 Oktober 2010 schrieb Pavol Rusnak:
Hi all!
In order to make our specs more cross-distro-friendly we would like to drop %suse_update_desktop_files macro. It is currently being discussed in this feature: https://features.opensuse.org/310621 . Ludwig suggested Wow, you managed to discuss removing the macro without adding the maintainer to the feature?
that all translation magic we do could be moved into brp-script instead of doing it in %install phase. Is it possible? Do we have an expert in this area who could help porting it? :-) Once this is done, we can replace %suse_update_desktop_files with desktop-file-install if needed (but for most cases removing the call should be enough). For all cases where this is done for translation only, it can most likely be dropped. But there are many cases were this is used to change the name or genericname (and remove outdated translations) without having to use a patch that would break whenver translations change.
Because packagers are lazy, they would end up changing the genericname without removing outdated translations, providing the macro is a good way to make lazy packagers do the right thing.
And you have a way to mark desktop files _not_ to be translated, something you can't find out with just a brp script.
But that sounds like a plan: 1. move the translation magic to a brp script (possibly even one added by prjconf, so we can remove the ugly hack that checks things based on project name) 2. change the calls that add and remove categories in the package to use some upstream technology 3. make suse_update_desktop_file fail if it's a noop 4. leave the rest in and make them optional if building against openSUSE
Seems OK to me. Just something I just noticed: it seems "%suse_update_desktop_files" doesn't works with .directory files. Perhaps this could be fixed in this new brp script? I noticed this with wine: It adds new entries to the menu layout and .directory files for them (see /usr/share/desktop-directories/wine-Programs.directory). -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Sonntag 31 Oktober 2010 schrieb Cristian Morales Vega:
Just something I just noticed: it seems "%suse_update_desktop_files" doesn't works with .directory files. Perhaps this could be fixed in this new brp script? I noticed this with wine: It adds new entries to the menu layout and .directory files for them (see /usr/share/desktop-directories/wine-Programs.directory).
File a bug report. The underlying script will very likely not disappear. Greetings, Stephan -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (7)
-
Cristian Morales Vega
-
Dave Plater
-
Juergen Weigert
-
Malcolm
-
Pavol Rusnak
-
Stephan Kulow
-
Vincent Untz