Description of problem: After I do `sudo dnf reinstall kernel-desktop-5.8.1-2.mga8-1-1.mga8.x86_64` dracut fails and some of the package's contents are missing: [shlomif@telaviv1 ~]$ rpm -ql kernel-desktop-5.8.1-2.mga8-1-1.mga8 | perl -nlE 'say if ! -e' | head /lib/modules/5.8.1-desktop-2.mga8 /lib/modules/5.8.1-desktop-2.mga8/kernel /lib/modules/5.8.1-desktop-2.mga8/kernel/3rdparty /lib/modules/5.8.1-desktop-2.mga8/kernel/3rdparty/rtl8821ce /lib/modules/5.8.1-desktop-2.mga8/kernel/3rdparty/rtl8821ce/8821ce.ko.xz /lib/modules/5.8.1-desktop-2.mga8/kernel/3rdparty/viahss /lib/modules/5.8.1-desktop-2.mga8/kernel/3rdparty/viahss/viahss.ko.xz /lib/modules/5.8.1-desktop-2.mga8/kernel/arch /lib/modules/5.8.1-desktop-2.mga8/kernel/arch/x86 /lib/modules/5.8.1-desktop-2.mga8/kernel/arch/x86/crypto [shlomif@telaviv1 ~]$ It also happened during the initial install. /boot is mounted. Previous kernels were fine, and I removed dkms and virtualbox, and the problem still happens. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3.
Thanks for reporting this. Assigning to Kernel and Drivers maintainers. Seems to exist since kernel 5.8.0.
Assignee: bugsquad => kernelCC: (none) => ouaurelien
Severity: normal => majorTarget Milestone: --- => Mageia 8Priority: Normal => release_blocker
This is likely similar to https://bugzilla.redhat.com/show_bug.cgi?id=1200302 From redaing that bug it seems dnf reinstall asks rpm to do a reinstall operation rather than a remove + install, and this breaks some scriptlets with no generic way to fix them as rpm doesn't expose that properly to the scriptlets. I have failed to find documentation of what reinstall does at rpm level so I could not confirm if this is still true or if there is now a way to handle it properly. It seems all packages using conditionals on $1 in scriptlets will need to be reviewed before it is safe to use dnf reinstall on them.
CC: (none) => pterjan
Actually even if they don't use such conditional, there is no way when preun gets called to know if the current version will stay (reinstall) or be deleted (update).
Looks to be a duplicate of bug 26439 (also reported by Shlomi).
CC: (none) => mageia
While discussing on irc some idea came up, in postun files from the package would be already gone in the case of an upgrade and still there in case of reinstall, so we could check that. This doesn't work for preun but would help here.
I have committed something in svn which should make it safer.
(In reply to Martin Whitaker from comment #4) > Looks to be a duplicate of bug 26439 (also reported by Shlomi). I do think the same.(In reply to Pascal Terjan from comment #6) > I have committed something in svn which should make it safer. Status of the latter?
Priority: release_blocker => High
Summary: kernel's modules' directory "/lib/modules/5.8.1-desktop-2.mga" gets deleted during the package's installation (causing dracut to fail) => kernel's modules' directory "/lib/modules/5.8.1-desktop-2.mga" gets deleted during the package's re-installation (causing dracut to fail)
fixed
Status: NEW => RESOLVEDResolution: (none) => FIXED