For the record.

the reason kicker hung was double entries in all desktop files, i.e. it
looked like

[Desktop Entry]
...KDE3 stuff...
[Desktop Entry]
...KDE2 stuff...

which kicker (KDE2 or KDE3) hung seemed to depend on relative order of
these entries.

The reason for double entries is rather complicated. update-menus builds
list of all menu entries from /usr/lib/menu (and other sources) and then
feeds to menu methods, in our case kde and kde3. Because both KDE2 and
KDE3 packages are installed, menu entries for both KDE2 and KDE3 are
included in this list. What happens now (as example for konsole) is

kde method gets entry for konsole two times - from KDE2 and KDE3. Both
of them define the same output file (Konsole.desktop), both specifiy
needs="x11" so kde happily outputs *both* of them. The same happens of
course to kde3 method.

My first move was to replace all needs="x11" and needs="kde" by
needs="kde3" in all KDE3 menu files and modify kde3 method to do

  kde3= AppEntry("Terminal=false\n")
instead of
  kde= AppEntry("Terminal=false\n")

this ruled out double inclusion of KDE3 menu entries in KDE2 _and_ those
KDE2 menu entries that had needs="kde" in KDE3. Unfortunately there
remained large number of KDE2 menu entries that specified needs="x11".
So I finally ended up with gross hack:

  x11= ifneq($package, "kdeadmin", \
       ifneq($package, "kdebase", \
       ifneq($package, "kdemultimedia", \
       ifneq($package, "kdenetwork", \
       ifneq($package, "kdetoys", \
       ifneq($package, "kdeutils", \
        AppEntry("Terminal=false\n") \
        ))))))

that at least allows me to have both of them. There is one KDE menu file
that specifies needs="gnome"!!! but I decided to leave it alone.

Unfortunately current menu system is not designed to have several
independent trees of the same menu entries. At least I do not see how to
easily do it. It is possible to define extra variables like

kde_version={2,3}

and then check for kde_version in menu method. The only problem is it
requires modification of KDE2 rpms. It also still results in double
entries for non-KDE systems (like Gnome).

-andrej



Reply via email to