Fix circular dependency of in KService and plasma-workspace
Open, Needs TriagePublic


For "start menu" is defined by lots of .directory files in plasma-workspace
The file to say which desktop files go in which directory is in kservice

It doesn't seem right.

Things happen to work, until you make a change then we get a situation.

For more details see D24423 where someone is making a change and hitting a problem

IMHO kbuildsycoca should find dynamically at runtime from the system it seems it would be more cross desktop?

guoyunhe added a subscriber: guoyunhe.EditedJan 15 2020, 11:03 AM is installed at /etc/xdg/menu/ The folder contains multiple *.menu files. The spec is here

Plasma is able to read:

  • applications-merged/*.menu

If I install the new file as or, it gets ignored.

@guoyunhe can you propose a solution for KF6 that would make sure we don't have future conflicts

Move from kservice repository to plasma-workspace repository.

dfaure added a subscriber: dfaure.Jan 15 2020, 3:01 PM

Makes sense I guess. The code to parse the menu files is still in kservice/src/sycoca/vfolder_menu.cpp but kservice's job is just to read whatever is there, it doesn't need to provide it by itself. We'll just keep an uninstalled copy for the autotest ;)

Just to flesh that out more. KF5 will be presumably be co-installable with KF6 and Plasma 6 so we can't just move the file.

We would need to:

  • move to p-w under a different name
  • update the default APPLICATIONS_MENU_NAME in kservice

Given we have to handle a rename anyway, it's presumably doable within the KF5 lifetime?

If we want to ship with Plasma 5.18.0 that needs to happen effectively today.

guoyunhe added a comment.EditedJan 17 2020, 3:30 PM

Look like we didn't catch the opportunity of Plasma 5.18.0. But I have some idea on the naming.

*.directory files are located in plasma-workspace/menu/desktop/*.directory. So I guess the file should be moved to plasma-workspace/menu/desktop/ Maybe in future, there will also be different category trees for Plasma Mobile or Plasma Tablet.

Then the *.menu file can be installed with name like And future KDE6 can have Because these files will come from Plasma packages, instead of KF5 packages.

The work plan is:

  1. Copy to plasma-workspace and install it at /etc/xdg/menus/
  2. Let kbuildsycoca detect existence of both and Prefer the new one if both exists.
  3. Add deprecation comments in the file in kservice repository. It will stay here in until the end of KF5 for compatibility with old plasma workspace.