Re: SPEC File help, Requires not working as expected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 23 Jul 2007, Joshua M. Miller wrote:

Hello again,

I am working on defining dependencies for an RPM and having trouble getting the Requires portion to work. I have the following line in my SPEC file:

...
%define kernel 2.6.9-55.0.2.EL
...
Requires:	kernel = %{kernel}

When I run rpm -qpR <rpm> on this package, it prints out the dependency like I would expect:

[:user@host:] rpm -qpR <package>-0.2-1.i386.rpm
kernel = 2.6.9-55.0.2.EL
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1

...but I can then install the package without having the dependency met. Have I mis-used this value or missed something here? My host is running a kernel from an earlier version and does not have this kernel installed, yet I am able to install this package without issues.

I have tried changing the kernel version to 2.8.9 and that works by preventing the package install and enforcing the dependency so it looks like the Requires does not force checking beyond the first few version numbers. I have found nothing in the documentation that would suggest this limitation.

If you look at 'rpm -q --provides kernel' you'll find "kernel = 2.6.9" in there. Such a provide will satisfy any dependency where version is 2.6.9 regardless of the release, similarly to how "Provides: kernel" would satisfy any version and release. The provide on kernel version without a release is an old and rather unfortunate thing... at least it seems to be gone from current Fedora.

Now for the good news: there is a way around that. The kernel packages have plenty of files with the full version information, so instead of trying to require a package, require a versioned file. Eg
Requires: /boot/vmlinuz-2.6.9-55.0.2.EL

	- Panu -

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux