← Back to issue list

Build "part" action forces clean build

View original Github issue

Metadata

Project
snapcraft
Number
#4806
Type
issue
State
closed
Author
kubiko
Labels
Created
Updated
Closed

Current evaluation

Resolved via craft-parts pull request 727. The snapcraft build part command now correctly performs incremental builds rather than forcing clean builds. Issue closed.

Suggested action:

No scores available.

Issue body

### Bug Description When calling `snapcraft build <part>` incremental build steps are expected to be performed on the part Instead part is cleaned and build again ### To Reproduce call: `snapcraft build <part>` ### Environment Snapcraft 8.x ### snapcraft.yaml ```shell name: test-build summary: Test description: | ta version: 1 base: core24 platforms: arm64: build-on: [amd64, arm64] build-for: arm64 confinement: strict grade: stable parts: optee-client: plugin: make source: https://github.com/OP-TEE/optee_client.git source-type: git source-tag: 3.19.0 source-depth: 1 make-parameters: - ARCH="arm64" - DEBUG=0 - CROSS_COMPILE="${CRAFT_ARCH_TRIPLET_BUILD_FOR}-" - CFG_TEE_CLIENT_LOAD_PATH="/" - CFG_TA_TEST_PATH=n - CFG_TEE_SUPP_LOG_LEVEL=0 - SBINDIR=/usr/sbin - LIBDIR=/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR} ``` ### Relevant log output ```shell Initialising lifecycle Installing build-packages Installing build-snaps Skipping pull for optee-client (already ran) Rebuilding optee-client (requested step) ... ``` ### Additional context Even the comment states clearly "rebuilding" I assume there should be dedicated lifecycle action for rebuild and `build` should do just incremental build

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 Resolved via craft-parts pull request 727. The snapcraft build part command now correctly performs incremental builds rather than forcing clean builds. Issue closed.
qwen/qwen3.8-27b
Impact: 50
Quick Win: 30.0
Staleness: 72
Complexity: 40
Confidence: 82
Support Request: 10
close stale snapcraft build <part> forces a clean rebuild instead of incremental build. Maintainer linked craft-parts PR #727 as the fix, which was merged into craft-parts and is included in current snapcraft (craft-parts 2.32.0). Issue remains open but the underlying bug is resolved upstream.
qwen/qwen3.6-35b-a3b
Staleness: 75
Complexity: 40
Confidence: 85
Support Request: 20
keep open snapcraft build <part> forces clean build instead of incremental. Issue created ~2 years ago, last activity 1.3 years ago. Linked to internal ticket and PR #727.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 55
Confidence: 40
Support Request: 20
needs triage snapcraft build <part> forces a clean rebuild instead of incremental. Unlabelled and unassigned, last active over a year ago, with a maintainer linking a related craft-parts PR.
qwen3.6-35b-a3b-mtp-q6
Staleness: 80
Complexity: 40
Confidence: 70
Support Request: 30
close stale snapcraft build <part> incorrectly forces a clean build instead of performing incremental updates. Tracked via craft-parts PR #727 and awaiting review.

Update history

Date Change
closed

Related issues

Issue Project State Summary Similarity
#3680 commands, parts: add clean command snapcraft merged Added a clean command to remove parts and their build instances when no parts are specified, excluding destructive or managed modes. Merged after approval, passing CI, and rebasing onto snapcraft/7.0.
76%
#2442 cli: enable cleaning of parts snapcraft merged Merged PR restoring snapcraft clean <part-name> functionality for build providers. Reviewers noted edge cases with dependent parts and suggested future improvements for VM-level cleanup, but the feature was successfully integrated.
75%
#1897337 snapcraft build <part> ignores the part snapcraft (launchpad) closed The snapcraft build command ignoring specified parts was closed without a fix or resolution. No comments or patches were provided, indicating the report was abandoned without addressing the filtering behavior.
73%
#1719951 SNAPCRAFT_PARTS_URI doesn't work with cleanbuild snapcraft (launchpad) closed Abandoned and closed without resolution due to inactivity. The report details a snapcraft cleanbuild failure where SNAPCRAFT_PARTS_URI fails to resolve remote parts, triggering a subprocess error. No fix was implemented.
71%
#1537790 lifecycle: rebuild with snapcraft clean part1; snapcraft build part1 breaks if part1 has an 'after' field snapcraft (launchpad) closed Closed without resolution or comments, likely abandoned. The lifecycle bug causing unsatisfied dependency errors after cleaning a specific part remains unaddressed.
71%