On Sun, 24 Jul 2016 10:05:23 +0300 Andrew Savchenko <birc...@gentoo.org> wrote: > I agree with you, but REPLACING_VERSIONS has nothing to do with > such recovery.
Yes, it does. Specifically, what we want is for developers to get into the habit of writing safe, clean code, even if they think they don't need to care about it in some particular situation because they can't think of how it would go wrong. It's the same as getting into the habit of sticking || die on things. > 1) It appeared only in EAPI 4, approved on 2011-01-17. Recovery > from hardware crashes forked well long before. Before this, you could use has_version in pkg_*, and it would tell you the *old* version of the package that was installed. The phase order changed a while ago, and broke this, so REPLACING_VERSIONS was the replacement. Again, the situation is complicated, there's a lot of messy history behind this, and if you don't know it all, just do what the spec says and stop wasting everyone's time by arguing. > 2) If you will look into the tree, in the absolute majority of cases > REPLACING_VERSIONS is being used to determine whether informational > messages should be shown to a user or not. Such messages usually > include some upgrade hints or howtos; and REPLACING_VERSIONS check > is required to avoid showing them to unaffected users. It has > absolutely nothing to do with the error recovery done by PM itself. Don't get into the habit of writing code that makes unnecessary assumptions that will come back and screw users over in unexpected situations. It's easy to do this the right way, so at this point I can only conclude that you're persisting in trying to do it wrong just to avoid admitting that you made a mistake from ignorance. It's OK to be wrong sometimes (and this is why code review exists), but it's not OK to continue to argue that you were right out of stubbornness. -- Ciaran McCreesh