← Back to issue list

plugin handler: process elf files only if base is specified

View original Github issue

Metadata

Project
snapcraft
Number
#2926
Type
pull request
State
merged
Author
cjp256
Labels
Created
Updated
Closed

Current evaluation

Merged. Prevents ELF file processing when no base is specified, resolving snapd build failures without an explicit type. Approved by reviewers, passed CI, and unblocked downstream snapd development.

Suggested action:

No scores available.

Issue body

ELF files are always processed when `type: app`, where `app` is the default type. This causes an issue when snapd is building without specifying the type, as it gets treated as `type: app` and its files are processed like typical app snaps. The schema currently allows for this because it fails to set the default type `app` in time for validation. Since snapd does not have a base, check for the existence of the base before attempting to process ELF files. This will prevent the error reported in LP #1857019 and allow snapd to build without a type specified. Once snapd moves to `type: snapd`, we can fix the schema to ensure that the invalid configuration that led to this error does not pass verification. LP #1857019 LP #1862642 Signed-off-by: Chris Patterson <chris.patterson@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Prevents ELF file processing when no base is specified, resolving snapd build failures without an explicit type. Approved by reviewers, passed CI, and unblocked downstream snapd development.
qwen3.6-35b-a3b-mtp-q6 Merged. Updates the plugin handler to process ELF files only when a base is specified, preventing validation errors during snapd builds without an explicit type. Includes a spread test and unblocks snapd development.
qwen3.6-35b-a3b-mtp-q6 Merged. Updated the plugin handler to process ELF files only when a base is specified, resolving LP #1857019 and unblocking snapd builds without an explicit type. Includes spread tests.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2021 pluginhandler: only resort to elf mangling if the snap type is app snapcraft merged Merged a fix restricting ELF mangling to app-type snaps only. Approved, passed CI, and updated one file with 12 additions and 4 deletions.
77%
#2012 pluginhandler: only do elf checking and patching for type app snapcraft merged Merged changes restricting ELF checking and patching to app-type snaps, removing unnecessary libc6 ABI/API checks for other types. Resolves LP: #1757094. Approved and passed CI.
71%