Hello, On 02/07/2019 15:22, Guillem Jover wrote: > ... >> This is because update-alternatives first checks if it must modify >> the auto-selection, and discovers that key files are missing so it >> auto-corrects the alternative choice. >> ...which is what I was telling it to do in the first place. > I checked this yesterday, and silencing the first warning would be > trivial, the second one might need more code shuffling. But I'm > actually wondering now whether that would be the correct thing to do > at all. > > The problem I can see, is that this is really dealing with a broken > alternative and symlinks, so I think the user should be notified, but > will ponder about it a bit more. Well, yes, it is. We were thinking about testing whether or not we are in %postun (somehow...) and adding a special case... which is a bit too much complicated. > In any case ISTM that the real problem here is how u-a is being used in > SUSE, which is not how u-a expects it to be operated. I'd say you'd need > to switch to call it from %preun, which is what we are doing in Debian > (removal is executed in prerm). This makes sure the alternative gets > removed before the files disappear, so there's never a broken > alternative (making the installation more robust), and u-a never sees > that breakage as something that needs fixing, so no warnings will get > emitted. I think you are right. There is a slight problem: we are using u-a this way throughout whole distribution, so moving u-a from %postun to %preun in all packages would take a lot of time or somebody would have to write a script which should take care of many cases (and sometimes it would require a human to decide). > The above is documented in the man page, I guess I could improve it to > cover the rpm case. > > Thanks, > Guillem Thank you for your answer. I will talk about it with my colleagues and let you know.
Greetings, Marketa
signature.asc
Description: OpenPGP digital signature