You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When using the pkg.removed function with the version parameter to remove a specific package version, the zypperpkg module does not use the version parameter to remove only that specified package. The assumption is that the pkg module verifies that the version is installed in [0], and the zypperpkg module then removes the package without using a version in [1].
This assumption does not hold for RPM packages that enable multiple versions installed at the same time, such as the kernel package. In such cases, zypperpkg removes the package by using its name, which results in both kernel versions being removed.
Description
When using the
pkg.removed
function with theversion
parameter to remove a specific package version, thezypperpkg
module does not use theversion
parameter to remove only that specified package. The assumption is that the pkg module verifies that the version is installed in [0], and the zypperpkg module then removes the package without using a version in [1].This assumption does not hold for RPM packages that enable multiple versions installed at the same time, such as the kernel package. In such cases, zypperpkg removes the package by using its name, which results in both kernel versions being removed.
For example, this SLS:
results in no Kernels installed:
[0] https://github.com/openSUSE/salt/blob/openSUSE/release/3006.0/salt/states/pkg.py#L2903-L2905
[1] https://github.com/openSUSE/salt/blob/openSUSE/release/3006.0/salt/modules/zypperpkg.py#L2150
Expected behavior
Only the specified RPM package version gets removed.
The text was updated successfully, but these errors were encountered: