Update systemd-rpm-macros

I have a borked upgrade from F40 to F41. It went unnoticed until I started having random reboots. Now I am at a point where I annot run

sudo dnf update

because the system refuses to update systemd-rpm-macros, which is in use by systemd. The one in use is from F40.

Check the output:

sudo dnf distro-sync --refresh --allowerasing --releasever=41

I currently don’t have a graphic environment, but what I get are 288 packages to download and then

Transaction failed: Rpm transaction failed.
 - (systemd-rpm-macros = 256.7-1.fc41 if rpm-build) is needed by (installed) systemd-256.7-1.fc41.x8_64

Boot a live session and mount your filesystems as explained here:
The GRUB2 Bootloader – Installation and Configuration :: Fedora Docs

Then repeat the above command adding this option:

sudo dnf ... --installroot=/mnt

Problem persists after chroot.

Also:

- installing package mactel-boot-0.9-33.fc41.x86_64 needs 4KB more space on the /boot/efi filesystem

OK, now I need to unmount bind all the things…

I’m getting the same message. Rpm transaction failed, etc.

I mounted /proc, /dev, /sys, /run. I don’t think I should have those mounted, just /mnt.

Try excluding the problematic packages:

sudo dnf ... --exclude=systemd\*

Then remove duplicates if any:

sudo dnf reinstall \
    $(sudo dnf rq \
        --duplicates \
        --latest-limit=1 \
        --qf="%{name}\n" \
        --installroot=/mnt) \
    --allowerasing \
    --releasever=41 \
    --installroot=/mnt

Remove and reinstall the problematic packages:

sudo rpm -e \
    --nodeps \
    --root /mnt \
    systemd-rpm-macros
sudo dnf install systemd-rpm-macros \
    --releasever=41 \
    --installroot=/mnt

If the problem persists, add more flags:

sudo rpm -e \
    --nodeps \
    --noscripts \
    --justdb \
    --root /mnt \
    systemd-rpm-macros

See also:
How do I recover an unbootable Fedora Workstation system? - #8 by vgaetera

2 Likes

That definitely unblocked it. Once it stops I’ll see if there’s something left to do before I close this issue, thanks!

Non-critical error in post-transaction scriptlet: kernel-core ...
Scriptlet output:
Failed to get block device path for 259:2: Function not implemented

I’ll reboot and see what I get.

Thank to the reinstall command I got past systemd-rpm-macros! OK, now I just need to get my graphic environment back. I’m being sent to the console at boot.

OK, it i back! I followed this other thread.