RPM scripts are transferred at $ 1 (the number of packages of this name that will be left on the system when the action completes), so that they can determine if the package is being updated or removed. For reasons beyond my control, I believe that the next version of the package may have a different name for the package than the first version. I tried to create a new package that "obsoletes" is old and updated it. However, the old postun scriptlet package still got $ 1 == 0, and my postun script cleanup started.
This is a bit of an extreme case, because technically there are 0 packages with this name, but I thought that the case with offenders might pretend that there is still a package with this name during the upgrade process. Is there any way to check the situation when a package becomes outdated so that the scriptlet can determine that the update is happening instead of removing the package?
source
share