← Back to issue list

Snapcraft does not evaluate project variables added by extensions in core24

View original Github issue

Metadata

Project
snapcraft
Number
#4771
Type
issue
State
closed
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged PR #4779 (commit 3e3428ec1), upgrading craft-application to 2.6.3 so extension-added project variables are evaluated in core24.

Resolution: closed resolved

Reason: PR #4779 was merged as commit 3e3428ec1, bumping craft-application to 2.6.3 and adding regression coverage for the BUILD_ON variable.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description If an extension adds a project variable, it is not evaluated. Raised by @soumyaDghosh on matrix: https://matrix.to/#/!GGqzbFAUQprdPgYYCM:ubuntu.com/$5CJQkAjgqbNn48zcF06HS8a0_0cjfogVCA_BDFi7XZE?via=ubuntu.com&via=matrix.org&via=kde.org ### To Reproduce Build the Nickvision core24 snap https://github.com/NickvisionApps/Application ### Environment n/a ### snapcraft.yaml ```shell https://github.com/soumyaDghosh/Application/blob/47f71c622b00323655cb87324345b8b7468b3aeb/snap/snapcraft.yaml ``` ### Relevant log output ```shell Packing... Reading snap metadata... Running linters... Cannot pack snap: error: cannot validate snap "application": layout "/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.0" uses invalid mount point: reference to unknown variable "$CRAFT_ARCH_TRIPLET_BUILD_FOR" Failed to execute snapcraft in instance. Full execution log: '/home/runner/.local/state/snapcraft/log/snapcraft-20240430-042619.516547.log' ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #4779 (commit 3e3428ec1), upgrading craft-application to 2.6.3 so extension-added project variables are evaluated in core24.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #4779 (commit 3e3428ec1), upgrading craft-application to 2.6.3 so extension-added project variables are evaluated.
qwen/qwen3.6-35b-a3b — — Snapcraft failed to evaluate project variables added by extensions in core24, causing build validation errors. Resolved and closed via pull request #4779.
qwen/qwen3.6-35b-a3b — — Snapcraft failed to evaluate project variables added by extensions in core24, causing build validation errors. Fixed and closed via pull request #4779.
qwen/qwen3.6-35b-a3b — — Snapcraft failed to evaluate extension-added project variables in core24, triggering layout validation errors. The bug was fixed and closed via pull request #4779.
qwen3.6-35b-a3b-mtp-q6 — — Snapcraft failed to evaluate project variables added by extensions in core24, causing layout validation errors. The bug was fixed via pull request #4779 and the issue is closed.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#4779 (confidence 100%)

    The merged dependency upgrade fixed variable evaluation for variables contributed by extensions.

Related issues

Issue Project State Summary Similarity
#4702 [craft-application/core24] $SNAPCRAFT_PROJECT_VERSION and other fields not replaced snapcraft closed Core24 project-variable replacement was fixed by merged PR #4757 (commit 27957515c). Remaining CRAFT_PROJECT_NAME and CRAFT_PROJECT_VERSION handling was tracked in craft-application#320.
73%
#4757 fix: set project variables for core24 snapcraft merged Merged #4757 as commit 27957515c, fixing core24 project-variable expansion and closing #4704/#4702; CRAFT_* setup was linked to canonical/craft-application#320.
72%