Build "part" action forces clean build
Metadata
Current evaluation
Fixed by merged craft-parts PR #727, which limits step reruns and cleaning to explicit requests, restoring incremental `snapcraft build <part>` behavior.
Resolution: closed resolved
Reason: The maintainer linked resolution to canonical/craft-parts#727, and its completion comment confirms the fix was completed there. The change restricts step reruns and cleaning to explicit requests.
Evaluated by: mr-cal-bot
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 |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged craft-parts PR #727, which limits step reruns and cleaning to explicit requests, restoring incremental `snapcraft build <part>` behavior. | |
| stealth/space-bunny-alpha | — | closed resolved | Resolved by merged craft-parts PR #727, which limits step reruns and cleaning to explicit requests, restoring incremental `snapcraft build <part>` behavior. | |
| 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
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. |
Update history
| Date | Change |
|---|---|
| closed |
Related work
-
Likely Fixed By:
canonical/craft-parts#727
(confidence 100%)
Merged upstream change addressing forced clean rebuilds of explicitly built parts.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2442 cli: enable cleaning of parts | snapcraft | merged | Merged #2442 (5546c3aab), restoring snapcraft clean <part-name> with build providers so selected parts can be cleaned without recreating the provider. | |
| #1897337 snapcraft build <part> ignores the part | snapcraft (launchpad) | closed | Selective part builds were restored by snapcore/snapcraft#3572, which passed named parts into lifecycle planning instead of building every defined part. | |
| #1774260 Automatically clean and redo step if part is specified | snapcraft (launchpad) | closed | Explicitly named parts now clean and rerun the requested lifecycle step instead of being skipped; fixed by merged PR canonical/snapcraft#2152 (9d1407a85). | |
| #1537786 lifecycle: allow do clean rebuild of all/parts without having to pull all again | snapcraft (launchpad) | closed | Added per-part, per-step clean commands via merged canonical/snapcraft PR #401 (88d21b180), allowing lifecycle rebuilds without recloning all sources. | |
| #56 "<appname> clean" doesn't remove the build instance | craft-application | closed | Fixed clean behavior: with no parts, craft-provider build instances are removed; part-specific cleans still run inside instances. Resolved by merged PR #88 (commit 2d2dd70e). | |
| #1779136 build provider support to clean parts | snapcraft (launchpad) | closed | Build-provider support for cleaning selected parts was restored by merged canonical/snapcraft PR #2442 (commit 5546c3aab), without deleting the provider. | |
| #132 build: pin craft-parts to keep organize from build | debcraft | merged | Merged PR #132 in commit 252ee71, pinning craft-parts so Debcraft retains organize-from-build behavior during a Craft Parts regression investigation. | |
| #1537790 lifecycle: rebuild with snapcraft clean part1; snapcraft build part1 breaks if part1 has an 'after' field | snapcraft (launchpad) | closed | Fixed by merged ubuntu-core/snapcraft PR #431 (commit 1e31959d1), which recognizes already-built prerequisite parts when building a selected part. | |
| #1995365 Add option to clean all parts | snapcraft (launchpad) | closed | Proposal for snapcraft clean --parts-only or --all-parts was declined; no option was added because snap injection and Squid apt caching address rebuild overhead. |