Bug 112825 - Can't create rpm dependent on particular kernel release
Summary: Can't create rpm dependent on particular kernel release
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-02 22:33 UTC by Peter Fales
Modified: 2007-04-18 17:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-01-03 07:00:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Peter Fales 2004-01-02 22:33:22 UTC
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 07:00:28 UTC
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.