← Back to issue list

snapcraft build <part> ignores the part

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1897337
Type
issue
State
closed
Author
~kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

Selective part builds were restored by snapcore/snapcraft#3572, which passed named parts into lifecycle planning instead of building every defined part.

Resolution: closed resolved

Reason: snapcore/snapcraft#3572 changed lifecycle planning to use the requested part names, so snapcraft build part1 no longer builds unrelated parts. This directly resolved the regression affecting Snapcraft 4.3.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Using snapcraft v4.3: $ snapcraft build part1 <snip> Pulling part1 Pulling part2 Building part1 Building part2 I expect that to ONLY build "part1". Particularly given the help text: $ snapcraft build --help Usage: snapcraft build [OPTIONS] <part>...   Build artifacts defined for a part.   Examples:       snapcraft build       snapcraft build my-part1 my-part2 <snip>

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Selective part builds were restored by snapcore/snapcraft#3572, which passed named parts into lifecycle planning instead of building every defined part.
stealth/space-bunny-alpha — closed resolved Part names passed to `snapcraft build <part>` were dropped before reaching the build provider, so all parts were built. Fixed by merged PR snapcore/snapcraft#3572 (CRAFT-481), commit f0e722b17, which forwards part names to the managed Snapcraft.
stealth/space-bunny-alpha — closed resolved Fixed in canonical/snapcraft#3572 (CRAFT-481), merged as f0e722b17: lifecycle commands now forward selected part names to the managed Snapcraft process.
qwen3.6-35b-a3b-mtp-q6 — — 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.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 85
Support Request: 20
close stale snapcraft build <part> ignores the part and builds all parts instead of just the specified one. Issue is over 5 years old with no activity or maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 35
Confidence: 90
Support Request: 5
close stale Reports that snapcraft build part ignores the specified part and builds all parts instead. Unlabeled, no maintainer comments, and inactive for nearly five years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 20
Confidence: 90
Support Request: 5
close stale Reports snapcraft build <part> incorrectly builds all parts instead of just the specified one in v4.3. Unlabeled, no maintainer comments, inactive for nearly 5 years.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#3572 (confidence 97%)

    The linked PR implemented part-name filtering for build lifecycle execution.

Related issues

Issue Project State Summary Similarity
#4806 Build "part" action forces clean build snapcraft closed Fixed by merged craft-parts PR #727, which limits step reruns and cleaning to explicit requests, restoring incremental `snapcraft build <part>` behavior.
76%
#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.
75%
#1516775 snapcraft init with parts fails with required options snapcraft (launchpad) closed Legacy "snapcraft init <part>" support was removed in commit b0d15b0e9, pending redesign for the new CLI; the maintainer closed the report as intentional.
74%
#1815658 snapcraft leaks build-environment across parts snapcraft (launchpad) closed Fixed by snapcore/snapcraft PR #2472 (commit 8ca7dd7f2), preventing a part's build-environment from leaking into subsequently processed parts.
73%
#2008777 timeout if doing snapcraft pull and build seperately snapcraft (launchpad) closed Fixed by a craft-parts ignore-patterns correction included in Snapcraft 7.2.11 and 7.3.x; the reporter confirmed that Snapcraft 7.3 works.
72%
#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.
70%
#1646289 snapcraft doesn't include all part properties in state tracking snapcraft (launchpad) closed Fixed by merged PR snapcore/snapcraft#937 (commit 9212dac6d), adding all part properties, including stage-packages, to pull, build, stage, and prime state tracking.
70%