Bug 443743 - Pirut should never try to uninstall itself
Summary: Pirut should never try to uninstall itself
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pirut
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-04-23 03:56 UTC by Joe Krahn
Modified: 2008-08-02 23:40 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-28 19:44:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Joe Krahn 2008-04-23 03:56:24 UTC
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):
1.3.28-1.fc8

How reproducible:
Always.

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 16:11:10 UTC
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:
https://lists.dulug.duke.edu/pipermail/yum/2008-April/010692.html

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
system.

Comment 2 Jeremy Katz 2008-04-24 03:43:54 UTC
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 19:44:45 UTC
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.