Bug 443743 - Pirut should never try to uninstall itself
Pirut should never try to uninstall itself
Product: Fedora
Classification: Fedora
Component: pirut (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Jeremy Katz
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-04-22 23:56 EDT by Joe Krahn
Modified: 2008-08-02 19:40 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-28 15:44:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joe Krahn 2008-04-22 23:56:24 EDT
Description of problem:
I tried remove a single package, libsmbios-libs, in order to install my own
newer version. This actually resulted in a cascade of removals from
dependencies, including pirut itself and many other important tools. That is
surprising given that smbios is specific to Dell, so I was not being careful
enough to check the dependency report. To my surprise, pirut tried to uninstall
itself and crashed. Even though it crashed, I was able to read the yum log and
re-install those packages with no errors.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Run pirut.
2. Select to remove "libsmbios-libs-0.13.13-1.fc8"
3. Carelessly click continue without reading the list of packages to be removed
due to dependencies.
Actual results:
pirut crashes.

Expected results:
pirut should say "Sorry, I can't uninstall myself!" instead of proceeding with
my dumb request.

Additional info:
RPM packages probably should include some flags for important core packages that
should trigger an extra level of warning, and refuse to uninstall itself or it's
own dependencies. For example, see bug 441704, where removing virtualization can
actually remove all kernels on the system. Fedora already has a list of core
packages somewhere. Pirut (and maybe other RPM/Yum tools) could give an extra
warning about "These packages are important system packages. Are you sure you
want to continue?"
Comment 1 Joe Krahn 2008-04-23 12:11:10 EDT
Suggestion: It would be nice to have some sort of "undo" feature. However, I
just found this post that shows yum has no plans for this, suggesting that this
sort of thing really should be implemented as an RPM feature:

However, I think it would not be too hard to make a mostly-working system. For
each erased package, the matching RPM could be saved in the "undo" directory,
along with any modified files found with "rpm --verify". Installed RPMS would
just need a list. An undo would then be fairly easy, excluding side-effects from
scripts. Maybe the rollback stuff in up2date already does most of this.
Long-term, it would be nice if RPM incorporated a standard rollback/changelog
Comment 2 Jeremy Katz 2008-04-23 23:43:54 EDT
What version of pirut did you have installed?  There should be an extra level of
warning to stop you from doing so in recent versions.
Comment 3 Jeremy Katz 2008-05-28 15:44:45 EDT
Closing due to inactivity; please reopen if you have further information to add
to this report

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