|
|
Subscribe / Log in / New account

Running outside the desktop session is not enough

Running outside the desktop session is not enough

Posted Oct 7, 2016 15:50 UTC (Fri) by AdamW (subscriber, #48457)
In reply to: Running outside the desktop session is not enough by gerdesj
Parent article: "dnf update" considered harmful

The main problem you get with dnf/rpm if a transaction dies halfway through is that the RPM database usually gets into a messy state where it thinks it has two versions of a lot of packages installed; this is because the way rpm actually handles updates is that it installs the new package first, then removes the old package, so these 'duplicates' will exist pretty much from the time of the first update to the time of the last removal, and if the process dies anywhere in that period, you get duplicates to clean up.

The system itself *usually* continues to work pretty much fine (there can be exceptions to this if the update process died at a particularly unfortunate point), but the RPM database mess is a problem because it can result in spurious errors and stuff when you subsequently try to install updates or new packages or anything.

There's a tool called `package-cleanup` in the yum-utils package which has a `--dupes` and a `--cleandupes` option that can help with the cleanup; some people say it's great, I personally didn't find it worked that well the first time I ran into this case, but YMMV. If that tool doesn't work, you wind up basically twiddling with the rpm query format to get a nice list of duplicated packages, then run 'rpm -e --justdb --noscripts' on the old versions, and 'dnf reinstall' on the new ones.

dnf could definitely do some things to help out with this whole area, and this bug has revitalized a few bug reports and things about that.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds