Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 230153 - Dependency behavior when depending on unversioned provides feels wrong
Summary: Dependency behavior when depending on unversioned provides feels wrong
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: rpm
Version: 4.4
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Paul Nasrat
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2007-02-26 21:40 UTC by Andreas Rogge
Modified: 2007-11-17 01:14 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-07-23 08:18:54 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Andreas Rogge 2007-02-26 21:40:23 UTC
Description of problem:
When you add a requirement to a specific version of a resource and a package is
providing that resource without versioning information the requirement is
treated as fulfilled.

Version-Release number of selected component (if applicable):

How reproducible:
Create an RPM that requires perl(DBI) >= 1.43 and try to install it

Steps to Reproduce:
1. create a RPM that requires perl(DBI) >= 1.43
2. install the rpm
3. notice that the installation doesn't fail, although there is no perl(DBI) >= 1.43
Actual results:
The package is installed and the actual code fails

Expected results:
The package shouldn't be installable

Additional info:
What I have:
$ rpm -q --provides perl-DBI | grep 'perl(DBI)'

$ rpm -qp --requires /home/arogge/rpm/RPMS/i386/test-1.0.0-1.noarch.rpm
perl(DBI) >= 1.43

$ rpm -i --test /home/arogge/rpm/RPMS/i386/test-1.0.0-1.noarch.rpm
<no output>

actually I think this test-package should not be installable, because nothing on
my system actually provides perl(DBI) >= 1.43 - there's only something providing
perl(DBI). So the package is actually installable, but the dependency I actually
wanted  is not fulfilled.
I know that simply changing this would render many packages uninstallable.
However, these packages are currently broken anyway, because their dependencies
are only fulfilled by accident (i.e. the version of the package installed is
acidentially recent enough so the code doesn't break).

This issue is probably reproducible on other RHEL releases and probably also on
Fedora. However, I didn't try it.

Comment 1 Jeff Johnson 2007-03-14 10:02:04 UTC
Yes. Provides without an explicit version are interpreted as providing "all versions" and
so match your requires.

Changing to a closed range like
    Provides: perl(DBI) <= 1.50
(I've chosed "1.50" as an arbitrary example) is the best fix.

Otherwise express your requirement differently (if possible).


Comment 2 Panu Matilainen 2007-07-23 08:18:54 UTC
As explained above by Jeff, this is intentional rpm behavior wrt unversioned
provides and not a bug.

Comment 3 Andreas Rogge 2007-07-23 08:51:54 UTC
Yeah. That's correct.
I looked around a bit and the bug is actually in perl.prov. perl.prov is often
unable to extract the version numbers from perl modules and thus you end up with
a bunch of perl-rpms with unversioned provides.

Comment 4 Panu Matilainen 2007-07-23 09:31:42 UTC
Yup, see bug #249135. 

Note You need to log in before you can comment on or make changes to this bug.