| Summary: | urpme --auto-orphans would remove the current kernel if a newer is installed | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | GG HH <boulshet> |
| Component: | RPM Packages | Assignee: | Thierry Vignaud <thierry.vignaud> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | boulshet, jeanmichel.varvou, mageia, marcounet |
| Version: | Cauldron | ||
| Target Milestone: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | urpmi-8.131-1.mga9.src.rpm | CVE: | |
| Status comment: | |||
| Attachments: | Testcase with 8 installed kernels | ||
|
GG HH
2023-04-14 21:24:18 CEST
CC:
(none) =>
boulshet [marco@localhost ~]$ uname -r 6.2.10-desktop-2.mga9 [root@localhost ~]# rpm -q -a |grep kernel-desktop|sort kernel-desktop-6.2.10-1.mga9 kernel-desktop-6.2.10-2.mga9 kernel-desktop-6.2.8-1.mga9 kernel-desktop-latest-6.2.10-2.mga9 (paquetages orphelins) kernel-desktop-6.2.10-1.mga9.x86_64 kernel-desktop-6.2.10-2.mga9.x86_64 kernel-desktop-6.2.8-1.mga9.x86_64 Supprimer 3 paquetages ? (o/N) CC:
(none) =>
marcounet Thank you for the reports. @GG HH Can we take it that this problem is new since the recent urpmi update you note? Assuming this to be the case, assigning to tv who did that. I have never before seen a kernel in a "urpme --auto-orphans" list; this must be special to more than 1 version of the same kernel. As an aside, old kernel removal is now best done with our new 'remove-old-kernels' package. Assignee:
bugsquad =>
thierry.vignaud Hi Lewis, before this update, the running kernel was not removed by urpme --auto-orphans. It looks sensible as the last kernel could be failing to boot and this situation may be a bit tricky to cope with for an average user. The use case is: - upgrade the packages, a kernel upgrade is part of the update - remove deprecated versions. with this update, the running kernel is remmoved. - reboot the only available kernel is the new one. It may not boot. if so no fallback is available. More over, i assume that modules which would not be already loaded would not be available until reboot. Reading marc answer : it looks like actually all installed kernel would be removed - urpme line is probably missing. Strange. I do not have rebooted my self. Regards Created attachment 13767 [details]
Testcase with 8 installed kernels
There is no risk that a kernel get removed. I did a intense testcase with an cauldron Virtualbox installation with 8 installed kernels. But the output of "urpme --auto-orphans" is misleading and may confuse new unexperienced users.
Short testcase summary:
- update cauldron (latest kernel-desktop-6.2.11-1.mga9.x86_64 gets installed)
- NO restart of computer
- "uname -r" shows still 6.2.10-desktop-2.mga9 as active
- "rpm -q -a |grep kernel-desktop|sort" shows 8 installed kernels
- "urpme --auto-orphans" lists ALL kernels to remove (with many other pcks as it is a grown VB installation)
- let "urpme --auto-orphans" remove ALL packages including ALL kernels
- restart computer
- "uname -r" shows now 6.2.11-desktop-1.mga9 as active
- "rpm -q -a |grep kernel-desktop|sort" shows still all 8 kernels installed
- "urpme --auto-orphans" does no longer list any kernels to remove
As "urpme --auto-orphans" is no longer capable of removing kernels due to the new naming, it only "deletes" or clears the orphans list but doesn't uninstall any kernel. Kernel removal in MGA 9 is now automatically done by the new remove-old-kernels tool.
As the output is a little bit longer i attached the complete terminal output of the upper testcase as proof that there is no risk of loosing a kernel.
I have a problematic behavior similar to the one described by Thierry. I installed mageia 9 via a net installation. [root@localhost ~]# rpm -qa |grep -E "kernel|dkms" kernel-firmware-20230210-1.mga9 kernel-desktop-6.2.10-2.mga9 kernel-firmware-nonfree-20230406-1.mga9.nonfree remove-old-kernels-0.99.21.6-1.mga9 dkms-minimal-2.0.19-45.mga9 kernel-desktop-devel-6.2.10-2.mga9 dkms-2.0.19-45.mga9 dkms-nvidia-current-525.105.17-1.mga9.nonfree kernel-desktop-6.2.11-1.mga9 kernel-desktop-devel-6.2.11-1.mga9 kernel-desktop-latest-6.2.11-1.mga9 kernel-userspace-headers-6.2.11-1.mga9 [root@localhost ~]# urpme --auto-orphans Pour satisfaire les dépendances, les 3 paquetages suivants vont être désinstallés (108Mo): (paquetages orphelins) kernel-desktop-devel-6.2.10-2.mga9.x86_64 kernel-desktop-devel-6.2.11-1.mga9.x86_64 lib64pulsecore16.1-16.1-14.mga9.x86_64 Supprimer 3 paquetages ? (o/N) The removal of kernel-desktop-devel is problematic as it is used for dkms for the proprietary driver nvidia....Unless headers are enough, but I haven't had this behavior historically since I've been using mageia. CC:
(none) =>
jeanmichel.varvou # LANG=C urpme --auto-orphans writing /var/lib/rpm/installed-through-deps.list To satisfy dependencies, the following package will be removed (87MB): (orphan package) kernel-desktop-6.2.10-1.mga9.x86_64 Remove 1 package? (y/N) n imho _this_ is not just confusing for new unexperienced users. It is plain wrong if it does not what it says it will. Regards. # urpmq -ir --auto-orphans kernel-desktop-6.3.1-1.mga9 # rpm -q --requires kernel-desktop-latest kernel-desktop-6.3.1-1.mga9 rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(PayloadIsZstd) <= 5.4.18-1 @Lewis Smith : do you need additional info about this issue ? *** Bug 33181 has been marked as a duplicate of this bug. *** |
# rpm -q -a |grep kernel-desktop|sort kernel-desktop-6.2.10-1.mga9 kernel-desktop-6.2.10-2.mga9 kernel-desktop-devel-6.2.10-1.mga9 kernel-desktop-devel-6.2.10-2.mga9 kernel-desktop-latest-6.2.10-2.mga9 # uname -a Linux uranus 6.2.10-desktop-1.mga9 #1 SMP PREEMPT_DYNAMIC Thu Apr 6 18:57:48 UTC 2023 x86_64 GNU/Linux # LANG=C urpme --auto-orphans writing /var/lib/rpm/installed-through-deps.list To satisfy dependencies, the following package will be removed (87MB): (orphan package) kernel-desktop-6.2.10-1.mga9.x86_64 Remove 1 package? (y/N) n # rpm -q --changelog urpmi * jeu. avril 13 2023 tv <tv> 8.131-1.mga9 + Revision: 1952885 - urpmi: o Fix --auto-orphans vs new kernel naming (having multuple "kernel" pkgs with different versions)