Bug 112825 - Can't create rpm dependent on particular kernel release
Can't create rpm dependent on particular kernel release
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-02 17:33 EST by Peter Fales
Modified: 2007-04-18 13:00 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-03 02:00:28 EST
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 Peter Fales 2004-01-02 17:33:22 EST
Description of problem:

I'm trying to create an rpm which can only be installed if the 
matching kernel version (including release is installed).  My spec
file contains:

    Requires:       kernel = 2.4.20-24.9

However, the "24.9" part seems to ignored.  I've traced this through
the source a bit, and it seems that what happens is when an installed
rpm has a provides that does not include a release, then the release
is also ignored in the package that is being installed.   According
to the command:

    # rpm -q --queryformat '[%{PROVIDENAME} %{PROVIDEVERSION}\n]\n'
kernel-2.4.20-27.9
    
    module-info 
    kernel 2.4.20
    kernel-drm 4.1.0
    kernel-drm 4.2.0
    kernel-drm 4.3.0
    kernel-drm 4.2.99.3
    kernel 2.4.20-27.9

the kernel rpm provides both "kernel 2.4.20" and "kernel 2.4.20-27.9"

When my rpm is installed, the first one it finds is "kernel 2.4.20" -
this causes it to ignore the "-24.9" in my rpm, and the rpm gets
installed even though the release doesn't match.  

This may be a bug in the packaging of kernel.  It seems to me that 
providing only "kernel 2.4.20-27.9" should be sufficient.  If a
package is being installed that only depends on 2.4.20, then it should
 match, and if it specifically needs 2.4.20-27.9, then that should
match also.   However, it seems surprising that this hasn't arisen
before, so perhaps there is some workaround in rpm I'm not aware of.


How reproducible:

Very

Steps to Reproduce:
1.  Create an rpm which includes
    Requires:       kernel = 2.4.20-24.9

2.  Install this package on kernel 2.4.20-27.9
  
Actual results:

Install completes



Expected results:

Install should fail due to kernel version mismatch

Additional info:
Comment 1 Jeff Johnson 2004-01-03 02:00:28 EST
Use a file, not a package, dependency.

For example
    Requires: /lib/modules/2.6.0-0.1.14
will be satisfied iff the kernel-2.6.0-0.1.14 package is installed.

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