fix: remove dangerous install_file fallback + rename elfpatch -> patchelf#213
Merged
Sunrisepeak merged 1 commit intomainfrom Mar 16, 2026
Merged
Conversation
…helf installer.cppm: when no download artifact exists, do NOT set ctx.install_file to node.pkgFile (the package definition file). The install hook's os.mv() would move the definition out of the package index, destroying the index entry. This caused elfpatch.lua to be deleted from xim-pkgindex on every install. Also rename elfpatch -> patchelf in self install and e2e tests to match the upstream package rename in xim-pkgindex. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
installer.cppmline 881 setctx.install_file = node.pkgFilewhen no download artifact existed. The install hook'sos.mv(install_file, install_dir)would then move the package definition file out of the package index, destroying the index entry. This causedelfpatch.luato be deleted fromxim-pkgindexon everyxlings install xim:elfpatch(100% reproducible, confirmed via strace:rename("pkgs/e/elfpatch.lua", "xpkgs/xim-x-elfpatch/0.18.0"))elfpatch->patchelfin self install and e2e tests (matching upstream xim-pkgindex rename: d2learn/xim-pkgindex@dce83b7)Test plan
xlings install xim:patchelf@0.18.0 -y -g— should install without deleting pkgindex entryxlings self install— should reference patchelf, not elfpatchrelease_self_install_test.sh— patchelf path updated🤖 Generated with Claude Code