Bug 27101 - kernel's modules' directory "/lib/modules/5.8.1-desktop-2.mga" gets deleted during the package's installation (causing dracut to fail)
Summary: kernel's modules' directory "/lib/modules/5.8.1-desktop-2.mga" gets deleted d...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: release_blocker major
Target Milestone: Mageia 8
Assignee: Kernel and Drivers maintainers
QA Contact:
Depends on:
Reported: 2020-08-13 10:23 CEST by Shlomi Fish
Modified: 2020-08-13 22:26 CEST (History)
3 users (show)

See Also:
Source RPM: kernel-5.8.1-2.mga8.src.rpm
Status comment:


Description Shlomi Fish 2020-08-13 10:23:06 CEST
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
[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:
Comment 1 Aurelien Oudelet 2020-08-13 11:10:40 CEST
Thanks for reporting this.

Assigning to Kernel and Drivers maintainers.

Seems to exist since kernel 5.8.0.

CC: (none) => ouaurelien
Assignee: bugsquad => kernel

Aurelien Oudelet 2020-08-13 11:10:55 CEST

Target Milestone: --- => Mageia 8
Priority: Normal => release_blocker
Severity: normal => major

Comment 2 Pascal Terjan 2020-08-13 14:33:07 CEST
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

Comment 3 Pascal Terjan 2020-08-13 14:40:13 CEST
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).
Comment 4 Martin Whitaker 2020-08-13 15:28:55 CEST
Looks to be a duplicate of bug 26439 (also reported by Shlomi).

CC: (none) => mageia

Comment 5 Pascal Terjan 2020-08-13 15:35:20 CEST
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.
Comment 6 Pascal Terjan 2020-08-13 22:26:21 CEST
I have committed something in svn which should make it safer.

Note You need to log in before you can comment on or make changes to this bug.