mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 23:05:42 +00:00
Bug 1442419 - Fix failure to open files after downloading with snap r=jlorenzo
This fix does several things: * Removes the mime cache generated by the desktop-gtk3 remote part * Installs a stub shared-mime-info database * Set default association for all types to use xdg-open Note: There is still work[1] to be completed in snapd, adding OpenFile support to xdg-open. Landing this is harmless though, it will fail silently just as it does today but will start working when the snapd feature lands. 1. https://github.com/snapcore/snapd/pull/4766 opening requested files, MozReview-Commit-ID: 1eeOLeVN8xQ --HG-- extra : rebase_source : e948bafc583f91177530ce00ec26c69619a7f8f9
This commit is contained in:
parent
111625afbc
commit
ca87e2403a
7
taskcluster/docker/firefox-snap/mime-handler.xml
Normal file
7
taskcluster/docker/firefox-snap/mime-handler.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<mime-info
|
||||
xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/octet-stream">
|
||||
<comment>Unknown</comment>
|
||||
<glob pattern="*"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
4
taskcluster/docker/firefox-snap/mimeapps.list
Normal file
4
taskcluster/docker/firefox-snap/mimeapps.list
Normal file
@ -0,0 +1,4 @@
|
||||
[Default Applications]
|
||||
application/octet-stream=xdg-open.desktop
|
||||
text/plain=xdg-open.desktop
|
||||
inode/directory=xdg-open.desktop
|
@ -36,6 +36,10 @@ plugs:
|
||||
allow-sandbox: true
|
||||
|
||||
parts:
|
||||
desktop-gtk3:
|
||||
prime:
|
||||
- -usr/share/mime
|
||||
|
||||
firefox:
|
||||
plugin: dump
|
||||
source: source
|
||||
@ -52,11 +56,30 @@ parts:
|
||||
- ffmpeg
|
||||
after: [desktop-gtk3]
|
||||
|
||||
optimization:
|
||||
xdg-open:
|
||||
after: [firefox]
|
||||
plugin: nil
|
||||
stage-packages:
|
||||
- shared-mime-info
|
||||
source: .
|
||||
install: |
|
||||
set -eux
|
||||
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/applications
|
||||
install -m 644 mimeapps.list $SNAPCRAFT_PART_INSTALL/usr/share/applications
|
||||
update-desktop-database -v $SNAPCRAFT_PART_INSTALL/usr/share/applications
|
||||
build-packages:
|
||||
- desktop-file-utils
|
||||
build-attributes: [no-system-libraries]
|
||||
|
||||
shared-mime-info:
|
||||
after: [xdg-open]
|
||||
plugin: nil
|
||||
source: .
|
||||
build-packages:
|
||||
- shared-mime-info
|
||||
build-attributes: [no-system-libraries]
|
||||
install: |
|
||||
set -eux
|
||||
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/mime/packages
|
||||
install -m 644 mime-handler.xml $SNAPCRAFT_PART_INSTALL/usr/share/mime/packages
|
||||
update-mime-database $SNAPCRAFT_PART_INSTALL/usr/share/mime
|
||||
stage:
|
||||
- usr/share/mime
|
||||
|
Loading…
Reference in New Issue
Block a user