← Back to issue list

post-stop-command not wrapped

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1683422
Type
issue
State
open
Author
~mabnhdev
Labels
post-stop-command
Created
Updated
Closed
—

Current evaluation

Reported $SNAP install failure appears resolved: Snapcraft 8.5.1 (#4999) now accepts $ in post-stop-command, though the field is still emitted verbatim.

Suggested action: close resolved

Reason: Snapcraft 8.5.1's release notes cite #4999 for improved validation of app command fields, including post-stop-command. The current App validator explicitly permits $ in post_stop_command using the snapd-derived legal lexicon, so the reported installation rejection is resolved even though the field remains verbatim.

Evaluated by: mr-cal-bot

Impact: 30 Quick Win: 22 Complexity: 18 Confidence: 87 Actionability: 88

Issue body

The post-stop-command is not wrapped, so not snappy variable substitution is possible. The post-stop-command is copied verbatim into the meta/snap.yaml file with insufficient syntax checking. If a variable is included it causes snap installation failure with the errror: error: cannot read snap file: app description field 'post-stop-command' contains illegal "/bin/ls $SNAP/etc" (legal: '^[A-Za-z0-9/. _#:-]*$') To reproduce: git clone http://github.com/mabnhdev/snappy-daemon-demo -b poststop cd snappy-daemon-demo snapcraft sudo snap try

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 30
Quick Win: 22
Complexity: 18
Confidence: 87
Actionability: 88
close resolved Reported $SNAP install failure appears resolved: Snapcraft 8.5.1 (#4999) now accepts $ in post-stop-command, though the field is still emitted verbatim.
qwen/qwen3.6-35b-a3b
Impact: 40
Quick Win: 19
Complexity: 40
Confidence: 80
Actionability: 80
keep open post-stop-command lacks wrapping for variable substitution, causing validation errors when using $SNAP.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 21
Staleness: 85
Complexity: 40
Confidence: 55
Support Request: 10
needs triage 2015 bug report: snapcraft copies post-stop-command verbatim into snap.yaml without shell wrapping, so $SNAP-style variables fail snapd's field regex and break snap install. No comments, no labels, no maintainer response; untriaged and unverified against current code.
qwen/qwen3.6-35b-a3b
Staleness: 99
Complexity: 20
Confidence: 85
Support Request: 0
close stale Improper handling of post-stop-command variables in snapcraft.yaml causes installation failures. The report is over nine years old with zero maintainer engagement.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 40
Confidence: 85
Support Request: 10
close stale Report that post-stop-command lacks variable substitution and fails snap validation. Unacknowledged for ~9 years with no maintainer interaction.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 45
Confidence: 85
Support Request: 10
close stale Bug report stating post-stop-command lacks variable substitution and fails snapcraft validation. No maintainer activity for over 9 years.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft#4999 (confidence 88%)

    The 8.5.1 release notes attribute improved validation of app command fields, including post-stop-command, to #4999.

Related issues

Issue Project State Summary Similarity
#1662240 post-stop-command not defined in snapcraft schema snapcraft (launchpad) closed Added app-level post-stop-command support via merged snapcraft PR #1109 (commit 392a310f2); field now exists in schema/snapcraft.json and is emitted in snap.yaml apps metadata, and the Launchpad bug was closed.
78%