Look at this:
Code:
s-name="SnapNameHere"
s-version=$(snap list | grep 's-name' | awk '{print $3}')
ls -lah /var/lib/snapd/snaps/$s-name_$s-version.snap
sudo systemctl stop "snap-$s-name-$s-name.mount".
sudo /usr/lib/snapd/snap-discard-ns $s-name
mkdir /tmp/modifying-snap-dir && cd /tmp/modifying-snap-dir
sudo chmod o+r '/var/lib/snapd/snaps/$s-name_$s-version.snap'
unsquashfs -d snap '/var/lib/snapd/snaps/$s-name_$s-version.snap'
## Do your modifications! All the Snap's files will be located in the directory you created.
sudo rm -f '/var/lib/snapd/snaps/$s-name_$s-version.snap'
sudo mksquashfs snap '/var/lib/snapd/snaps/$s-name_$s-version.snap' -noappend -comp lzo -no-fragments.
sudo systemctl start "snap-$s-name-@s-version.mount".
rmdir /tmp/modifying-snap-dir
But... every 2 weeks or so, the FireFox Snap get's updated and triggers an update. When the update downloads and installs, it gets installed to a new directory, with the version changed in that path, and a symlink gets changed poining to it, then it copies the old data, ito the persistent storage of the new Snap.
So every two weeks, if you wanted that change, you would have to redo all that work again. It doesn't make sense to me for somethng that gets updated that often.
When a Snap extracts and mounts, it goes to a loop device. That loop device is in memory, not actual disk space. A Snap application includes all dependencies it needs for itself... Which means that some things are going to be there, duplicated. This has been brought up as seeming to be "something"... But Canonical seems to think that that the many advantages outweigh a few things that don't seem to... Well. That's the way it is right now.
Bookmarks