https://bugs.kde.org/show_bug.cgi?id=516348

            Bug ID: 516348
           Summary: Kickoff does not pick up manually installed or removed
                    applications unlike KDE menu editor
    Classification: Plasma
           Product: plasmashell
      Version First 6.5.2
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Application Launcher (Kickoff) widget
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
  Target Milestone: 1.0

SUMMARY
Guix does not install software by modifying files in place. Instead, it builds
each package into an immutable path in `/gnu/store/`, then constructs a
"profile" — a directory in the store that aggregates symlinks to all installed
packages. A new profile is generated whenever a program is installed, removed
or updated. Importantly, the previous profiles remain accessible the entire
time, only a symlink pointing to the user's current profile is atomically
updated.

Kickoff will not display an entry for e.g. firefox after `guix install
firefox`. Logging out and back in/restarting the session doesn't help. Neither
does  running `kbuildsycoca6` or `kbuildsycoca6 --noincremental` manually (an
relogging). Interestingly, KDE Menu Editor will instantly display an entry for
the newly installed firefox. Conversely, if one removes a program it is
instantly gone from KDE Menu Editor but will linger in kickoff.

The only thing that helps is deleting the `$HOME/.cache/ksycoca6_*` files

STEPS TO REPRODUCE
1. Install program with `guix install firefox`
2. Relog
3. Observe, that there is no entry in kickoff for firefox
4. Open KDE Menu Editor and observe, that an entry for firefox has been created
5. Run `kbuildsycoca6`, relog and make the same observations
6. Ditto for `kbuildsycoca6 --noincremental`
7. Delete the cache files in `$HOME/.cache/ksycoca6_*`
8. Observe that kickoff now displays an entry for firefox

OBSERVED RESULT
No entries for manually installed programs, unless cache files are deleted.

EXPECTED RESULT
Kickoff should pick up the change in programs automatically (after relogging).

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Linux-Libre 6.18.10
KDE Plasma Version: 6.5.2
KDE Frameworks Version: 6.21.0
Qt Version: 6.9.2
Graphics Platform: Wayland
GUIX environment:  
nonguix 1980960
    repository URL: https://gitlab.com/nonguix/nonguix
    branch: master
    commit: 1980960f932063f42f97ad3be4b020f68d24e62b
guix 1c4404e
    repository URL: https://git.guix.gnu.org/guix.git
    branch: master
    commit: 1c4404ef66415db050d9d98a4fa5d6a137c12334


ADDITIONAL INFORMATION
I am not certain if the issue is that the change in the profile is not picked
up or that plasma is not picking up the new cache file.
One plausible explanation seems to be that the inotify watch goes stale. The
applications of the current profile reside in
`~/.guix-profile/share/applications/`.

1. Log into a fresh session
2. Get the inode of the current profile (`stat -L
~/.guix-profile/share/applications/`)
3. Check that kded6 watches the previously identified inode (`cat /proc/$(pgrep
kded6)/fdinfo/* | grep inotify | grep <ino>`)
4. Install or remove program with `guix install/remove`
5. Check `stat -L ~/.guix-profile/share/applications/` again, the inode has
changed.
6. Recheck `cat /proc/$(pgrep kded6)/fdinfo/* | grep inotify | grep <ino>`, the
new inode is not being watched

However, in my testing I found that at least manually running `kbuildsycoca6`
updates _a_ cache file, it just seems to necessarily be the file that plasma is
actually using.

For example I had these cache files in `$HOME/.cache/`:
$ ls -la ~/.cache/ksycoca6*
-rw-r--r-- ... Feb 19 18:24 ksycoca6_en_DPGzB1XCvIzracWbGPYcVJsE1HM=  ←
plasmashell reads this
-rw-r--r-- ... Feb 19 20:38 ksycoca6_en_q8777JjgdBLo07Yy1nXIKlXXtBU=  ←
kbuildsycoca6 wrote this 

I found the one plasmashell was using via `ls -la /proc/$(pgrep plasmashell)/fd
| grep ksycoca`. After deleting the cache file plasma was using, kickoff picked
up the installed/removed programs. 

I also found a bugreport for NixOS, which I suspect has similar origins,  but I
haven't investigated it deeply https://github.com/NixOS/nixpkgs/issues/20776

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to