[Bug 144672] perl needs dependency on specific libdb version

bugzilla at redhat.com bugzilla at redhat.com
Mon Oct 15 18:13:51 UTC 2007


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.

Summary: perl needs dependency on specific libdb version


https://bugzilla.redhat.com/show_bug.cgi?id=144672


tcallawa at redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WONTFIX                     |RAWHIDE




------- Additional Comments From tcallawa at redhat.com  2007-10-15 14:13 EST -------
Hi, sorry for the late response.

It isn't safe to query rpm inside of a spec file in Fedora. Here's why:

When the Fedora buildsystem builds a package, it builds each package inside a
new, clean, freshly generated chroot. It uses the system files to generate the
chroot, and the system files are not guaranteed to match the equivalent files
installed inside the chroot.

To put it succinctly, the rpm used to install the packages in the chroot build
environment is not guaranteed to (and in almost every case is not) the same as
the rpm inside the chroot. Thus, you have an rpm database inside the chroot
which was created with an older db4, and a rpm inside the chroot that uses a
newer db4. When rpm queries the database, you get a db4 environment mismatch,
and nothing useful comes out.

This is why we do not let people do that in Fedora.

It works fine for you, because you are far more likely to have the same rpm
which created the database when you are querying it.

With that explained, here's the workaround to solve this specific problem:

%define db4_major %(grep "DB_VERSION_MAJOR" /usr/include/db.h | cut -f3)
%define db4_minor %(grep "DB_VERSION_MINOR" /usr/include/db.h | cut -f3)
%define db4_patch %(grep "DB_VERSION_PATCH" /usr/include/db.h | cut -f3)

...

Requires: db4-devel = %{db4_major}.%{db4_minor}.%{db4_patch}

I'm committing this change to rawhide right now.

We're also contacting DB_File upstream to see if they really need this strict
version check (our suspicion is that they do not).

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the Fedora-perl-devel-list mailing list