← Back to issue list

Adding a scriptlet doesn't mark a part as dirty

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1672407
Type
issue
State
closed
Author
~didrocks
Labels
amd64 apport-bug bitesize xenial
Created
Updated
Closed

Current evaluation

Adding/changing a prepare/build/install scriptlet left the part's build state unchanged, so the part wasn't marked dirty and its steps were skipped. Fixed by merged PR snapcore/snapcraft#1618 (commit 4355d3ac1, 'states: add scriptlets to build state'), released in snapcraft 2.35.

Resolution: closed resolved

Reason: Maintainer ~kyrofa pointed to snapcore/snapcraft#1618, which was merged as commit 4355d3ac1 and added prepare/build/install scriptlets to the build state so edits to them dirty the part and force cleaning. The change shipped in the 2.35 release changelog commit (050b767ec).

Evaluated by: mr-cal-bot

No scores available.

Issue body

1. Take any snapcraft.yaml with one part, like "qt-app" 2. Run snapcraft prime 3. Add an "install: mkdir -p $SNAPCRAFT_PART_INSTALL/foo" line to your part 4. run snapcraft prime you will see: Skipping pull qt-app (already ran) Skipping build qt-app (already ran) Skipping stage qt-app (already ran) Skipping prime qt-app (already ran) -> Your part didn't rebuild, there isn't a "foo" directory in prime/ eitehr. What should happen: the qt-app part should be marked as dirty and forced cleaning. ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: snapcraft 2.27.1 [modified: usr/lib/python3/dist-packages/snapcraft/_baseplugin.py usr/lib/python3/dist-packages/snapcraft/plugins/python.py] ProcVersionSignature: Ubuntu 4.4.0-66.87-generic 4.4.44 Uname: Linux 4.4.0-66-generic x86_64 NonfreeKernelModules: zfs zunicode zcommon znvpair zavl ApportVersion: 2.20.1-0ubuntu2.5 Architecture: amd64 CurrentDesktop: Unity Date: Mon Mar 13 15:09:21 2017 InstallationDate: Installed on 2012-05-28 (1750 days ago) InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425) PackageArchitecture: all SourcePackage: snapcraft UpgradeStatus: Upgraded to xenial on 2014-10-31 (864 days ago)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Adding/changing a prepare/build/install scriptlet left the part's build state unchanged, so the part wasn't marked dirty and its steps were skipped. Fixed by merged PR snapcore/snapcraft#1618 (commit 4355d3ac1, 'states: add scriptlets to build state'), released in snapcraft 2.35.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR canonical/snapcraft#1618 (commit 4355d3ac1), which tracked prepare, build, and install scriptlets in the build state so changes mark a part dirty.
stealth/space-bunny-alpha — closed stale The scriptlet dirty-state bug report was closed without a verifiable fix or maintainer explanation; zero comments and 3,233 days of inactivity indicate a stale closure.
qwen/qwen3.6-35b-a3b — — Abandoned. Adding a scriptlet fails to mark a part as dirty, skipping rebuilds. Issue closed without resolution.
qwen/qwen3.6-35b-a3b — — Closed without resolution. Snapcraft fails to mark parts as dirty when scriptlets are added, causing skipped rebuilds. No fix was implemented.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft#1618 (confidence 97%)

    Merged PR 'states: add scriptlets to build state' (commit 4355d3ac1), referenced directly by the closing maintainer comment.

  • Related To: snapcraft#1220 (confidence 55%)

    Release changelog for 2.28; the fix followed shortly after in the 2.35 changelog (commit 050b767ec).

Related issues

Issue Project State Summary Similarity
#1618 states: add scriptlets to build state snapcraft merged Merged PR #1618 (commit 4355d3ac1) adds prepare/build/install scriptlets to the build state so changing them marks the part dirty, fixing LP bug #1672407.
76%