Bug 8257 - geda desktop files have incorrect categories
Summary: geda desktop files have incorrect categories
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Juergen Harms
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-30 20:50 CET by Barry Jackson
Modified: 2012-12-09 17:58 CET (History)
0 users

See Also:
Source RPM: geda-1.8.1-1.mga3.src.rpm
CVE:
Status comment:


Attachments

Description Barry Jackson 2012-11-30 20:50:59 CET
Description of problem:
geda packages with desktop files are missing from or in incorrect menu locations.
This was reported in -dev ML by Pierre Jarillon in the topic 'Regression in menus'.
I looked into this after he pointed out that pcb which is one of the same group of applications was displayed correctly.
pcb:          Categories=Science;Engineering;Electronics;
geda-gattrib: Categories=Engineering;Electronics;
geda-gschem:  Categories=Engineering;Electronics;

pcb.desktop validates OK
the other two have the same error/hint:
# desktop-file-validate geda-gschem.desktop
geda-gschem.desktop: hint: value "Engineering;Electronics;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu

I suggest making the geda .desktops the same as pcb.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
Barry Jackson 2012-11-30 20:53:11 CET

Assignee: bugsquad => juergen.harms
Source RPM: geda (Cauldron) => geda-1.8.1-1.mga3.src.rpm

Comment 1 Juergen Harms 2012-12-01 08:27:17 CET
Hi John. I remember, you had submitted a bug on pcb, and we then decided on the new value to set for the desktop Category of PCB.

I will create an updated version with a corresponding fix for geda. To maintain consistency, the new category must be set both for geda-gschem and for geda-gattrib. gerbv might need a similar fix, I will check.

Personally, I dont care - I have decided a long time ago that the Mandriva / Mageia desktop menu is a necessarily unsatisfactory compromise, aimed at what is perceived as the needs for Mr. everybody and is far away from what a user with a scientific/engineering profile needs. I simply have created my own desktop menu (its root is an additional item in the standard kde menu). pcb and gschem there are part of an "Editors" sub-menu. Maybe it is worth while to pursue this issue on the Mageia-Discuss ML
Comment 2 Barry Jackson 2012-12-01 11:18:09 CET
Hi Juergen, who's John? I assumed this was someone who you had maybe added in cc, but there is nobody in cc.
I don't recall discussing pcb before but may have done.
Confused. :\

Barry
Comment 3 Juergen Harms 2012-12-01 11:46:32 CET
Sorry, its me who created confusion (just back from 2 days in hospital). But confusion is limited to calling you John. No confusion about the fact that somebody (I still think it was you) asked to add "Science" to the category list.

I just pushed geda-1.8.1-2, gerbv still to do.

PS: I had a discussion on the geda list. They intend to create an overdue stable snapshot of the pcb git, hope that this will be in time before cauldron is frozen - they are aware of the deadlines planned for Mageia3.
Comment 4 Barry Jackson 2012-12-01 13:24:52 CET
Ah OK - my memory is not what it was - I do recall looking briefly at pcb as I used to use a similar program in DOS-6.2, so I may have commented then.
Yes the menu is a mess but with so many conflicting requirements it's not an easy one to solve. RPM groups shake-up has been bad enough ;)

Hope all's well after your 2 days - take it easy :)
Comment 5 Barry Jackson 2012-12-01 22:13:05 CET
.desktops now both appear in correct place, but you may want to look at this:

install-info: No dir file specified; try --help for more information.
warning: %post(geda-1:1.8.1-2.mga3.x86_64) scriptlet failed, exit status 1

Sorry ;)
Comment 6 Juergen Harms 2012-12-06 16:51:23 CET
Sorry for being slow, I have some urgent things to finish.

I cannot see this bug, trying both an upgrade from 1.7.2 and a fresh install (starting with no geda packages installed). I am using x86_64, what is your architecture? But architecture is unlikely.

Another possibility I see is that I have some required but not requested packages in my system (possibly fetched them for my local build) - but that does not look very pertinent for an error flagged at post-install. I could try a fresh install, installing geda with minimum set of packages in the system. Do you see other explanations to be explored?

Priority: do your packages install and just rant, or are you stuck?
Comment 7 Juergen Harms 2012-12-06 18:54:52 CET
I now installed a fresh minimal-KDE Alpha2 on a spare partition, updated to current cauldron and then re-booted and installed geda-gschem and geda-gattrib. No error messages (although post errors are more likely to occur after an update). How do we continue?
Comment 8 Barry Jackson 2012-12-07 00:10:30 CET
Hi Juergen,
It took a full evening but I fixed it.

The macros were wrong in %post and %preun - and I have no idea what the %postun was doing there.

It was using %__install_info instead of %_install_info and I did not see it until I had spent hours trying to debug.
Also the uninstall should use %_remove_install_info.

Now it installs correctly and the info works which it did not do before. The info is removed on uninstall.

I took the liberty of committing my changes but have left it for you to push - I also did a little spec cleaning - just defattr's and %clean section.

Cheers,
Barry
Comment 9 Barry Jackson 2012-12-07 11:44:29 CET
Been thinking - 
Should not the %post and %preun be
%post docs
...
%preun docs
...

 ...since the info files are installed by -docs ;)

Barry
Comment 10 Juergen Harms 2012-12-07 12:19:22 CET
Great thanks for committing - and sorry for the __install_info typo!

I had been prepared to need an evening finding out about preun and cie, when I had to deal with them the last time, there was bitterly little info available, but maybe that has improved, they are doing a great job with the wiki pages.

For producing the error, what version did you have before you updated (which made preun do its job?) - still trying to understand why I was unable to reproduce the messages.

My (lazyness helping) tendency is to not add "docs" to preun and post unless we know what we are doing (i.e. find pertinent documentation on these macros, or need to get rid of a warning or error message). I will keep the bug open until that is clarified.
Comment 11 Barry Jackson 2012-12-07 13:30:20 CET
You were not seeing the error because you were cherry picking geda-scheme etc.
I was installing the meta package geda.

At present only the meta package calls the %post/preun scripts.
That works because geda (meta-package) installs geda-docs which installs the info files.
If cherry picking for example by installing geda-scheme and geda-docs, the info would *not* get installed.

By using "%post docs" and "%preun docs" the info will be installed and removed whenever the geda-docs package is installed/removed.

This way it will work correctly whether cherry picking or installing the meta-package.

I don't see any problem with that.

Barry
Comment 12 Barry Jackson 2012-12-07 14:35:17 CET
I have tested a re-build with the following patch applied to current svn and it performs as expected.

Index: SPECS/geda.spec
===================================================================
--- SPECS/geda.spec	(revision 327620)
+++ SPECS/geda.spec	(working copy)
@@ -341,8 +341,8 @@
 %find_lang %{name}-gattrib
 %find_lang %{name}-gschem
 
-%post
+%post docs
 %_install_info geda-scheme.info
   
-%preun
+%preun docs
 %_remove_install_info geda-scheme.info
Comment 13 Juergen Harms 2012-12-07 17:19:51 CET
I really appreciate your help (and understand your "reproducing" explanation - which servers as education for future testing a and problem solving). What is the average user likely to install: geda of geda-gschem? But I agree, both must install flawlessly.

The fundamental problem is: I am not a dev (wrt Mageia) and have no intention to become one, nor invest to achieve perfection in package building. My aim is to act as a knowledgeable and educated user who has picked up some "exotic" packages that need to be kept in good working order (which does not go without permanently improving the relevant skills). That means, I can do a lot of spade work, but depend on people who know better. Maybe that is one of the facettes of a keeping a community distro runnning.

Many thanks to you! Juergen

Do you agree that the bug can now be closed?
Comment 14 Barry Jackson 2012-12-07 19:13:17 CET
Well he may just have installed the -docs package to do some reading ;)

I just do what I can and hopefully it's enough to help in a small way. My abilities are strictly limited, but learning keeps the grey matter ticking over ;)

I committed the last change so it just needs submitting by you and then yes it can be closed.

Cheers,
Barry
Comment 15 Juergen Harms 2012-12-09 17:57:30 CET
Submitted, is on the mirrors, tested again, thanks for the help. Closing, Juergen
Juergen Harms 2012-12-09 17:58:12 CET

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.