[ATrpms-devel] suspend2 kernel provides
Alexander Bergolth
leo at strike.wu-wien.ac.at
Tue May 16 11:43:47 CEST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi!
On 05/16/2006 02:17 AM, Axel Thimm wrote:
> On Mon, May 15, 2006 at 09:39:18PM +0200, Alexander Bergolth wrote:
>
>>>That's broken anyhow, because any kernel 2.6.16 will satify it. That's
>>>why kmdls don't rely on the kernel Provides. So your best bet is to
>>>remove that dependency from the specfile.
>>
>>If the kernel-module requires kernel =
>>2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8k, only a kernel with that
>>loong version-string (including ...cubbi_suspend2_8k) will satisfy the
>>dependency. Or am I missing something?
>
> Any 2.6.16 kernel will satisfy it. It's a surprise at first, then you
> bugzilla it only to find out that dozens of surprised folks have
> bugzilla'd it before you and due to legacy reasons this won't
> change. Just try it, install along a non-swsusp2 kernel and suddenly
> the openafs package will be (falsely) happy.
Thanks for the pointer.
But it looks like this behavior isn't caused by the kmdl but by the
kernel package itself:
The problem seems to be an additional
Provides: kernel = 2.6.16
(without release-tag), as this seems to cause a general capability for
2.6.16-<anyrelease> and renders an additional
Provides: kernel = 2.6.16-<thisrelease>
effectless.
I just built a test package named rpmtest-module that requires
rpmtest-1-1_1 but installed a package named rpmtest-1-1:
# rpm -q --provides rpmtest
rpmtest = 1-1
# rpm -qp --requires rpmtest-module-1-1_1.i386.rpm |grep rpmtest
rpmtest = 1-1_1
# rpm -ivh rpmtest-module-1-1_1.i386.rpm
error: Failed dependencies:
rpmtest = 1-1_1 is needed by rpmtest-module-1-1_1.i386
Since rpmtest provides only "rpmtest = 1-1" (including the
release-string) and not "rpmtest = 1", the exact dependency (including
the release-string) is checked.
So if the kernel packages only provided the exact "<version>-<release>"
capability, dependency checking would work, right?
See
http://distro.conectiva.com.br/pipermail/apt-rpm/2003-August/001951.html
> Up to date no RHL/FC/RHEL kernel ever provided sensible "kernel"
> entities to depend upon. Anything depending on that is really broken
> (although you can argue that the breakage stems from the vendor, but
> it's broken nevertheless, and won't be fixed at vendor level, so one
> better drops this approach).
Hmm.
>>I did mean the name of the _capability_ that it provides, not the name
>>of the rpm. If you only add
>>Provides: kernel = 2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8k
>>instead of
>>Provides: kernel-suspend2 = 2.6.16-1.2111_1.99.rhfc5.cubbi_suspend2_8k
>>but still name the RPM kernel-suspend2-..., the package won't be
>>considered as
>>an upgrade, will it??? (At last unless the second package defines an
>>obsoletes-tag.)
>
> It will even w/o. This is a known and ugly bug that has been declared
> a feature. It breaks already at rpm level:
>
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130352
>
> Bottom line: A virtual Provides is as good as naming the package such,
> e.g. it contains an implicit Obsolete.
>
>>I did some basic tests to verify my assertion, at least apt and smart
>>will not suggest to upgrade a package if there is another one with a
>>different name that provides a higher version of the same capability:
>
> Try rpm -Uhv ...
>
> and you will see that the original package will be removed under your
> nose. rpm magic ... ;)
Not on my system:
# rpm -Uvh rpmtest-alternative-2-1.i386.rpm
Preparing... ###########################################
[100%]
1:rpmtest-alternative ###########################################
[100%]
# rpm -qa rpmtest"*"
rpmtest-1-1
rpmtest-alternative-2-1
(It shows the same behavior if the rpmtest-alternative package has
version 1-2.)
But the reason for that is explained above...
>>$ rpm -qp --provides rpmtest-1-1.i386.rpm
>>rpmtest = 1-1
>>$ rpm -qp --provides rpmtest-alternative-2-1.i386.rpm
>>rpmtest = 2-1
>>rpmtest-alternative = 2-1
>>
>>If rpmtest-1-1 is installed, apt and smart won't consider
>>rpmtest-alternative as an upgrade even though it provides a higher
>>version of the same capability.
>
> But when you ask them to install it, suddenly rpmtest vanishes w/o any
> notice. Imagine this happening with the kernel :)
Of course I had to reproduce this. ;)
smart and apt-get don't remove the rpmtest package:
After
apt-get install rpmtest-alternative
both packages are installed.
# rpm -qa "rpmtest*"
rpmtest-1-1
rpmtest-alternative-2-1
The same applies to "smart install rpmtest-alternative".
>>>>I believe there should be at least an additional
>>>>Provides: kernel = %{suspend2version}
>>>>... to avoid having to rewrite all third party spec-files...
>>>
>>>Only the broken specfiles :)
>>
>>No, that's unfair. You cannot expect a third party rpm-packager to know
>>that you are building _kernel_-rpms that provide kernel-suspend2 instead
>>of kernel.
>
> I hope you concur with me, that depending on "kernel" is really
> severely broken?
I agree partly. ;)
But only because of the way the provides are specifies in current kernel
packages.
>>I'd really like to do that but I don't believe it is the right way to
>>modify every third party src-rpm (if it's not really necessary).
>
> It really is. And I guess that probably only openafs and a couple
> other rpms have this idiom.
Hmm...
> To be honest: That kernel-suspend2 didn't export a kernel = provides
> was an accident. But looking back, I'm rather glad it doesn't as it
> only covers over broken dependencies. What you are after is really
> fixing openafs' dependencies, and doing that by exporting "kernel" is
> really broken.
Again I only agree partly. ;)
I claim that if kernel-suspend2 would provide only "kernel =
<version>-<<release>" but not "kernel = <version>", things would work a
lot better.
>>Then I'm using the following "bridging"-rpm to satisfy the
>>dependency:
>
> ATrpms and PlanetCCRMA had bridging rpms once :)
> But they didn't help much. Instead rewriting the dependencies not to
> depend on any "kernel" Provides was the right answer in the long run.
You still haven't convinced me yet. But thanks for trying! :)
Cheers,
- --leo
- --
- -----------------------------------------------------------------------
Alexander.Bergolth at wu-wien.ac.at Fax: +43-1-31336-906050
Zentrum fuer Informatikdienste - Wirtschaftsuniversitaet Wien - Austria
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFEaZ7TsYaksEkoAQMRAiIUAJ9s1llKyXOH/raj32hU1kckUBZSqQCbB583
Q3BMUPmQ+4VWBImwOG7dCpo=
=IcWR
-----END PGP SIGNATURE-----
More information about the atrpms-devel
mailing list