Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
many: add magic /snap/README file #4210
Conversation
zyga
added some commits
Nov 13, 2017
niemeyer
approved these changes
Nov 13, 2017
Looks reasonable. How about this for the wording:
| +files inside may seem large almost no space is consumed here. The actual space | ||
| +is used by heavily-compressed .snap files stored in /var/lib/snapd/snap | ||
| + | ||
| +For more information please visit: https://forum.snapcraft.io/t/the-snap-directory/ |
niemeyer
Nov 13, 2017
Contributor
How about something like this:
This directory presents installed snap packages.
It has the following structure:
/snap/bin - Symlinks to snap applications.
/snap/<snapname>/<revision> - Mountpoint for snap content.
/snap/<snapname>/current - Symlink to current revision, if enabled.
DISK SPACE USAGE
The disk space consumed by the content under this directory is
minimal as the real snap content never leaves the .snap file.
Snaps are *mounted* rather than unpacked.
For further details please visit
https://forum.snapcraft.io/t/the-snap-directory/<topic id>
Then, let's please have a topic so that we can include the topic ID in the link as well, so that if it ever moves or gets renamed the link continues to work.
zyga
Nov 13, 2017
Contributor
The topic is already live: https://forum.snapcraft.io/t/the-snap-directory/2817 (the link I used was real :-)
codecov-io
commented
Nov 13, 2017
•
Codecov Report
@@ Coverage Diff @@
## master #4210 +/- ##
==========================================
- Coverage 75.83% 75.83% -0.01%
==========================================
Files 439 440 +1
Lines 38176 38190 +14
==========================================
+ Hits 28952 28962 +10
- Misses 7214 7217 +3
- Partials 2010 2011 +1
Continue to review full report at Codecov.
|
zyga
added some commits
Nov 13, 2017
|
On the one hand I like this. On the other, and I'm not sure how bikesheddy this is, this is very sysadmin-unfriendly: not only are we overwriting any change a sysadmin does to the file (think: translating, adding local notes), we're also not saying so; the file also appears out of thin air. So, first, if the sysadmin isn't supposed to edit the file, at least make it 0444 (most editors will then warn). Ideally also use I'd be happier if the file existed somewhere on disk and what we did was symlink or copy it here, instead of holding it in memory, but I can see how that's harder to do. I think shipping it translated is a bit of a lost cause; unless each user sees it in their preferred locale it's not a net win (and plenty of system-level files are already single-locale and usually English-only, so it's not like we're breaking new anti-l10n ground here). |
Conan-Kudo
suggested changes
Nov 14, 2017
Manual-like readme files should be fully explanatory (i.e. like a man page) and not require someone to go to a website.
Secondly, the path should be dynamically filled in based on what the expected SNAP_MOUNT_DIR will be. It's certainly not /snap in Fedora and Arch, for example.
|
@zyga Making it |
|
@Conan-Kudo I fixed that, thank you for noticing! |
| -/snap/<snapname>/<revision> - Mountpoint for snap content. | ||
| -/snap/<snapname>/current - Symlink to current revision, if enabled. | ||
| +@SNAP_MOUNT_DIR@/bin - Symlinks to snap applications. | ||
| +@SNAP_MOUNT_DIR@/<snapname>/<revision>- Mountpoint for snap content. |
zyga commentedNov 13, 2017
This branch makes snapd manage and maintain a
$SNAP_MOUNT_DIR/READMEfile(typically
/snap/README) with helpful text about the purpose of thatdirectory.
The text should be internationalized (a few common variants should be added).
In addition there is a link to the snapcraft forum with a thread containing
extended documentation.