[Rpm-maint] [rpm-software-management/rpm] Skip ghost symlinks in --setperms (RhBug:1900662) (PR #1854)

Michal Domonkos notifications at github.com
Wed Jan 19 10:36:13 UTC 2022


> This is the right thing to do, regardless of anything else. Permission bits are not applicable for symlinks so we simply should _never_ try to set them, no matter what.

True, it really is a no-brainer. What's key here is the file *type* (a binary value in our case - whether it was a symlink or not) for which these permissions were recorded, and we know it (a little awkwardly through `%FILELINKTO`), so it should be taken into account in `--setperms`, indeed.

> It's the ghosts and goblins part where things get confusing, if you let the mind wander there ghost

As for the most recent dragon encounter (the two commits mentioned above), the first commit 38c2f6e was about avoiding a `chmod` on files/directories that don't exist. The regression it caused (fixed in the second commit 0d83637) was due to the wrong conditional logic (missing parenthesis). Other than that, there doesn't seem to be anything there that interferes with the case we're fixing here, so in that regard, we should be safe.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1854#issuecomment-1016302048
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/1854/c1016302048 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220119/0f3264f5/attachment-0001.html>


More information about the Rpm-maint mailing list