← Back to issue list

poor naming conventions for scripts prepare and install

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1744822
Type
issue
State
open
Author
~bsutton
Labels
Created
Updated
Closed

Current evaluation

Suggestion to rename snapcraft plugin scripts 'prepare' and 'install' to 'pre-build' and 'post-build' for clarity. Unlabeled, zero comments, inactive ~8.6 years; the plugin scriptlets were later removed in favor of the override-<step> model.

Suggested action: close stale

Reason: The issue is inactive for ~8.6 years (3143 days, 0 comments, no labels) and the specific plugin scriptlets it targets — 'prepare' and 'install' — were removed in commit c6542b5f7 (#2327), replaced by the override-<step> lifecycle model now documented in docs/explanation/parts-lifecycle.rst. The naming complaint no longer applies to the current architecture.

Impact: 15 Quick Win: 8.25 Staleness: 95 Complexity: 45 Confidence: 85 Support Request: 20

Issue body

As a newbie to snapcraft and with still fairly sparse documentation and resources, I've found it fairly hard to build a snapcraft.yaml from scratch. Some of the naming conventions haven't really helped as they are not particularly evocative of the intent. In particular the plugin script 'install' seems to be rather badly named. On looking at existing plugins I assumed that the install script was executed at the point in time that the snap was installed. I now find that it is in fact called just after the build phase. The doco does clear this point up but a good design should make intent clear. From an outsiders perspective the name 'install' makes no sense. The 'prepare' keyword is better, but hardly evocative. Exactly what is it preparing me for? I'm also a great advocate of symmetry when developing. The above problems and applying the law of symmetry suggests two obvious name changes 1) prepare - pre-build 2) install - post-build By deprecating prepare and install and replacing them with 'pre-build' and 'post-build' we get two evocative names that clearly indicate their intent and we will save a lot of developers some pain and suffering from now to the end of time. Regards, Brett

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 15
Quick Win: 8.25
Staleness: 95
Complexity: 45
Confidence: 85
Support Request: 20
close stale Suggestion to rename snapcraft plugin scripts 'prepare' and 'install' to 'pre-build' and 'post-build' for clarity. Unlabeled, zero comments, inactive ~8.6 years; the plugin scriptlets were later removed in favor of the override-<step> model.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 10
close stale Suggests renaming snapcraft's prepare and install scripts to pre-build and post-build for clarity. Unlabeled, zero comments, inactive for over 8 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 85
Support Request: 10
close stale Suggests renaming snapcraft's 'prepare' and 'install' scripts to 'pre-build' and 'post-build' for clarity. Unlabelled, zero comments, inactive for over 8 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 20
close stale Suggests renaming snapcraft prepare and install scripts to pre-build and post-build for clarity. Untriaged, zero maintainer engagement, inactive for over 8 years.
qwen3.6-35b-moe-q4
Staleness: 98
Complexity: 15
Confidence: 85
Support Request: 10
close stale Suggests renaming snapcraft prepare and install scripts to pre-build and post-build for clarity. Unlabeled, no maintainer response, inactive for over 8 years.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#2327 (confidence 80%)

    Commit c6542b5f7 'pluginhandler: remove prepare, build and install scriptlets' removed the exact plugin scriptlets the issue complains about, making the rename moot.

Related issues

Issue Project State Summary Similarity
#1663583 'prepare' and 'install' stanza are missing documentation snapcraft (launchpad) open Missing docs for 'prepare:' and 'install:' part stanzas in snapcraft. Open since 2016 with zero interaction; these stanzas belonged to the old snapcraft 1.x parts system, completely rewritten in 2.x.
72%
#1595964 pull, build and other commands should be idemnpotent snapcraft (launchpad) open Old snapcraft 1.x plugin system issue: build() erases and redeployed build directory, breaking plugin subclass hooks. 10+ years old, zero comments, lifecycle label, plugin system since redesigned in craft-parts.
70%