]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: avoid installonly-related kernel upgrade failure
authorNick Alcock <nick.alcock@oracle.com>
Wed, 14 Oct 2015 12:55:07 +0000 (13:55 +0100)
committerKris Van Hees <kris.van.hees@oracle.com>
Fri, 20 Nov 2015 09:56:26 +0000 (04:56 -0500)
commit4d2c4566aad24982c24e6c3aeddee302ff894d34
treeaaaaa80c8b36a215183df13d4b05779428c3e13e
parent20492dfd41f6586db3cae23b28dc485c0179c94a
dtrace: avoid installonly-related kernel upgrade failure

The dtrace modules packages have long depended on their associated kernel, in
order to cause them to be removed when the associated kernel is removed. It
turns out that the installonly feature (which forces installation of kernel
packages and removal of old ones rather than upgrades on 'yum upgrade') fails to
cope with this situation: you get a broken-packages notice rather than a removal
of the dependent package.

So remove the dependency, and instead install an at job from a %postun trigger
that removes old modules a little later. If this hits the rpm lock, it will fail
and leave modules around; if the kernel is later reinstalled, it will remove a
module that has a corresponding kernel still installed. However, both of these
cases are harmless: the first case is expected to be extremely rare (you'd have
to be, by chance, doing an rpm run precisely four hours after the upgrade that
removed the old kernel) and has no negative consequences but the loss of a bit
of disk space to a useless kernel module; the second case is harmless because
the next dtrace run against that kernel will reinstall the module anyway.

Orabug: 21669543
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Acked-by: Kris Van Hees <kris.van.hees@oracle.com>
dtrace/dtrace-module-OL6.spec
dtrace/dtrace-module-OL7.spec