I have two similar gentoo boxes, both running ~amd64 with kde overlay. After upgrading to kde 4.5.1, on only one of the two boxes, KDE's applications menu becomed empty. It already happened in the past (always on the same box), and running kbuildsycoca4 fixed the problem. This time it doesn't fix, also running with --noincremental doesn't help. This is the output: kbuildsycoca4 running... kbuildsycoca4(5590) KBuildMimeTypeFactory::createEntry: Missing <comment> field in "text/x-component.xml" kbuildsycoca4(5590) KBuildMimeTypeFactory::createEntry: Missing <comment> field in "application/x-msdownload.xml" kbuildsycoca4(5590) KBuildMimeTypeFactory::createEntry: Missing <comment> field in "application/vnd.ms-powerpoint.presentation.macroEnabled.12.xml" kbuildsycoca4(5590) KBuildMimeTypeFactory::createEntry: Missing <comment> field in "application/vnd.openxmlformats-officedocument.spreadsheetml.template.xml" kbuildsycoca4(5590) KBuildMimeTypeFactory::createEntry: Missing <comment> field in "application/vnd.ms-word.document.macroEnabled.12.xml" kbuildsycoca4(5590) KBuildMimeTypeFactory::createEntry: Missing <comment> field in "application/vnd.ms-excel.sheet.macroEnabled.12.xml" kbuildsycoca4(5590) KBuildMimeTypeFactory::createEntry: Missing <comment> field in "application/vnd.ms-word.template.macroEnabled.12.xml" kbuildsycoca4(5590) KBuildMimeTypeFactory::createEntry: Missing <comment> field in "application/vnd.ms-powerpoint.slideshow.macroEnabled.12.xml" kbuildsycoca4(5590) KBuildMimeTypeFactory::createEntry: Missing <comment> field in "application/vnd.ms-excel.template.macroEnabled.12.xml" kbuildsycoca4(5590) KBuildMimeTypeFactory::createEntry: Missing <comment> field in "application/vnd.ms-powerpoint.template.macroEnabled.12.xml" kbuildsycoca4(5590) KBuildMimeTypeFactory::createEntry: Missing <comment> field in "application/vnd.ms-excel.sheet.binary.macroEnabled.12.xml" kbuildsycoca4(5590) KBuildMimeTypeFactory::createEntry: Missing <comment> field in "application/vnd.openxmlformats-officedocument.presentationml.template.xml" kbuildsycoca4(5590) KBuildMimeTypeFactory::createEntry: Missing <comment> field in "application/vnd.openxmlformats-officedocument.wordprocessingml.template.xml" kbuildsycoca4(5590): "applications.menu" not found in ("/home/isabella/.config/menus/", "/etc/xdg/menus/") kbuildsycoca4(5590) KConfigGroup::readXdgListEntry: List entry MimeType in ".hidden/kommander.desktop" is not compliant with XDG standard (missing trailing semicolon). On both boxes I only have /etc/xdg/menus/kde-4.5-applications.menu and XDG_MENU_PREFIX is empty, so I can't understand why this difference of results. Reproducible: Always
Ok, I found the difference. I must have confused the shells during my test, because on the box with the problems XDG_MENU_PREFIX is still "kde-4.4-". Rebuilding kde-base/kdebase-startkde doesn't solved the problem. I solved setting the variable value to "kde-4.5-" and starting kbuildsycoca4 --noincremental, but after a reboot the value has returned to "kde-4.4-". I can't understand why on this box this variabile is set to a wrong value and on the other one is empty...
I made a search for XDG_MENU_PREFIX on /etc, and found that it is set in /etc/X11/xinit/xinitrc.d/11-xdg-menu-KDE-4 equery told me that this file is given by kde-base/kde-env, but rebuilding it doesn't solved the problem. Looking for $DESKTOP_SESSION (the other variable involved into /etc/X11/xinit/xinitrc.d/11-xdg-menu-KDE-4) there is another difference between the two boxes: the one with no problems has "default" as value, the other one has "KDE-4". Now I have modified /etc/X11/xinit/xinitrc.d/11-xdg-menu-KDE-4 and put the right value for XDG_MENU_PREFIX, but i think there is a bug, maybe in kde-base/kde-env ebuild
Nope, there's no bug. The 'problem' is - *you* need to properly resolve etc-update after reinstall of kde-env. This is unfortunate, because /etc/ is in protected area, so we cannot silently overwrite values there. So as a solution, every time you reinstall kde-env, you need to overwrite existing /etc/X11/xinit/xinitrc.d/11-xdg-menu-KDE-4 file with incoming one ('new' one). We should think however how to make it not necessary..
I've renamed that XDG file to have SLOT-specific name, so dispatch.conf will not be called anymore. Now, after minor upgrade (4.5 -> 4.6 for instance) you just need to logoff and log back in.