Bug 382778

Summary: YaST desktop files should use Settings and System categories
Product: [openSUSE] openSUSE 11.0 Reporter: Vincent Untz <vuntz>
Component: YaST2Assignee: Jiri Srain <jsrain>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: jsuchome, ke, kontakt, ralf
Version: Beta 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Vincent Untz 2008-04-23 13:57:39 UTC
To nicely integrate with tools that are not YaST-aware, the YaST desktop files should probably list two more categories: Settings and System. They nicely fit the YaST tools.

See http://specifications.freedesktop.org/menu-spec/menu-spec-latest.html#category-registry
Comment 3 Stephan Kulow 2008-05-14 11:11:25 UTC
you can do a hotfix in /usr/lib/rpm/suse_update_desktop_file.sh for the desktop files you do not catch. The script knows that the file is under /usr/share/applications/YaST2 and it can add the categories automatically if not already present.
Comment 4 Jiri Srain 2008-05-16 15:06:02 UTC
I just changed all YaST .desktop files in SVN, hoping that most of them get to autobuild due to other fixes.

Stephan, IIRC you had a script for finding changes in subversion which are not in factory, right? Perhaps we could use it in order to submit missing packages before RC1 and avoid the hotfix you suggested above (even though it does not help the few YaST modules which are not hosted in the YaST subversion repository)
Comment 5 Stephan Kulow 2008-05-16 21:23:09 UTC
I mass submitted all packs that had obviously only your change - the rest I put in ~/Export/yast2-diffs
Comment 6 Andreas Jaeger 2008-05-18 06:08:17 UTC
Now it's worth - the packages do not build anymore:

ERROR: No sufficient Category definition: /var/tmp/yast2-tune-2.16.1-build//usr/share/applications/YaST2/hwinfo.desktop
ERROR: No sufficient Category definition: /var/tmp/yast2-tune-2.16.1-build//usr/share/applications/YaST2/system_settings.desktop
.
Comment 7 Stephan Binner 2008-05-18 06:48:50 UTC
Rather worse than worth all this struggle... ;-)

> To nicely integrate with tools that are not YaST-aware

What 'tools' are we talking about btw? Obviously the YaST control center are by design the only way they are meant to be found/used.
Comment 8 Vincent Untz 2008-05-18 09:28:33 UTC
(In reply to comment #6 from Andreas Jaeger)
> Now it's worth - the packages do not build anymore:
> 
> ERROR: No sufficient Category definition:
> /var/tmp/yast2-tune-2.16.1-build//usr/share/applications/YaST2/hwinfo.desktop
> ERROR: No sufficient Category definition:
> /var/tmp/yast2-tune-2.16.1-build//usr/share/applications/YaST2/system_settings.desktop
> .

It's not clear to me what the error means, but Stephan suggested it was because the item appeared in multiple places. I've put those categories in the desktop files on my system, and as far as I can tell, the issue would be that the items appear in System->More Programs. In this case it's just a matter of adding <Not><Category>X-SuSE-YaST</Category></Not> in the .menu file under the System->More Programs menu.

(In reply to comment #7 from Stephan Binner)
> Rather worse than worth all this struggle... ;-)
> 
> > To nicely integrate with tools that are not YaST-aware
> 
> What 'tools' are we talking about btw? Obviously the YaST control center are by
> design the only way they are meant to be found/used.

Well, all tools that might use menu files. Like the application browsers, etc. If someone uses a .menu file that we didn't patch in some way to exclude the YaST items (with the X-SuSE-YaST category), then he will see all the YaST items.  Another example is that when I build GNOME (but it's true for all other desktops, I guess) in another prefix, but still set XDG_DATA_DIRS to contain /usr/share, then I have the upstream menu structure with all the .desktop files we ship in openSUSE. Which means I get all the YaST items displayed where they shouldn't.

(also note that at least System or Settings should be added: right now, those .desktop files do not have any "main" category registered in the fd.o menu spec, and that's wrong according to the spec, which makes them invalid)
Comment 9 Jiri Srain 2008-05-19 15:26:05 UTC
The build issue has already been fixed, marking this bug accordingly.