Suppress all but the first warning of a given type when extracting a ZIP file
Operations like lchown() and chmod() are called once for each entry in a ZIP archive. If the operation fails for the first entry, it's very likely to fail for every one in the archive. The errors are non-fatal, but lead to annoying build log spam.
This MR changes the output so failure messages are only shown the first time an operation files.
Closes #1180 (closed)
Merge request reports
Activity
Milestone changed to %v1.5
I would say that this should be better to disable
lchown
if user is not root for all Unix systems and print the notice at top. This is an only reason why it happens.Non-privileged user doesn't have permissions to change owner of the file.
Edited by Nick ThomasUnfortunately, it's not that simple - on linux, a non-root user may have CAP_CHOWN, or a root user may be forbidden from calling chown.
euid == 0
is a heuristic, it's impossible to reliably predict whetherlchown
will giveEPERM
in advance.The problem is the log spam, not that the call returns
EPERM
, so I'd prefer this solution - it doesn't break any (obscure, but valid) setups while fixing the problem. What do you think?@nick.thomas OK. Thanks for explanation :)
mentioned in commit 51d01bf2