Skip to content

fix: fall back to initial kernel release tarball - #33

Open
slegarraga wants to merge 1 commit into
heavycircle:mainfrom
slegarraga:fix/kernel-initial-release-fallback
Open

fix: fall back to initial kernel release tarball#33
slegarraga wants to merge 1 commit into
heavycircle:mainfrom
slegarraga:fix/kernel-initial-release-fallback

Conversation

@slegarraga

Copy link
Copy Markdown

Closes #25

Summary

Fixes kconfig kernel fetch X.Y.0 on a kernel's initial release.

kernel.org names an initial release linux-X.Y.tar.xz, with no trailing .0. The fetch command now tries the exact requested form first and falls back to the initial-release form when the first URL returns 404.

The fallback also normalizes the cached directory back to the requested version, so a later kconfig kernel fetch 6.8.0 sees the kernel as cached instead of downloading it again.

Tests

Added tests/test_kernel.py with:

  • initial-release URL list includes the fallback;
  • patch releases keep a single URL;
  • the fetch flow falls back to the initial-release tarball and normalizes the cache directory.

Verification

uv run ruff check kconfig/cli/kernel.py tests/test_kernel.py
uv run mypy kconfig/cli/kernel.py
uv run pytest tests/test_kernel.py -q --no-cov

All pass.

Signed off with DCO.

Signed-off-by: Sebastian Legarraga <64795732+slegarraga@users.noreply.github.com>
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.

kconfig kernel fetch X.Y.0 404s on a kernel's initial release

1 participant