Re: [Rpm-maint] [rpm-software-management/rpm] Only fallback to read-only locking for errno==EACCES (#356)
Ah, except there's no evidence the read-only locks were ever exposed outside rpmlock.c, let alone used. It'll be cleaner to remove the read-only locks to fix #355. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/356#issuecomment-343757276___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Only fallback to read-only locking for errno==EACCES (#356)
instead of for errno!=EROFS. File creation could be also denied due to ENOSPC, for example. Errors are generally easier to troubleshoot / debug if we abort early. It's not so great to throw away e.g. ENOSPC and continue in read-only mode. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/356 -- Commit Summary -- * Only fallback to read-only locking for errno==EACCES -- File Changes -- M lib/rpmlock.c (2) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/356.patch https://github.com/rpm-software-management/rpm/pull/356.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/356 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] rpm without TTY gives wrong error message (#355)
Yeah, I just found it too. In principle the closest errno would be EBADF though, which is not much more user-friendly :(. So I'm not sure what the best response to this is. >EBADF cmd is F_SETLK or F_SETLKW and the file descriptor open mode > doesn't match with the type of lock requested. (same as `write()` on an fd which was not opened for writing). -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/355#issuecomment-343745434___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] rpm without TTY gives wrong error message (#355)
It's actually rpmlock_acquire not setting errno when it returns with a failure when asked to write-lock a read-only lock. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/355#issuecomment-343745260___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] rpm without TTY gives wrong error message (#355)
I assumed you wished rpm --erase to function. The important part of the error message is correct even if errno is incorrect when stdin is redirected. FWIW, I can't think of any rpm mode that actually reads from stdin (passwords are read using getpass(3)). Meanwhile errno is (likely) being reset by isatty(3) trying to detect whether to colorize output. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/355#issuecomment-343741360___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] rpm without TTY gives wrong error message (#355)
I don't understand. What are you asking for? This is a UI bug, triggered when a non-query `rpm` command is run without permissions _and_ without a tty on STDIN. I don't see what more information I can provide. Running `rpm` _with_ permissions doesn't print an error message; I checked and it doesn't matter whether I redirect STDIN or not. If you're saying this is issue closed as some flavour of WONTFIX, you forgot to close it. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/355#issuecomment-343723528___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint