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

            Bug ID: 408010
           Summary: kbuildsycoca5 doesn't ever rebuild in Flatpak
           Product: Qt/KDE Flatpak Runtime
           Version: unspecified
          Platform: Flatpak
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: aleix...@kde.org
          Reporter: skierp...@gmail.com
  Target Milestone: ---

SUMMARY
(Hi, the nightly builds of kdeapps Flatpaks are fantastically useful!)

I reported in bug 405578 about a missing importer plug-in in the Skrooge
Flatpak on kdeapps, the developer fixed it (hooray!), but it remained
unavailable for me despite multiple `flatpak update`s and verifying the file
was built and present in my Flatpak.

I finally figured out that the ksycoca5_en_blahblah= file in
$FLATPAK_SANDBOX_DIR was unchanged for months. In normal Plasma desktop it
seems the KDE SYstem COnfiguration CAche gets rebuilt as needed, and I haven't
had to run kbuildsycoca5 for over a year, but it seems in a KDE Flatpak it
never (??) runs. This may be because the dates of files in a Flatpak are always
Jan 1 1970 (see
https://github.com/flathub/org.kde.okular/issues/4#issuecomment-396080001), so
whatever heuristic KDE uses to rebuild its cache doesn't work in a Flatpak.

I notice that some KDE apps have worked around this by always running
kbuildsycoca5, e.g.
https://github.com/KDE/flatpak-kde-applications/blob/master/run_kontact.sh . Is
this the right approach? Is there a better way?

STEPS TO REPRODUCE
1. Install the old Skrooge flatpak as of 2019-04-12
2. flatpak run org.kde.skrooge
3. Note File > Import > Import... is missing OFX/QFX import
4. flatpak update
5. flatpak run org.kde.skrooge
6. Note File > Import > Import... is still missing OFX/QFX import
or maybe 
a) install latest Skrooge flatpak
b) manually remove
/var/lib/flatpak/app/org.kde.skrooge/x86_64/master/active/files/lib/plugins/skrooge_import_ofx.so
c) flatpak run org.kde.skrooge
d) Note File > Import > Import... is missing OFX/QFX import
e) restore the missing plug-in?
...

OBSERVED RESULT
The newly-present plugin isn't reflected in the KSycoca cache, so it's not
available to the program.

EXPECTED RESULT
I'm not sure. Start using proper timestamps? Tell KDE Flatpak recipe writers
how and when to trigger rebuilds?

ADDITIONAL INFORMATION

WORKAROUND:
Once you realize caching is the problem, you can force a rebuild by removing
the KSycoca cache file $HOME/.var/app/<APPID>/cache/ksycoca5_en_BLAHBLAH=

I believe a better workaround is to run kbuildsycoca5 within the flatpak, e.g.
  flatpak run --command=kbuildsycoca5 org.kde.skrooge 
and I mentioned this in
https://userbase.kde.org/KDE_System_Administration/Caches#Caches_and_Rebuilding_KSycoca_in_a_flatpak
, corrections welcome.

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

Reply via email to