Bug 790279 - Gnome-disk-utility shows snap squashfs
Gnome-disk-utility shows snap squashfs
Status: NEW
Product: gnome-disk-utility
Classification: Core
Component: Disks UI
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-disk-utility-maint
gnome-disk-utility-maint
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2017-11-13 08:33 UTC by Andrea Azzarone
Modified: 2017-11-30 09:09 UTC (History)
3 users (show)

See Also:
GNOME target: ---
GNOME version: ---


Attachments
[gdudevicetreemodel] Skip devices with HintIgnore equals to True. (918 bytes, patch)
2017-11-13 09:39 UTC, Andrea Azzarone
reviewed Details | Diff | Review
Hide devices if mounted with x-gdu.hide (2.22 KB, patch)
2017-11-24 12:47 UTC, Andrea Azzarone
none Details | Diff | Review

Description Andrea Azzarone 2017-11-13 08:33:13 UTC
gnome-disk-utility shows snap squashfs mounted under /snap. One possible way to workaround this would be to add an udev rule to mark these devices as ignored and to patch gnome-disk-utility to ignore a device if 'udisks_block_get_hint_ignore (block)' returns True.
Comment 1 Andrea Azzarone 2017-11-13 09:39:57 UTC
Created attachment 363488 [details] [review]
[gdudevicetreemodel] Skip devices with HintIgnore equals to True.
Comment 2 Kai Lüke 2017-11-13 09:49:25 UTC
Review of attachment 363488 [details] [review]:

Thanks, looks good.

I am not familiar with the snap format and its requirements but I just wonder if a dconf setting should be added to make them visible again for debugging? Can it happen that stale mounts are left over from snap applications?
Comment 3 Kai Lüke 2017-11-13 10:04:39 UTC
Comment on attachment 363488 [details] [review]
[gdudevicetreemodel] Skip devices with HintIgnore equals to True.

Maybe we first need the dconf toggle and have it off by default to not break installations. The current usage of UDisksIgnore applies to some partitions which I would expect GNOME Disks to show: https://github.com/storaged-project/udisks/blob/master/data/80-udisks2.rules

Or we need a way in the UI to expand to the full list if needed…
Comment 4 Kai Lüke 2017-11-13 10:13:30 UTC
A solution just targeting snaps would maybe be the better to avoid the overloaded ignore option (only hide in nautilus vs hiding everywhere).
Comment 5 Andrea Azzarone 2017-11-24 12:47:01 UTC
Created attachment 364324 [details] [review]
Hide devices if mounted with x-gdu.hide

Check inside should_include_block if a block has been mounted with
the x-gdu.hide option. This allows to hide e.g. snap squashfs from
gnome-disk-utility.
Comment 6 Kai Lüke 2017-11-30 09:09:50 UTC
Comment on attachment 363488 [details] [review]
[gdudevicetreemodel] Skip devices with HintIgnore equals to True.

Thanks for the new direction in UDisks with runtime information. Let's see when the API lands how to go with this - I think there must be an explicit meson option because of requiring a higher UDisks version.

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