RPM scriptlets are passed in $1 ( the number of packages of this name which will be left on the system when the action completes ) so they can determine whether a package upgrade or removal is occurring. For reasons outside my control, I believe the next version of the package may have a different package name than the first version. I tried to create a new package that "obsoletes" the old one and upgraded using it. However, the old package postun scriptlet still got $1 == 0 and my postun cleanup script ran.
RPM scriptlet以$ 1(此名称的包的数量将在操作完成时保留在系统上)传递,以便他们可以确定是否正在进行包升级或删除。出于我无法控制的原因,我相信该软件包的下一个版本可能具有与第一个版本不同的软件包名称。我试图创建一个新的包,“淘汰”旧包并使用它进行升级。但是,旧包postun scriptlet仍然得到$ 1 == 0并且我的postun清理脚本运行了。
This is a bit of an edge case, because technically there are 0 packages with that name remaining, but I thought the obsoletes case might pretend that there's still a package with that name during the upgrade. Is there a way to test for the situation when a package is being obsoleted so that the scriptlet can determine an upgrade is occurring instead of a package removal?
这是一个边缘情况,因为从技术上讲,有0个包剩余的名称,但我认为过时的情况可能会假装在升级过程中仍然有一个包含该名称的包。是否有办法测试包被淘汰时的情况,以便scriptlet可以确定正在进行升级而不是删除包?
1 个解决方案
#1
-2
Can you try this command to check the rpm packages in the OS
您可以尝试使用此命令检查操作系统中的rpm包
rpm -qa | grep -i "(RPMNAME)"
rpm -qa | grep -i“(RPMNAME)”
#1
-2
Can you try this command to check the rpm packages in the OS
您可以尝试使用此命令检查操作系统中的rpm包
rpm -qa | grep -i "(RPMNAME)"
rpm -qa | grep -i“(RPMNAME)”