Red Hat Bugzilla – Bug 471078
weird desolve bug when updating PackageKit
Last modified: 2014-01-21 18:06:46 EST
Created attachment 323193 [details]
debug output (yum -d9 ... )
Description of problem:
I tryed to update PackageKit on F-9 using yum localinstall. For this I downloaded:
but yum failed with:
PackageKit-libs-0.2.5-1.fc9.x86_64 from installed has depsolving problems
--> Missing Dependency: PackageKit = 0.2.5-1.fc9 is needed by package PackageKit-libs-0.2.5-1.fc9.x86_64 (installed)
Error: Missing Dependency: PackageKit = 0.2.5-1.fc9 is needed by package PackageKit-libs-0.2.5-1.fc9.x86_64 (installed)
Which is odd because I don't understand why it wants to install the deps for PackageKit-0.2.5 which is being (should be) removed in this transaction (replaced by the newer version).
This are the related packages installed on my system:
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. download the packages
2. try to install them using yum localinstall
I tryed with this commit/patch: http://yum.baseurl.org/gitweb?p=yum.git;a=blobdiff;f=yum/__init__.py;h=316d11ebee932ff08497e3b07a7fa876797e2bc2;hp=dcf1654922725329e8a349d337fde27258b53a9f;hb=563f25f55324691a76d120d666c7055f74504284;hpb=b8662f1bdc87863095d25505461e57961f23bd21 as suggested on IRC but it did not help.
Since there isn't a repository available with these packages and you are using "yum localinstall" from direct koji downloads, it can't handle obsoletes properly. Use "rpm -Uvh" instead of "yum localinstall" and it works fine.
I wonder if the "localinstall" doesn't check for obsoletes like "localupdate" might? What is the difference between the two? I tried "localupdate" and that failed since it refuses to install local new packages--it will only update packages you already have installed.
localinstall is not atomic ... each local package can't have deps. on any not seen yet pacakges. You have a couple of options:
1. Install yum-tmprepo and use that on the local dir.
2. Put the pkgs in the "correct" order so the deps. are satisfied.
3. Wait a day and install them from the updates-testing F9 repo.
4. Use rpm -Fvh *.rpm
...we might make localinstall atomic eventaully ... but it's non-trivial, and tmprepo works fine.
(In reply to comment #3)
> localinstall is not atomic ... each local package can't have deps. on any not
> seen yet pacakges. You have a couple of options:
> 1. Install yum-tmprepo and use that on the local dir.
> 2. Put the pkgs in the "correct" order so the deps. are satisfied.
> 3. Wait a day and install them from the updates-testing F9 repo.
> 4. Use rpm -Fvh *.rpm
> ...we might make localinstall atomic eventaully ... but it's non-trivial, and
> tmprepo works fine.
OK, I know that I can just use rpm, normally I always used yum localinstall for koji downloads and it worked.
But if it isn't supposed to work in this case its fine (but its confusing imho local packages shouldn't be any different than ones in the repos)
> but its confusing imho local packages shouldn't be any different than ones in the repos
They aren't different ... if you put all of the rpms but one into a repo. and then did the localinstall on the non-repo. one ... it'd act identically to if you had all the pkgs in a repo.
The problem is you have nothing in a repo. and do localinst a.rpm ... and a.rpm requires something that nothing provides (or removes something that other things depend on, with no way out for those pkgs), thus. it fails.
The only fix for this is to treat localinstall different from a normal install, by grouping all the pkgs into a single atomic unit and then trying to install that atomic unit at once (or, probably easier, putting them into a fake tmp. repo and then installing them). The later is what tmprepo does already, we can probably optimize it a bit by putting it into core for just the localinstall case (but requiring extra code/testing) ... but that's not at the top of the TODO list.