Merge lp:~stolowski/unity8-session-snap/thumbnailer-fixes into lp:unity8-session-snap
| Status: | Rejected |
|---|---|
| Rejected by: | Paweł Stołowski on 2016-11-15 |
| Proposed branch: | lp:~stolowski/unity8-session-snap/thumbnailer-fixes |
| Merge into: | lp:unity8-session-snap |
| Diff against target: |
36 lines (+13/-0) 2 files modified
overlay/snappyenv (+12/-0) snapcraft.yaml (+1/-0) |
| To merge this branch: | bzr merge lp:~stolowski/unity8-session-snap/thumbnailer-fixes |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Unity8 Session Snap team | 2016-11-14 | Pending | |
|
Review via email:
|
|||
Description of the Change
Fixes to make thumbnailer-service work in the snap. Without them thumbnailer considers images to be of text/plain type and also cannot process them because of missing pixbuf loaders.
There are two aspects of this fix:
- usr/share/mime files are genereted when the snap is created.
- gdk-pixbuf-
I'm not totally happy with the way the mime part works, i.e. the need to copy generated files from stage to install dir. The main problem is that update-
To test this branch you need scopes wich actually trigger thumbnailer with image:/
| Michael Terry (mterry) wrote : | # |
| Michael Terry (mterry) wrote : | # |
What normally runs gdk-pixbuf-
| Paweł Stołowski (stolowski) wrote : | # |
> What normally runs gdk-pixbuf-
> them to know about SNAP instead of pulling that logic into our wrapper script?
It's normally run on per-system basis by dpkg hooks (/var/lib/
As for your earlier suggestion sure, I will try doing that, thanks for the review!
| Michael Terry (mterry) wrote : | # |
OK, I took your mime bits and added them to post-process.mk in trunk. And verified it got picked up by the snap.
So thanks for that bit! You can drop that part of this MP now.
That leaves the pixbuf loaders...
| Michael Terry (mterry) wrote : | # |
Don't bother looking at the pixbuf loaders either actually. I'm trying to integrate the desktop-loader script from snappy land and it should address that for us...
| Paweł Stołowski (stolowski) wrote : | # |
I got it working in the meantime, but indeed using existing desktop-loaders is definately a better idea. Closing this MR.
Unmerged revisions
- 54. By Paweł Stołowski on 2016-11-15
-
Actually create loaders cache file
- 53. By Paweł Stołowski on 2016-11-15
-
Remove mime plugin since it's now handled by post-process.mk.
Update gdk pixbuf loaders cache if snap gets upgraded. - 52. By Paweł Stołowski on 2016-11-15
-
Merged trunk
- 51. By Paweł Stołowski on 2016-11-14
-
Merged trunk.
- 50. By Paweł Stołowski on 2016-11-14
-
Generate mime data in usr/share/mime and initialize gdk-pixbuf loaders cache to make thumbnailer-service work in the snap.
- 49. By Paweł Stołowski on 2016-11-10
-
Added x-mime.

OK, I'm going to test this, but a couple quick comments:
- You might want to use post-process.mk instead of a custom plugin. Should be simpler overall and be consistent with existing post processing like gsettings schemas.
- To avoid polluting the stage directory, maybe copy ./stage/ usr/share/ mime to a working dir, run update- mime-database, then copy the result into the install dir and delete the working dir.
- Why do you set XDG_CACHE_HOME? HOME will be set to SNAP_USER_DATA already, so the default will be the same as the one you set. If you were just trying to be explicit (to avoid typing HOME/.cache elsewhere), at least use the correct value of HOME/.cache (since HOME will actually be different based on whether the wrapper script is running for a system daemon we install, like cgmanager, or a user command like unity8).