Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPM shows the same Package in two versions / can only be uninstalled once #2320

Closed
obel1x opened this issue Dec 9, 2022 · 3 comments
Closed

Comments

@obel1x
Copy link

obel1x commented Dec 9, 2022

Currently i have:

pcmsi-i7-4790k:~ # rpm -qa wine
wine-7.21-lp154.1505.2.x86_64
wine-7.22-lp154.970.1.x86_64
pcmsi-i7-4790k:~ #

well it IS only installed once, so this is strange as such.

i remove the one existing version

pcmsi-i7-4790k:~ # rpm -ev wine-7.22-lp154.970.1.x86_64
Preparing packages...
wine-7.22-lp154.970.1.x86_64
pcmsi-i7-4790k:~ #

which works:

pcmsi-i7-4790k:~ # rpm -qa wine
wine-7.21-lp154.1505.2.x86_64
pcmsi-i7-4790k:~ #

now i want to also remove that version.

pcmsi-i7-4790k:~ # rpm -ev wine-7.21-lp154.1505.2.x86_64
error: package wine-7.21-lp154.1505.2.x86_64 is not installed
pcmsi-i7-4790k:~ # rpm -ev --justdb wine-7.21-lp154.1505.2.x86_64
error: package wine-7.21-lp154.1505.2.x86_64 is not installed
pcmsi-i7-4790k:~ #

? again check versions:

pcmsi-i7-4790k:~ # rpm -qa wine
wine-7.21-lp154.1505.2.x86_64
pcmsi-i7-4790k:~ #

what the heck is wrong here, how to get rid of that broken version?

Edit:
OpenSuSE Leap 15.4
RPM version 4.14.3

@obel1x
Copy link
Author

obel1x commented Dec 10, 2022

solved it by running
rpmdb --rebuilddb
as written in docs. For me it was hard to find the right backup strategy, as some parts of https://rpm.org/user_doc/db_recovery.html would not work:

pcmsi-i7-4790k:/usr/lib/sysimage/rpm # /usr/lib/rpm/rpmdb_stat -CA
rpmdb_stat: DB_ENV->open: No such file or directory

Did not align with "output under the sections headed ‘Locks grouped by lockers’ and ‘Locks grouped by object’" as there is no such output. Maybe one could add what to do with that message?

@pmatilai
Copy link
Member

Oh, that db_recovery stuff is only relevant for Berkeley DB backend, and in upstream configuration. On Suse, the BDB usage differs and you wouldn't see such messages (IIRC). Also 4.14 fell out of upstream support a couple of years ago already.

The db_recovery doc needs to be updated though.

@pmatilai
Copy link
Member

So actually the db_recovery docs already separate BDB from the other cases, with instructions on how to tell which one is being used.

Support for BDB databases has been removed entirely in more recent rpm versions so there's nothing we can do about this now. And note that the "locks grouped by..." output comes from BDB utilities, not rpm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants