Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Corrupted rpm db - how to fix?

  1. #11
    Join Date
    May 2015
    Location
    Italy
    Posts
    379

    Default Re: Corrupted rpm db - how to fix?

    Quote Originally Posted by wolfi323 View Post
    You should be able to delete them with something like this:
    Code:
    rpm -e --allmatches gpg-pubkey-df7587c3-576a5c23
    (...)
    I tried this command with the key identified by the error message (gpg-pubkey-3dbdc284-53674dd4).
    I can verify that the key is not present anymore, but I still have the error when I run 'rpm -qa gpg-pubkey*'.

    Cris
    Desktop: OpenSUSE Tumbleweed (x86_64) - AMD FX-8350 Eight-Core Processor, 16Gb RAM, 120GB Samsung Evo 840 SSD
    Laptop: OpenSUSE Tumbleweed (x86_64) - Thinkpad T440 - Intel i5-4210U, 12Gb RAM, 250GB Samsung EVO 750 SSD

  2. #12

    Default Re: Corrupted rpm db - how to fix?

    Quote Originally Posted by Cris70 View Post
    Hey, this is exactly what is happening to me!!
    But, despite repeated googling I failed to find a related bug!! Do you have the number? Is it fixed now?
    The strange thing is that I only have it on one PC, the other one seems immune.
    I'd need to search for the bug report, but that probably wouldn't help you. It was about PackageKit causing repo keys to get invalidated when it looked for updates (the bug was actually in libzypp), which made it necessary to accept them again and again.

    It's fixed since nearly a year though, and I haven't had the problem a single time since then. Also, there were a couple of forum threads about it back then, and new ones ceased to appear since then either.

    Quote Originally Posted by Cris70 View Post
    I tried this command with the key identified by the error message (gpg-pubkey-3dbdc284-53674dd4).
    I can verify that the key is not present anymore, but I still have the error when I run 'rpm -qa gpg-pubkey*'.
    Yeah, I did not see that error message "hidden" in the rest of the output before.

    Well, your database is indeed corrupted.
    If "rpm --rebuilddb" doesn't fix it, the only option I see is start fresh with a clean one (rpm --reinitdb) and reinstall all packages I'm afraid.

    The rpm database is a standard Berkely DB though, maybe there tools/ways to fix it but I cannot help there.

  3. #13
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,475
    Blog Entries
    2

    Default Re: Corrupted rpm db - how to fix?

    Quote Originally Posted by Cris70 View Post
    Hi wolfi323!



    Hey, this is exactly what is happening to me!!
    But, despite repeated googling I failed to find a related bug!! Do you have the number? Is it fixed now?
    The strange thing is that I only have it on one PC, the other one seems immune.



    I am still seeing the problem, though. Had it just five minutes ago when I ran 'zypper dup'... I had to trust (again) the key for 4 repos.

    Cris
    You won't see the error fixed yet on your system, Wolfi said he found the issue possibly addressed on 42.3 and you're on TW.

    BTW -
    I found it curious that your rpm database is so complex with so many indexes...
    I checked on one of my own TW which is nearly a default install and it only has 2 indexes (Packages and Names) and 2 gpg-pubkeys(I haven't verified, but I'm guessing that means that more than one TW repo may be signed with the same pubkey).
    I guess your long list of indexes are due to your many OBS repos which possibly have packages under development with frequent changes...

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #14

    Default Re: Corrupted rpm db - how to fix?

    Quote Originally Posted by tsu2 View Post
    You won't see the error fixed yet on your system, Wolfi said he found the issue possibly addressed on 42.3 and you're on TW.
    Actually the issue was in 42.2, it was fixed already when 42.3 was released.

    And of course it is fixed on TW too, since about a year as I wrote.

    I found it curious that your rpm database is so complex with so many indexes...
    I checked on one of my own TW which is nearly a default install and it only has 2 indexes (Packages and Names)
    ???

    From my 42.3 system:
    Code:
    $ ls /var/lib/rpm
    
    alternatives  Dirnames    Name          Providename  Sha1header
    Basenames     Group       Obsoletename  Pubkeys      Sigmd5
    Conflictname  Installtid  Packages      Requirename  Triggername
    And that's the norm.
    Everything except Packages can be recreated automatically (from Packages), and that's exactly what "rpm --rebuilddb" does.
    In the OP's case, it seems that Packages itself is corrupt though.

    and 2 gpg-pubkeys(I haven't verified, but I'm guessing that means that more than one TW repo may be signed with the same pubkey).
    I guess your long list of indexes are due to your many OBS repos which possibly have packages under development with frequent changes...
    The number of indexes has nothing to do with the number of repos.

    The number of gpg-keys of course does, because usually each repo has its own key.
    Last edited by wolfi323; 23-Apr-2018 at 00:47.

  5. #15

    Default Re: Corrupted rpm db - how to fix?

    I had a similar problem once, and I solved adding the YaST-Head repo and updated all Yast to that Repo
    ------------------------------------
    Correct me if I'm wrong .
    ------------------------------------

  6. #16

    Default Re: Corrupted rpm db - how to fix?

    Quote Originally Posted by enziosavio View Post
    I had a similar problem once, and I solved adding the YaST-Head repo and updated all Yast to that Repo
    Hm, I don't see how this would magically fix a corrupted rpm database though...

    It would of course help if you encounter some bug that's already fixed, but the fix is not in the standard repos yet.
    That's not really the case here though AFAICT.

  7. #17

    Default Re: Corrupted rpm db - how to fix?

    Quote Originally Posted by wolfi323 View Post
    Hm, I don't see how this would magically fix a corrupted rpm database though...

    It would of course help if you encounter some bug that's already fixed, but the fix is not in the standard repos yet.
    That's not really the case here though AFAICT.
    I'm ashamed to say I had two Firefox tabs open on the Forum .... but it was an answer I wanted to give here
    https://forums.opensuse.org/showthre...crashing/page3
    ------------------------------------
    Correct me if I'm wrong .
    ------------------------------------

  8. #18

    Default Re: Corrupted rpm db - how to fix?

    Quote Originally Posted by wolfi323 View Post
    I'd need to search for the bug report, but that probably wouldn't help you. It was about PackageKit causing repo keys to get invalidated when it looked for updates (the bug was actually in libzypp), which made it necessary to accept them again and again.
    It's probably no longer relevant anyway, but I stumbled over it today, so here it is:
    http://bugzilla.opensuse.org/show_bug.cgi?id=1036659

  9. #19
    Join Date
    May 2015
    Location
    Italy
    Posts
    379

    Default Re: Corrupted rpm db - how to fix?

    Hi wolfi323.

    Quote Originally Posted by wolfi323 View Post
    It's probably no longer relevant anyway, but I stumbled over it today, so here it is:
    http://bugzilla.opensuse.org/show_bug.cgi?id=1036659
    Thank you wolfi323!
    I'm still busy trying to fix my rpm db... I had a few good suggestions, if I succeed in fixing it I'll post the solution here.

    Cris
    Desktop: OpenSUSE Tumbleweed (x86_64) - AMD FX-8350 Eight-Core Processor, 16Gb RAM, 120GB Samsung Evo 840 SSD
    Laptop: OpenSUSE Tumbleweed (x86_64) - Thinkpad T440 - Intel i5-4210U, 12Gb RAM, 250GB Samsung EVO 750 SSD

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •