← Back to issue list

Duplicated /root/stage in path

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1989139
Type
issue
State
open
Author
~nteodosio
Labels
—
Created
Updated
Closed
—

Current evaluation

Reporter's snapcraft.yaml stages an Intel VA driver at /root/stage/root/stage because the part install step writes into an absolute /root/stage prefix inside CRAFT_PART_INSTALL; override-stage strip then fails. Untriaged, attachment unavailable.

Suggested action: needs triage

Reason: There is zero maintainer engagement — no labels, no assignee, and the single comment is the author's own follow-up from 2022-09-08 — and the 'attached snapcraft.yaml' is not retrievable, so it is still an uncategorised report. Code evidence points at project-side misuse rather than a Snapcraft bug: the same `find` shows the tree already exists inside the part install dir (`/root/parts/va-drivers/install/root/stage/usr/lib/dri/...`), i.e. the part's own install/Makefile prefixed a `/root/stage` DESTDIR into `$CRAFT_PART_INSTALL`, and SNAPCRAFT_STAGE is legitimately `/root/stage` (confirmed by tests/spread/*/project-variables/expected.txt: `SNAPCRAFT_STAGE = /root/stage`, set in snapcraft/parts/lifecycle.py:569). Additionally the failing `strip` used `$SNAPCRAFT_ARCH_TRIPLET/dri` while the driver actually lands in `/usr/lib/dri`, so the override script's assumption is wrong regardless. A maintainer should confirm with the yaml and likely close as a project error, but I lack the reproducer to justify closing it myself.

Evaluated by: mr-cal-bot

Impact: 18 Quick Win: 4 Complexity: 30 Confidence: 58 Actionability: 32

Issue body

I see a strange behavior in Snapcraft 7.1.3 when building the attached snapcraft.yaml. >>> Execution >>> $ snapcraft clean --use-lxd $ snapcraft prime --debug --shell-after --use-lxd ... Staging va-drivers + set -ex + snapcraftctl stage + strip /root/stage/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so strip: '/root/stage/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so': No such file Failed to run 'override-stage': Exit code was 1. snapcraft-chromium # find / -name 'iHD*.so' 2>/dev/null /root/project/squashfs-root/root/stage/usr/lib/dri/iHD_drv_video.so /root/stage/root/stage/usr/lib/dri/iHD_drv_video.so /root/parts/va-drivers/install/root/stage/usr/lib/dri/iHD_drv_video.so /root/parts/va-drivers/build/media_driver/iHD_drv_video.so <<< Execution <<< As far as I understand, either /root/stage/root/stage is a wrong place to stage that file, or "$SNAPCRAFT_STAGE" is wrong, since the error comes from strip "$SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri/iHD_drv_video.so"

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 18
Quick Win: 4
Complexity: 30
Confidence: 58
Actionability: 32
needs triage Reporter's snapcraft.yaml stages an Intel VA driver at /root/stage/root/stage because the part install step writes into an absolute /root/stage prefix inside CRAFT_PART_INSTALL; override-stage strip then fails. Untriaged, attachment unavailable.
stealth/space-bunny-alpha
Impact: 40
Quick Win: 8
Complexity: 58
Confidence: 72
Actionability: 50
needs triage Snapcraft 7.1.3 stages a VA driver under /root/stage/root/stage, causing override-stage strip to fail; the referenced snapcraft.yaml is unavailable, leaving the root cause untriaged.
stealth/space-bunny-alpha
Impact: 30
Quick Win: 8
Complexity: 42
Confidence: 78
Actionability: 48
needs triage Snapcraft 7.1.3 LXD build stages a driver under a nested install/root/stage, then override-stage cannot find it; the referenced YAML attachment is missing and the issue remains unassessed.
qwen3.6-35b-a3b-mtp-q6
Impact: 65
Quick Win: 36
Staleness: 95
Complexity: 45
Confidence: 40
Support Request: 25
close stale Bug report about duplicated /root/stage in Snapcraft 7.1.3 causing build failures. Issue is 4 years old with no maintainer interaction or labels.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 60
Confidence: 75
Support Request: 10
needs triage Snapcraft 7.1.3 exhibits a path duplication bug where staged files end up in /root/stage/root/stage, causing strip commands to fail. The report includes debug output and reproduction steps but remains unlabelled and unresponded to for nearly four years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 65
Confidence: 85
Support Request: 15
close stale Snapcraft 7.1.3 reports duplicated /root/stage paths during staging, causing strip failures. Unlabeled, zero comments, inactive for nearly 4 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 45
Confidence: 85
Support Request: 10
close stale Duplicated /root/stage path in Snapcraft 7.1.3 causing strip failure during prime stage. Unlabeled, no maintainer response, inactive for 1400 days.

Update history

Date Change
created

Related work

  • Related To: canonical/snapcraft#841 (confidence 30%)

    Merged commit 6cef6c0f9 (LP#1628915) replaced SNAPCRAFT_PART_INSTALL in part attributes to fix build-tool install-path expansion — same class of part install-path confusion, but not a fix for this report.

Related issues

Issue Project State Summary Similarity
#1995895 Cannot override stage snapcraft (launchpad) open Snapcraft 7.2.6 fails when override-stage leaves /root/stage/bin missing; the reproducible crash has no labels, maintainer response, or recorded diagnosis.
74%