← Back to issue list

snapcraft fails when two parts have the same file in the stage keyword

View original Launchpad issue

Metadata

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

Current evaluation

Closed as stale in August 2026 after nearly nine years without a fix; the discussion provided no confirmed workaround.

Resolution: closed stale

Reason: Maintainer ~mr-cal closed the report as stale on 2026-08-14. No resolving PR, commit, or verified documentation change was identified.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When two parts have the same stage entry, like this: parts: part1: # See 'snapcraft plugins' plugin: dump stage: [test] part2: plugin: dump stage: [test] Running snapcraft will fail in the stage step like this: Preparing to pull part2 Pulling part2 Preparing to pull part1 Pulling part1 Preparing to build part2 Building part2 Preparing to build part1 Building part1 [Errno 2] No such file or directory: '/root/parts/part1/install/test' The problem is that in lifecycle.py we have this: for step in common.COMMAND_ORDER[0:step_index]: if step == 'stage': pluginhandler.check_for_collisions(self.config.all_parts) It means that it will check for collisions even on parts that haven't been staged.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed stale Closed as stale in August 2026 after nearly nine years without a fix; the discussion provided no confirmed workaround.
stealth/space-bunny-alpha — closed resolved Collision checks were fixed by merged PR #1405 (dbdc4b5a6); the old report was later closed as stale.
stealth/space-bunny-alpha — closed resolved Fixed by PR #1405 (commit dbdc4b5a6), which restricted collision checks to existing files so unbuilt parts do not cause staging to fail.
qwen/qwen3.6-35b-a3b — — Closed. Resolved by deferring collision checks until after parts finish staging, preventing the FileNotFoundError when multiple parts specify identical stage files.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 45
Confidence: 85
Support Request: 10
close stale snapcraft crashes during staging when multiple parts include the same file, pointing to premature collision checks in lifecycle.py. Unlabelled, zero comments, inactive for nearly 9 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 35
Confidence: 90
Support Request: 10
close stale Snapcraft crashes during the stage step when multiple parts stage the same file, due to premature collision checking in lifecycle.py. Issue is over 9 years old with no maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 30
Confidence: 85
Support Request: 5
close stale Bug report detailing a snapcraft crash when multiple parts stage identical files. Points to premature collision checks in lifecycle.py. Unaddressed for over 9 years with zero maintainer interaction.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#1548376 docs/snapcraft-syntax.md should explicitly name the conditions under which a file is expected to end up in stage/ and snap/ snapcraft (launchpad) closed Closed as stale by the Stale bot on 2017-05-19 after 60 days without activity; no fixing PR or commit was identified.
75%
#1498140 snapcraft run should only run from the project directory snapcraft (launchpad) closed Closed without a documented resolution or linked implementation after four days of activity.
74%
#1597711 snapcraft: self.run() is inconsistent in providing snapcraft (launchpad) closed Closed as expired/stale on 20 February 2017 after 60 days without activity; no fix, documentation update, or superseding change was recorded.
73%
#4300 snapcraft fails for python projects if there is no setup.py snapcraft closed Closed as stale in April 2025 without a Snapcraft fix. The reproducer declared bin/cos-alerter, but its packaging metadata did not define a console script; no resolving PR or commit was linked.
72%
#1734231 SnapcraftEnvironmentError is too generic snapcraft (launchpad) closed Closed as stale after 3,235 days without an implementation; maintainer ~mr-cal closed it on 2026-08-14 with no linked fix.
72%
#1988858 snapcraft trying to install extra package causing conflict snapcraft (launchpad) closed Expired and closed without a fix after 60 days of inactivity; maintainers could not reproduce the conflict and suspected a transient archive state.
72%
#1541620 snapcraft can't find modules installed under 'stage' dir snapcraft (launchpad) closed Closed as invalid after maintainers could not reproduce the problem across repeated clean builds; separate pkg-config support for build-packages was mentioned.
72%
#1557018 Access from the build system to $SNAPCRAFT_STAGE directory when after: keyword is used in parts snapcraft (launchpad) closed Closed as stale on 2016-05-29 after 60 days without activity; no resolving PR or commit was recorded. SNAPCRAFT_STAGE was later exported globally in #757.
70%