Bug 3737 - (int-88933) hildon-theme-cacher is run after installing, instead of while building
(int-88933)
: hildon-theme-cacher is run after installing, instead of while building
Status: RESOLVED FIXED
Product: Desktop platform
Themes
: 4.1.1 (4.2008.30-2)
: All Linux
: Low normal with 1 vote (vote)
: 5.0-alpha
Assigned To: unassigned
: themes-bugs
:
: performance
:
:
  Show dependency tree
 
Reported: 2008-09-25 00:18 UTC by Leif Ryge
Modified: 2009-03-02 13:38 UTC (History)
2 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Leif Ryge (reporter) 2008-09-25 00:18:59 UTC
SOFTWARE VERSION:
OS2008 etc

STEPS TO REPRODUCE THE PROBLEM:
1. Install a theme built with hildon-theme-tools, such as Plankton or LCARS
2. Uninstall the theme

EXPECTED OUTCOME:
* Theme installation should be quick
* Themes shouldn't leave stray files behind after being uninstalled:
 $ ls /usr/share/themes/plankton
 ls: cannot access /usr/share/themes/plankton: No such file or directory

ACTUAL OUTCOME:
* Installing a single theme can take over a minute
* Themes leave cache files behind after being uninstalled:
 $ ls /usr/share/themes/plankton
 gtk-2.0
 $ ls /usr/share/themes/plankton/gtk-2.0
 gtkrc.cache  gtkrc.maemo_af_desktop.cache

REPRODUCIBILITY:
always

EXTRA SOFTWARE INSTALLED:
http://repository.maemo.org/pool/diablo/free/h/hildon-theme-plankton/hildon-theme-plankton_4.14.4-1_all.deb
http://synthesize.us/LCARS_PADD

OTHER COMMENTS:
Themes created with hildon-theme-tools use hildon-theme-plankton as a template,
which runs hildon-theme-cacher in its postinst script. This command takes well
over 40 seconds to complete. When themes are uninstalled, the gtkrc.cache and
gtkrc.maemo_af_desktop.cache created by the cacher are not known to dpkg, so
they are not removed.

Wouldn't it make more sense to run hildon-theme-cacher during the build
process, so that it doesn't need to be installed on the device?

Benefits:
- Installing new theme(s) would take significantly less time
- Theme directories would be completely removed on uninstall
- One less piece of software to have installed on the device

Downsides:
- Makes scratchbox a requirement for building themes (it isn't currently)
- Perhaps I'm missing something else? (Why is it done the way it is now?)

(For the LCARS 4.2 release, we're still running hildon-theme-cacher in our
postinst script, and neglecting to remove them in postrm, just like
hildon-theme-plankton does. Our next update will at least delete the cache
files on removal if not generate them at build time.)
Comment 1 Andre Klapper maemo.org 2008-09-25 15:13:06 UTC
> SOFTWARE VERSION:
> OS2008 etc
That's vague. "4.2008.30-2" is better.

Confirming - Uninstalled LCARS theme and still got /usr/share/themes/lcars-*
available.
Comment 2 Andre Klapper maemo.org 2008-11-10 17:25:51 UTC
This has been fixed for Fremantle.

"A prerm script was added that cleans the .cache files.
This seems like a quick and safe solution for now."
Comment 3 Eero Tamminen nokia 2008-11-17 12:50:02 UTC
(In reply to comment #2)
> This has been fixed for Fremantle.
> 
> "A prerm script was added that cleans the .cache files.
> This seems like a quick and safe solution for now."

But bad one and doesn't fix what's reported here, only subset of it.  Doing
cache building on device that could be done on desktop increases the device
file system churn (which is bad for several reasons) and unnecessarily slows
down theme installation. -> perf keyword
Comment 4 Andre Klapper maemo.org 2008-11-21 14:29:25 UTC
Reopening because only partially fixed
Comment 5 Andre Klapper maemo.org 2009-02-17 17:06:31 UTC
This should be FIXED in Fremantle now.