Bug 725662

Summary: Give yum auto-repair capability
Product: [Fedora] Fedora Reporter: Martin Minar <mminar>
Component: yumAssignee: Fedora Packaging Toolset Team <packaging-team>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: 15CC: ffesti, james.antill, maxamillion, mkoci, pmatilai, slukasik, tla, zpavlas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-07 19:22:32 UTC Type: Enhancement
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Martin Minar 2011-07-26 08:32:45 UTC
Description of problem:
yum and yum-utils packages are able to locate problematic packages and/or missing dependencies, but correction must be done in manual manner.
It would be nice to have parameter in yum that would combine "yum check" and "yum reinstall" into one operation. For example apt on Debian have -f (--fix-problems) parameter.
For example see bellow...

Version-Release number of selected component (if applicable):
Fedora14, Fedora15... all yum

How reproducible:
Always

Steps to Reproduce:
1. When system contains some packages with broken dependences (for example when packages are installed with --skip-broken parameter)
  
Actual results:
[root@xyz ~]# yum check
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
nc-1.100-2.fc14.x86_64 has missing requires of libbsd.so.0()(64bit)
nc-1.100-2.fc14.x86_64 has missing requires of libbsd.so.0(LIBBSD_0.0)(64bit)
nc-1.100-2.fc14.x86_64 has missing requires of libbsd.so.0(LIBBSD_0.2)(64bit)
Error: check all
[root@xyz ~]# package-cleanup --problems
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Package nc-1.100-2.fc14.x86_64 requires libbsd.so.0()(64bit)
Package nc-1.100-2.fc14.x86_64 requires libbsd.so.0(LIBBSD_0.0)(64bit)
Package nc-1.100-2.fc14.x86_64 requires libbsd.so.0(LIBBSD_0.2)(64bit)

Solution for this problem is: yum reinstall nc-1.100-2.fc14.x86_64

Comment 1 Šimon Lukašík 2011-07-26 08:36:41 UTC
Hey, this would be a great feature. Giving +1.

Comment 2 Tim Lauridsen 2011-07-26 10:00:54 UTC
Yum will under normal conditions not let you break your system and --skip-broken will not let you install packages with broken dependencies, if does the opposite skipping packages with dependency problems to make it possible for your update your system with good updates, even if bad one exists in your repositories.

Trying to automatic solve these kind of problems are not so simple. And the most important thing is not to solve the problem, but to detect why the problem is occurred.

You can shoot yourself in the foot by doing stuff like 'rpm --force -nodeps', but that is your own problem :)

In my mind these kind of stuff don't belong in yum, the whole idea behind yum is solve the dependencies for you and drag in the stuff you need and bail out if it is not possible.

Comment 3 Šimon Lukašík 2011-07-26 11:37:52 UTC
Yes, if we are talking only about 'under normal conditions' then
I must agree. And don't think about yum as the only one package
manager on the system. There are also other pieces software issuing
rpm and yum libraries. For instance the Anaconda is able to get your
system to inconsistent state.

Comment 4 Tim Lauridsen 2011-07-26 15:13:52 UTC
(In reply to comment #3)
> Yes, if we are talking only about 'under normal conditions' then
> I must agree. And don't think about yum as the only one package
> manager on the system. There are also other pieces software issuing
> rpm and yum libraries. For instance the Anaconda is able to get your
> system to inconsistent state.

there is many way to break your system, but is not possible to some make some kind of magic command to fix all your troubles :)
Many problems can have multiple solution and is can be hard to select the right one. I the example above, remove the nc package could also be a solution, but that can lead to other problems.

Comment 5 Martin Minar 2011-07-27 06:23:10 UTC
(In reply to comment #4)
> there is many way to break your system, but is not possible to some make some
> kind of magic command to fix all your troubles :)
> Many problems can have multiple solution and is can be hard to select the right
> one. I the example above, remove the nc package could also be a solution, but
> that can lead to other problems.

Well, yum reinstall IS remove and then install again. That is why I proposed it.

Comment 6 Tim Lauridsen 2011-07-27 07:50:42 UTC
> Well, yum reinstall IS remove and then install again. That is why I proposed
> it.

Yes, but how should yum detect that the right solution is to reinstall the package.

Comment 7 Martin Minar 2011-07-27 08:34:30 UTC
(In reply to comment #6)

> Yes, but how should yum detect that the right solution is to reinstall the
> package.

What is your other option if you have missing requirement then try to (re)install it?

Anyway - as user (which I'm not, but let's assume I'm) I know only yum for installing packages. When I do yum check, I see the problem, but I'm not offered any solution.
There is not even written "you can try to reinstall it, you can try to search for missing package", etc. What this RFE is about is to offer user this option. "You can try to do 'yum try-fix-problems'."
It's up to programmer to put in some intelligence in decision how to solve the problem - all functionality should be in yum already - automation should be priority, but writing at least some guidance would be OK too.

Comment 8 Fedora Admin XMLRPC Client 2012-04-27 15:41:00 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 9 Fedora End Of Life 2012-08-07 19:22:37 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping