Bug 230153 - Dependency behavior when depending on unversioned provides feels wrong
Dependency behavior when depending on unversioned provides feels wrong
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: rpm (Show other bugs)
4.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-26 16:40 EST by Andreas Rogge
Modified: 2007-11-16 20:14 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-23 04:18:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andreas Rogge 2007-02-26 16:40:23 EST
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):
rpm-4.3.3-18

How reproducible:
always
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)'
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 06:02:04 EDT
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).

WONTFIX
Comment 2 Panu Matilainen 2007-07-23 04:18:54 EDT
As explained above by Jeff, this is intentional rpm behavior wrt unversioned
provides and not a bug.
Comment 3 Andreas Rogge 2007-07-23 04:51:54 EDT
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 05:31:42 EDT
Yup, see bug #249135. 

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