[zypp-devel] rpmdb2solv and rpm5
[mls: duncanmv suggested we should Cc you on this] Hi, We're planning to switch Ark Linux over to using zypper for package installation, and have taken the first steps to make it work with our rpm5 -- we've already posted the patches we're using to zypp-devel. With these patches, we got things to work rather nicely -- we can remove packages with their dependencies, and we can install new packages with proper dependency resolution. However, after any operation, we get an error about the rpm database [even though the operation itself succeeds] that can be traced down to rpmdb2solv acting differently when trying to update an existing solv file than when creating one from scratch: # rpmdb2solv -o test.solv ; echo $? 0 # rpmdb2solv -o test1.solv test.solv; echo $? db->get: No such file or directory corrupt rpm database 1 Any idea why rpmdb2solv could be failing when trying to update an older file, while it works when building from the same rpmdb from scratch? Thanks, bero -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Hi, On Tue, 2 Jun 2009, Bernhard Rosenkränzer wrote:
# rpmdb2solv -o test.solv ; echo $? 0 # rpmdb2solv -o test1.solv test.solv; echo $? db->get: No such file or directory corrupt rpm database 1
Any idea why rpmdb2solv could be failing when trying to update an older file, while it works when building from the same rpmdb from scratch?
Look at the source :) rpmdb2solv cleverly reads in some parts of the old database when it's presented with an old solv file. It reads in the database IDs for each package (from /var/lib/rpm/Name, which is quick), and compares them with the ones in the old .solv file. Only packages which meanwhile have a different or new ID (those got updated/reinstalled/changed by rpm) are reparsed from the full rpm database and merged into the old .solv file to produce the new one. My guess is, that this database ("Name") has a different format or name in rpm5. Ciao, Michael.
On Tue, Jun 02, 2009 at 12:57:14AM +0200, Bernhard Rosenkränzer wrote:
# rpmdb2solv -o test1.solv test.solv; echo $? db->get: No such file or directory corrupt rpm database 1
Any idea why rpmdb2solv could be failing when trying to update an older file, while it works when building from the same rpmdb from scratch?
Could you please send us the output of the following two strace commands, so that we can find out where the problem is? strace rpmdb2solv -o test1.solv test.solv strace rpm -q rpm Thanks, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Tue, 2 Jun 2009 11:47:26 +0200, Michael Schroeder
On Tue, Jun 02, 2009 at 12:57:14AM +0200, Bernhard Rosenkränzer wrote:
Any idea why rpmdb2solv could be failing when trying to update an older file, while it works when building from the same rpmdb from scratch?
Could you please send us the output of the following two strace commands, so that we can find out where the problem is?
strace rpmdb2solv -o test1.solv test.solv strace rpm -q rpm
Hi, sure, I've uploaded them to http://arklinux.org/rpmdb2solv.trace http://arklinux.org/rpm.trace I don't see any relevant failures to open a file in either of them, so I guess db4 abuses ENOENT to indicate "No such key in the database" or something (but if it's that, I don't see why running rpmdb2solv without a preexisting solv file would work). Thanks bero -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Tue, Jun 02, 2009 at 12:04:49PM +0200, Bernhard Rosenkränzer wrote:
Hi, sure, I've uploaded them to http://arklinux.org/rpmdb2solv.trace http://arklinux.org/rpm.trace
Weird. There seems to be some trouble when retrieving a specific package by a package id. Could you also upload both /var/lib/rpm/Packages and /var/lib/rpm/Name? Thanks, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Tue, 2 Jun 2009 12:44:51 +0200, Michael Schroeder
On Tue, Jun 02, 2009 at 12:04:49PM +0200, Bernhard Rosenkränzer wrote:
Hi, sure, I've uploaded them to http://arklinux.org/rpmdb2solv.trace http://arklinux.org/rpm.trace
Weird. There seems to be some trouble when retrieving a specific package by a package id.
Could you also upload both /var/lib/rpm/Packages and /var/lib/rpm/Name?
Sure... http://arklinux.org/Packages.bz2 http://arklinux.org/Name.bz2 This rpmdb has seen quite a bit of abuse (installed with rpm 4.x then updated to 5.x, ...) so it's possible there's some corruption in there (rpm works fine with it though, so ideally zypp would handle it even if it's slightly corrupted). I'll also try on another box with a less tormented rpmdb when I get home. ttyl bero -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Tue, Jun 02, 2009 at 05:10:58PM +0200, Bernhard Rosenkränzer wrote:
This rpmdb has seen quite a bit of abuse (installed with rpm 4.x then updated to 5.x, ...) so it's possible there's some corruption in there (rpm works fine with it though, so ideally zypp would handle it even if it's slightly corrupted).
Hmm, looks like the rpm index really is corrupt. Doesn't rpm complain when you do: rpm -q ImageMagick The Name index contains 3 entries, but Packages just contains one entry. 'rpm --rebuilddb' should clean up the mess. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (3)
-
Bernhard Rosenkränzer
-
Michael Matz
-
Michael Schroeder