False positive dependency checks break package install order

Jacek Konieczny jajcus at jajcus.net
Tue Aug 13 13:47:52 CEST 2013


Hi,

Trying to debug my package installation 'LOOP:' problems I have
instrumented the RPM source code with many 'rpmlog(RPMLOG_DEBUG, ...)',
so I could understand what is happening there.

After hours of such debugging I found out what is going on: for each
dependency rpmalSatisfiesDepend() is called from order.c to build the
dependency graph. There, for every file dependency (package requires
'/something') rpmalAllFileSatisfiesDepend() is called which finds out
what packages provide the required file. And here is the problem:
rpmalAllFileSatisfiesDepend() uses a Bloom filter look-up to find out
if a package contain a file. But Bloom filter, to its very nature, gives
false positives, which are not verified further. So, it can happen that
rpmalSatisfiesDepend() returns wrong package for a required file or
directory, which adds an extra edge to the dependency graph. RPM reports
this as a 'LOOP' problem and tries to work-around it by changing the
installation order, which totally breaks the order for me.

The attached patch is a quick fix to the problem: after rpmbfChk()
states a file is provided by a package, its answer is additionally
verified by scanning the file index of the package.

I am sure this can be implemented in a more elegant way, but I don't
know the internal RPM architecture well enough and I cannot spend much
more time on fixing this problem.

Greets,
	Jacek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpm-double_check_file_deps.patch
Type: text/x-patch
Size: 2481 bytes
Desc: not available
URL: </mailman/pipermail/pld-devel-en/attachments/20130813/14ee1fbe/attachment.bin>


More information about the pld-devel-en mailing list