Re: [Rpm-maint] [rpm-software-management/rpm] rpm without TTY gives wrong error message (#355)

2018-02-12 Thread Panu Matilainen
Closed #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/issues/355#event-1469240148___
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)

2018-02-12 Thread Panu Matilainen
First part was already fixed in commit 
df053dd36461042e4d11a21a97e9be9058204658, second half now in commit 
b89eb35c6034d43a8048ac9d452a1921596071a7:

```
[pmatilai@sopuli rpm]$ ./rpm -e mlocate
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission 
denied)
[pmatilai@sopuli rpm]$ ./rpm -e mlocate < /dev/null
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission 
denied)
```

-- 
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-364894509___
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)

2017-11-13 Thread Panu Matilainen
In the meanwhile I manually merged this one with somewhat different commit 
message, the EROFS-specific test was dumb anyhow.

-- 
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-343868388___
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)

2017-11-12 Thread Alan Jenkins
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)

2017-11-12 Thread Andreas Schwab
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)

2017-11-12 Thread Jeff Johnson
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)

2017-11-12 Thread Alan Jenkins
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


Re: [Rpm-maint] [rpm-software-management/rpm] rpm without TTY gives wrong error message (#355)

2017-11-11 Thread Jeff Johnson
Run as root.

-- 
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-343713579___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] rpm without TTY gives wrong error message (#355)

2017-11-10 Thread Alan Jenkins
```
$ rpm -e mlocate
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission 
denied)
$ rpm -e mlocate https://github.com/rpm-software-management/rpm/issues/355___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint