Bug 150692

Summary: Rpm doesn't check kernel dependencies
Product: Red Hat Enterprise Linux 3 Reporter: Chris Feist <cfeist>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED NOTABUG QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: nobody+pnasrat
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-03-09 20:42:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Output from rpm -ivv GFS-modules-* none

Description Chris Feist 2005-03-09 19:00:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6)
Gecko/20050302 Firefox/1.0.1 Fedora/1.0.1-1.3.2

Description of problem:
I have a package (GFS-modules) which requires kernel = 2.4.21-29.EL

If I don't have that kernel installed rpm still happily attempts to
install GFS-modules and a scriptlet fails because it can't find the
kernel.

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

How reproducible:
Always

Steps to Reproduce:
1.  Get GFS & GFS-modules & perl-Net-Telnet
(http://porkchop.devel.redhat.com/dist/3.0E-gfs-U5/GFS/6.0.2.3-1/i686/GFS-6.0.2.3-1.i686.rpm
&
http://porkchop.devel.redhat.com/dist/3.0E-gfs-U5/GFS/6.0.2.3-1/i686/GFS-modules-6.0.2.3-1.i686.rpm
&
http://porkchop.devel.redhat.com/dist/3.0E-gfs-U2/perl-Net-Telnet/3.03-2/noarch/perl-Net-Telnet-3.03-2.noarch.rpm)

2.  install perl-Net-Telnet
3. Make sure you don't have kernel 2.4.21-29.EL installed
4. rpm -qp --requires GFS-modules-6.0.2.3-1.i686.rpm (to see that it
requires kernel = 2.4.21-29.EL)
5. Install GFS & GFS-modules

    

Actual Results:  Both GFS & GFS-modules install even though the
dependency is not met.

Expected Results:  Rpm should fail to install GFS-modules because the
proper kernel is not installed.

Additional info:

Comment 1 Jeff Johnson 2005-03-09 19:29:27 UTC
Can you attach -vv output from the install? I'm pretty sure
I know what the (packaging) problem is, but I need -vv output
to confirm before suggesting what to do.

Comment 2 Chris Feist 2005-03-09 19:38:24 UTC
Created attachment 111820 [details]
Output from rpm -ivv GFS-modules-*

Output from rpm -ivv GFS-modules-*

Comment 3 Jeff Johnson 2005-03-09 20:42:27 UTC
This line indicates that the dependency is met:
    D:  Requires: kernel = 2.4.21-29.EL       YES (db provides)
by an already installed package Provides:

What is happening is that the kernel has a
    Provides: kernel = 2.4.21
(Note the missing Release:)

Missing Release: in the provides is interpreted as
    All/any releases are provided.
which matches your Requires:

If you want *exactly* a kernel-2.4.21-29.EL package and
nothing else will do, then you will need to express your
Requires: differently.

The easiest expression is to add a file dependency, like
    Requires: /lib/modules/2.4.21-29.EL
or (alternatively)
    Requires: /boot/vmlinuz-2.4.21-29.EL