Closed PowerSnail closed 4 months ago
@PowerSnail maybe a duplicate of bsc#1227205. If so, it should be fixed with zypper-1.14.75.
I don't think that is the case. I have 1.14.76
, and it's still not working for me.
You are right. I checked the code and actually this behavior is intended.
Regarding conflict resolution there is no guarantee that problems and solutions will appear in the same order in different zypper calls. So accepting piped input to resolve them could lead to unexpected results.
I understand the point that automating conflict resolution isn't something that is supported.
What I'm trying to do is to wrap zypper within another script, which calls zypper dup and also some other updates not handled by zypper. When it comes to resolution, I'm still reading the stdout and selecting the resolution manually, it's just being passed in through another layer.
I guess the only way to do that would be to simulate a tty to run zypper?
Yes. Zypper does a fopen("/dev/tty", "r")
to read the prompt reply.
Thanks.
It seems that zypper ignores piped stdin entirely.
For example, let's say
zypper dup
is encountering a conflict that needs a user-input for resolution,...does not do anything. Zypper still waits for the inputs from terminal.
I'm aware that this is a contrived example, since there are more robust ways to tell zypper to cancel on conflict. But it does illustrate the problem.
Thanks!
I've searched the man page and github issues tracker, and didn't find a solution or duplicate issue.