Skip to content

feat(extensions): support filtering by base - #6214

Open
gcomneno wants to merge 1 commit into
canonical:mainfrom
gcomneno:contrib/issue-4360-extensions-base-option
Open

feat(extensions): support filtering by base#6214
gcomneno wants to merge 1 commit into
canonical:mainfrom
gcomneno:contrib/issue-4360-extensions-base-option

Conversation

@gcomneno

Copy link
Copy Markdown
Contributor

Fixes #4360.

This adds a --base option to snapcraft extensions, matching the existing snapcraft plugins --base behaviour.

With this change, users can list only the extensions supported by a specific base, for example:

snapcraft extensions --base core24

Changes:

  • add --base to the extensions command
  • filter listed extensions by supported base when provided
  • reject unsupported and maintenance bases
  • add unit coverage for base filtering and errors

Validation:

  • pytest -q tests/unit/commands/test_list_extensions.py -rs
  • ruff check snapcraft/commands/extensions.py tests/unit/commands/test_list_extensions.py

@gcomneno
gcomneno requested review from bepri and mr-cal as code owners April 25, 2026 10:16
@gcomneno

Copy link
Copy Markdown
Contributor Author

The remaining failures look unrelated to this PR. The Spread failure is in tests/spread/core24/try, while this PR only adds a --base option to snapcraft extensions and updates unit tests. QA/lint and the targeted unit tests are passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "--base=core2x"" option to "snapcraft extensions"

1 participant