← Back to issue list

meta: handle symlinked hooks (#2478)

View original Github issue

Metadata

Project
snapcraft
Number
#2481
Type
pull request
State
merged
Author
sergiusens
Labels
Created
Updated
Closed

Current evaluation

Merged a fix for a regression in symlinked hook handling that caused FileNotFoundErrors during permission changes. Approved by reviewer, passed CI, and updated 2 files to safely resolve symlinks before stat operations.

Suggested action:

No scores available.

Issue body

Handling of symlinked hooks broke with the introduction of #2440 which tries to change permissions of their file type which can lead to FileNotFoundErrors as the symlinked file may not be available at the time of the stat change. Signed-off-by: Sergio Schvezov <sergio.schvezov@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/)? - [ ] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [ ] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [ ] 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 a fix for a regression in symlinked hook handling that caused FileNotFoundErrors during permission changes. Approved by reviewer, passed CI, and updated 2 files to safely resolve symlinks before stat operations.
qwen3.6-35b-a3b-mtp-q6 Merged fix for symlinked hooks handling broken by PR #2440. Resolves FileNotFoundErrors during permission changes by resolving symlinks before stat operations. Achieved 100% diff coverage.
qwen3.6-35b-a3b-mtp-q6 Merged fix for symlinked hooks handling broken by #2440. Permission changes on symlinks caused FileNotFoundErrors. Updated logic resolves symlinks before stat operations, restoring stable hook management.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2478 meta: handle symlinked hooks snapcraft merged Merged PR #2478 resolves a regression from #2440 that broke symlinked hooks. The fix prevents FileNotFoundErrors during permission changes by properly resolving symlinks before stat operations. Approved, passed CI, and merged into master.
94%
#3497 repo: fix regression in fix_symlink() snapcraft merged Merged a fix for a regression in fix_symlink() where copied files retained stale symlinks. The update ensures symlinks correctly point to new files and adds spread tests for relative and host copy scenarios. Approved by two reviewers and passed CI.
74%
#2441 legacy/meta: make hooks executable instead of complaining they're not snapcraft merged Merged cherry-pick of #2440 that fixes bug #1812003 by making hooks executable instead of raising an error. Approved by one reviewer, passed CI, and modified 2 files.
74%
#2628 pluginhandler: honour symlink directory paths for filesets (LP: #1833408) snapcraft merged Merged fix for symlink directory path handling in filesets, resolving usr-merge issues. Added regression tests, corrected faulty tests, and retained the follow_symlinks flag per reviewer request. Approved and passed CI.
74%
#2440 meta: make hooks executable instead of complaining they're not snapcraft merged Merged into master. Hooks are now made executable instead of triggering an error, resolving bug #1812003. The change passed CI, received approval, and achieved 100% diff coverage. Whitelisting was deferred to a follow-up PR.
72%