canonical / open-documentation-academy

Learn open-source software documentation skills with Canonical
https://canonical.com/documentation
Apache License 2.0
48 stars 28 forks source link

Snapcraft: Create a snap tutorial improvements #88

Open degville opened 3 weeks ago

degville commented 3 weeks ago

The Create a snap tutorial has a few shortcomings, and could do with a proof read and update.

In particular, @activus-d identified the following issues:

First, in the "Install the snap in developer mode" section, there's no direct instruction to exit the Build environment's shell before rebuilding the snap. I believe directly instructing the users to exit the shell is important because the succeeding command, snapcraft, can successfully run within the shell.

Second, I find it hard to understand the sentence "Using the location of the binary, and to permit access, it needs to be declared within an app: section of the snapcraft.yaml:" in the "Create an app section" section. Perhaps making the sentence more direct can be helpful.

Third, in the "Missing dependencies" section, it may be helpful to have the whole parts section of the snapcraft.yaml file within the code block, similar to apps in "System access" section:

parts: my-part:

See 'snapcraft plugins'

plugin: python
source-type: git
source: https://github.com/liquidctl/liquidctl
stage-packages:
   - python3-usb

Finally, I followed the instructions in the "Missing dependencies" section and inserted a USB device. However, I did not get any output indicating that the snap can now detect the USB device.

This tutorial has been moved into this repository for the convenience of any potential work: https://github.com/canonical/open-documentation-academy/blob/main/snapcraft/tutorials/create-a-new-snap.md

degville commented 3 weeks ago

This issue was proposed by @activus-d, who may want to work on this initially.

activus-d commented 3 weeks ago

This issue was proposed by @activus-d, who may want to work on this initially.

Thanks you @degville. I'll work on this.