Re: [opensuse] /sbin/purge-kernels fails on removing non-installed kernel since rpm -qa report is wrong
On 2018-01-28 09:52, Andrei Borzenkov wrote:
28.01.2018 11:09, Thomas Wagner пишет:
On 2018-01-27 19:31, Andrei Borzenkov wrote:
# 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
Database consists of data and indexes. "rpm -qa" will crawl all data, while "rpm -q" attempts to only check index. This implies that RPM database is corrupted and index was not properly updated after package was removed. You may try to run
cd /var/lib/rpm /usr/lib/rpm/rpmdb_verify Packages Name
to see if it finds anything. Thanks for the suggestion. I just tired it and does not report anything.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
29.01.2018 18:50, Thomas Wagner пишет:
On 2018-01-28 09:52, Andrei Borzenkov wrote:
28.01.2018 11:09, Thomas Wagner пишет:
On 2018-01-27 19:31, Andrei Borzenkov wrote:
# 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
Database consists of data and indexes. "rpm -qa" will crawl all data, while "rpm -q" attempts to only check index. This implies that RPM database is corrupted and index was not properly updated after package was removed. You may try to run
cd /var/lib/rpm /usr/lib/rpm/rpmdb_verify Packages Name
to see if it finds anything. Thanks for the suggestion. I just tired it and does not report anything.
Well, then I guess it really remains rpm --rebuilddb && zypper clean && zypper ref -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-01-29 18:01, Andrei Borzenkov wrote:
29.01.2018 18:50, Thomas Wagner пишет:
On 2018-01-28 09:52, Andrei Borzenkov wrote:
28.01.2018 11:09, Thomas Wagner пишет: cd /var/lib/rpm /usr/lib/rpm/rpmdb_verify Packages Name
to see if it finds anything. Thanks for the suggestion. I just tired it and does not report anything.
Well, then I guess it really remains
rpm --rebuilddb && zypper clean && zypper ref This seemed a bit harsh to me. I found another solution: Thankfully the rpm package of affected old kernel-default version was still on openSUSEs update servers. Thus, i simply re-installed the package for which the database entry was broken. Now purge-kernels runs fine.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-ID: <alpine.LSU.2.21.1801301532330.18187@Telcontar.valinor> On Tuesday, 2018-01-30 at 10:58 +0100, Thomas Wagner wrote:
On 2018-01-29 18:01, Andrei Borzenkov wrote:
29.01.2018 18:50, Thomas Wagner пишет:
On 2018-01-28 09:52, Andrei Borzenkov wrote:
28.01.2018 11:09, Thomas Wagner пишет: cd /var/lib/rpm /usr/lib/rpm/rpmdb_verify Packages Name
to see if it finds anything. Thanks for the suggestion. I just tired it and does not report anything.
Well, then I guess it really remains
rpm --rebuilddb && zypper clean && zypper ref This seemed a bit harsh to me.
If the rpm database is broken, you need to repair it, or it will bite you in another way, and the sooner the better. There is a backup in [...] What, I can't find it. It is created by a backup cron job, /etc/cron.daily/suse.de-backup-rpmdb, configured in /etc/sysconfig/backup... ah, the directory is /var/adm/backup/rpmdb. In case the database gets corrupt beyond repair, replace the active copy with a previous copy and run rebuilddb again. If it doesn't work, try again with an earlier copy, etc. As the backup is done periodically, if you wait too much the last working copy will rotate out... - -- Cheers, Carlos E. R. (from openSUSE 42.2 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlpwgugACgkQtTMYHG2NR9UfCACfephzEIoCWDgnei6nSE/10kQu owEAoIEjQJ4U0Zbcu5ux0sTqHZeIj6bk =5XKz -----END PGP SIGNATURE-----
participants (3)
-
Andrei Borzenkov
-
Carlos E. R.
-
Thomas Wagner