snapcraft doesn't validate plugs: values
Bug #1697468 reported by
Michael R Sweet
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I'm in the process of creating a snap for HTMLDOC via build.snapcraft.io. However, after successfully building the snap the bot was unable to publish it due to an error in my plugs: definition, which read:
plugs: [home x11]
Now, this was a simple typo (missing comma), but since snapcraft didn't catch it and the build bot was unable to report the cause of the publishing error, it took me a while to determine what was wrong and correct the situation.
A simple fix here might be to check that the strings do not contain whitespace, and if so log that as an error with a recommendation to add commas to delimit the interfaces.
To post a comment you must log in.
Hello Michael!
Thanks for the report. We have a similar situation in bug #1617302. If we fix that one, snapcraft will note that 'home x11' is not a valid interface, and return an error.
However, you bring up an interesting topic. Checking for existing interfaces is complicated as explained in the other bug, so at least to start we could check that the names follow the same regular expression of valid interface names. This needs more discussion, but it's clear that we can do better.