[opensuse] /sbin/purge-kernels fails on removing non-installed kernel since rpm -qa report is wrong
Hi @all! I have Leap 42.3 with the Kernel:stable repository enabled. /sbin/purge-kernels should remove old kernel version. However it fails to remove one particular kernel version (and subsequently does not remove anything). zypper -se -i -v reports that said kernel version is not installed. rpm -qa reports that said kernel version is installed. rpm -ql reports that said kernel version is not installed. Checking /boot/ and /lib/modules/ shows that said kernel is indeed not installed. Why can rpm -qa report a package which is not installed? Can /sbin/purge-kernels use other sources of installed packages than rpm -qa? best regards Thomas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
27.01.2018 16:14, Thomas Wagner пишет:
Hi @all!
I have Leap 42.3 with the Kernel:stable repository enabled.
/sbin/purge-kernels should remove old kernel version. However it fails to remove one particular kernel version (and subsequently does not remove anything).
zypper -se -i -v reports that said kernel version is not installed. rpm -qa reports that said kernel version is installed. rpm -ql reports that said kernel version is not installed. Checking /boot/ and /lib/modules/ shows that said kernel is indeed not installed.
Why can rpm -qa report a package which is not installed?
RPM database can be corrupted. You can misinterpret output of commands. As you do not show actual commands and their output you can only expect pure guesswork answers.
Can /sbin/purge-kernels use other sources of installed packages than rpm -qa?
Program that attempts to remove package should check for this package in package database, should not it? Or do you have other suggestion? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-01-27 19:31, Andrei Borzenkov wrote:
27.01.2018 16:14, Thomas Wagner пишет:
zypper -se -i -v reports that said kernel version is not installed. rpm -qa reports that said kernel version is installed. rpm -ql reports that said kernel version is not installed. Checking /boot/ and /lib/modules/ shows that said kernel is indeed not installed.
Why can rpm -qa report a package which is not installed?
RPM database can be corrupted. You can misinterpret output of commands. As you do not show actual commands and their output you can only expect pure guesswork answers. Fair enough, here is the full output:
# /sbin/purge-kernels x86_64/defaultHASH(0x2725378)error: package kernel-default-4.4.92-31.1.x86_64 is not installed /sbin/purge-kernels: giving up. # zypper se -i -s kernel-default Loading repository data... Reading installed packages... S | Name | Type | Version | Arch | Repository ---+----------------+---------+----------------------+--------+------------------------------------------- i+ | kernel-default | package | 4.14.15-3.1.g9e84548 | x86_64 | (System Packages) i+ | kernel-default | package | 4.14.15-2.1.g5b3d0ce | x86_64 | (System Packages) i+ | kernel-default | package | 4.14.14-1.1.geef6178 | x86_64 | (System Packages) i+ | kernel-default | package | 4.14.13-1.1.gbd444a0 | x86_64 | (System Packages) i+ | kernel-default | package | 4.14.7-1.1.g0598608 | x86_64 | (System Packages) i+ | kernel-default | package | 4.14.4-1.1.gb29439c | x86_64 | (System Packages) i+ | kernel-default | package | 4.14.3-1.1.ga731a45 | x86_64 | (System Packages) i+ | kernel-default | package | 4.14.2-1.1.gb0610fc | x86_64 | (System Packages) i+ | kernel-default | package | 4.14.1-2.1.ga5bca71 | x86_64 | (System Packages) i+ | kernel-default | package | 4.14.0-1.1.gab9e909 | x86_64 | (System Packages) i+ | kernel-default | package | 4.14.15-4.1.g12e5c10 | x86_64 | Kernel builds for branch stable (standard) i+ | kernel-default | package | 4.4.104-39.1 | x86_64 | Hauptaktualisierungs-Repository # rpm -qa | grep kernel-default | sort kernel-default-4.14.0-1.1.gab9e909.x86_64 kernel-default-4.14.1-2.1.ga5bca71.x86_64 kernel-default-4.14.13-1.1.gbd444a0.x86_64 kernel-default-4.14.14-1.1.geef6178.x86_64 kernel-default-4.14.15-2.1.g5b3d0ce.x86_64 kernel-default-4.14.15-3.1.g9e84548.x86_64 kernel-default-4.14.15-4.1.g12e5c10.x86_64 kernel-default-4.14.2-1.1.gb0610fc.x86_64 kernel-default-4.14.3-1.1.ga731a45.x86_64 kernel-default-4.14.4-1.1.gb29439c.x86_64 kernel-default-4.14.7-1.1.g0598608.x86_64 kernel-default-4.4.104-39.1.x86_64 kernel-default-4.4.92-31.1.x86_64 # rpm -ql kernel-default-4.4.92-31.1.x86_64 package kernel-default-4.4.92-31.1.x86_64 is not installed
Can /sbin/purge-kernels use other sources of installed packages than rpm -qa? Program that attempts to remove package should check for this package in package database, should not it? Or do you have other suggestion? Yeah, my suggestion is an option to choose whether to use rpm's or zypper's database, as there can be obviously a state where they differ. This would also solve https://bugzilla.opensuse.org/show_bug.cgi?id=768947 Avoiding the difference between zypper and rpm at all would be best, but I'm not sure how that difference could occur in the first place, neither do I know how to fix this.
best regards Thomas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Andrei Borzenkov
-
Thomas Wagner