You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: skip pax global headers when extracting tarballs (#650)
`archive/tar` returns a pax global header (typeflag `g`) as an ordinary
entry. `extractPackageTarball` had no case for it, so the entry fell
through to the regular-file branch and was written out as
`pax_global_header` with the header's mode.
GitHub release tarballs carry one of these. For polykite 0.167.0
(squareup/hermit-packages) it lands as
`pkg/polykite-0.167.0/pax_global_header` with mode `----------`.
Anything that later reads the whole Hermit cache then fails. In our case
a `tar -cpf - -C ~/.cache/hermit -- environments metadata pkg` cache
save exits 2 with `Cannot open: Permission denied`, so the cache is
never written.
This change skips `tar.TypeXGlobalHeader` entries.
`TestExtractPackageTarballSkipsPaxGlobalHeader` fails without the change
("pax global header was extracted as a file") and passes with it.
Packages that are already installed keep the stray file until they're
reinstalled.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>