Todd, On Wed, 2016-09-21 at 16:08 -0400, Todd Rme wrote:
Can we please get some consistent, agreed-upon, publicly-available rules for how update-alternatives should be implemented?
Thanks for raising that issue here - there is indeed a good need for that. And then out documentation should represent this (incl. the examples, which are a wild mix now)
In August there was an extensive thread where we were told repeatedly that the --remove part should go in %preun. All the packages I was working with were in %postun, but I changed them all to %preun as I was told. Now, I have had three packages rejected for putting --remove in %preun, telling me it has to go in %postun instead.
I might have missed that thread and the agreement. The 'issue' I see with having it in preun is that we remove files which rpm 'owns' and can't delete anymore afterwards.
Assuming this rejection is even correct, I now have dozens of packages where I have to revert the change I was told to make just a few weeks ago.
That's the least favorable of course - let's hope I was wrong in declining and you are good to go...
There are no published policies for update-alternatives. All we have to go on is one extremely simple example that doesn't represent the situation of most packages and we are just supposed to figure out how to apply it to our particular situation. Worse, that example uses %postun for one subpackage and %preun for another with no explanation of which we should use under what situations.
Indeed - THIS is really not useful at all; it's just heavily underdocumented.
We really need some specific, detailed rules and guidelines for exactly how we need to implement update-alternatives. Rejecting packages for complying with instructions in the mailing list is a huge waste of everyones' time.
As said above: apologies for those declined; I might have missed a thread about it. a quick condolence: on Fedora the doc about it is about the same mess: they use preun/postun in their samples too without proper explanation. SO let's make it better and DOCUMENT what it should be.. so that the review team, when confirming what they see based on the doc, has something to go on by. For the record: postun and preun both cause a warning: preun: RPM wants to remove files in the end that are owned by a package but that do not exist -> rpm warns postun: rpm removed the files when u-a wants to clean up and can't remove the files. It warns. I for one think the warning of u-a is less tragic. Cheers, Dominique