http://bugzilla.suse.com/show_bug.cgi?id=1125327 http://bugzilla.suse.com/show_bug.cgi?id=1125327#c15 Martin Wilck <martin.wilck@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.wilck@suse.com --- Comment #15 from Martin Wilck <martin.wilck@suse.com> --- Test of Michal's patch under SLE11-SP4-GA. TL;DR: It all works as designed.
# uncomment and edit the "multiversion" settings in zypp.conf, like this: $ grep ^multiversion /etc/zypp/zypp.conf multiversion = provides:multiversion(kernel) multiversion.kernels = latest,latest-1,running # install test package with patch from Michal $ zypper in mkinitrd-2.4.2-106.12.1.x86_64.rpm # add SLE11-SP3 repo to simulate a system with old kernels $ zypper ar http://dist.suse.de/update/build-ncc.suse.de/SUSE/Updates/SLE-SERVER/11-SP3/... sp3-update # install a test package that requires "xen-kmp-default" $ zypper in ineed-0.1-2.1.noarch.rpm # install two kernels from SLE-11-SP3 (running kernel is SP4 one). $ rpm -qa kernel-default-base kernel-default xen-kmp-default | sort kernel-default-base-3.0.101-0.8.1 kernel-default-base-3.0.101-0.15.1 kernel-default-base-3.0.101-63.1 kernel-default-3.0.101-0.8.1 kernel-default-3.0.101-0.15.1 kernel-default-3.0.101-63.1 xen-kmp-default-4.2.3_02_3.0.101_0.8-0.7.9 $ rpm -q --whatrequires xen-kmp-default ineed-0.1-2.1
Now purge-kernels should uninstall the oldest kernel, as the requirements of xen-kmp-default are met by the latest-1 kernel (3.0.101-0.15.1). This succeeds:
$ /sbin/purge-kernels Removed: kernel-default-base-3.0.101-0.8.1.x86_64 kernel-default-3.0.101-0.8.1.x86_64 $ /sbin/purge-kernels /sbin/purge-kernels: Nothing to do.
Now I remove "latest-1" from the multiversion configuration.
$ sed -i 's/multiversion.kernels = latest,latest-1,running/multiversion.kernels = latest,running/' /etc/zypp/zypp.conf $ grep ^multiversion.kernels /etc/zypp/zypp.conf multiversion.kernels = latest,running $ /sbin/purge-kernels error: Failed dependencies: xen-kmp-default is needed by (installed) ineed-0.1-2.1.noarch /sbin/purge-kernels: giving up.
This is expected because of the ineed -> xen-kmp-default -> kernel-default-base- 3.0.101-0.8.1.x86_64 dependency chain. Note that this happens only if a newer xen-kmp-default package (for the SP4 kernel) is not installed. If I install that package, the SP3 kernel can be uninstalled:
$ zypper in xen-kmp-default-4.4.2_08_3.0.101_63-1.7.x86_64 $ rpm -qa kernel-default-base kernel-default xen-kmp-default|sort kernel-default-3.0.101-0.15.1 kernel-default-3.0.101-63.1 kernel-default-base-3.0.101-0.15.1 kernel-default-base-3.0.101-63.1 xen-kmp-default-4.2.3_02_3.0.101_0.8-0.7.9 xen-kmp-default-4.4.2_08_3.0.101_63-1.7 $ /sbin/purge-kernels Removed: kernel-default-3.0.101-0.15.1.x86_64 kernel-default-base-3.0.101-0.15.1.x86_64 xen-kmp-default-4.2.3_02_3.0.101_0.8-0.7.9.x86_64
-- You are receiving this mail because: You are on the CC list for the bug.