[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] RFC [v3]: Make kernel upgrades via dnf work like on Red Hat
From:       "Zoltan Boszormenyi via lists.openembedded.org" <zboszor=pr.hu () lists ! openembedde
Date:       2021-09-30 14:14:42
Message-ID: 20210930141444.698139-1-zboszor () pr ! hu
[Download RAW message or body]

I have observed two issues when upgrading kernel versions
successively.

One is that when installonly_limit is reached in dnf, only the
main kernel package was removed. Patch 1 fixes this by adding
extra RDEPENDS to the kernel subpackages on the main kernel package.
This circular dependency helps package managers to remove all subpackages.
Only rpm packages was build tested, the dependencies are in place for
both 0 and 1 for KERNEL_SPLIT_MODULES. dnf upgrade is doing the
right thing now with removing all subpackages of the oldest
kernel version.

dnf.conf settings "installonlypkgs", "installonly_limit" and
others are documented at https://dnf.readthedocs.io/en/latest/conf_ref.html

The second issue is that when the oldest kernel version is
removed by dnf, the /boot/bzImage symlink is also gone.
It seems that with dnf, postrm of the old version is run later
than postinst of the new one.

Fix this by using update-alternatives instead of hardcoded ln -s
and rm -f. This is configurable via a new variable.

This is still an RFC.

1) The first fix is applied in both cases of KERNEL_SPLIT_MODULES=0 and 1.
   It's applied unconditionally.

2) The new knob name for patch #2 is KERNEL_IMAGEDEST_USE_UPDATE_ALTERNATIVES.
   It is admittedly too chatty, it can be renamed if someone suggests
   a better name.

2) There's an extra issue I found while implementing the second patch:
   even with moving generating the alternative priority value to
   a python function and using a non-expanded substitution, it's
   still expanded during early parsing. The result is thrown away
   so it doesn't cause basehash issues, but still, the function
   needs to protect itself against KERNEL_VERSION being unset.

Please comment.

Best regards,
Zoltán Böszörményi




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156497): https://lists.openembedded.org/g/openembedded-core/message/156497
Mute This Topic: https://lists.openembedded.org/mt/85974629/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic