Description of problem: There are two bugs, which can combine to make yum-langpacks rm most of the system (and, yes, I introduced both of them). 1. We catch obsoletes as well as removals with: elif member.ts_state in ('e', None): remove_deps_from_ts(conduit, po) ...but "None" is that state for "obsoleted" _and_ "updated". So any updated package can try and remove all it's languages. 2. remove_deps_from_ts() is done via: for pkg in yb.rpmdb.returnPackages(patterns=pkgmatches): yb.remove(pattern=pkg.name) ...except pkgmatches will == [] _if_ LANG=C, and due to weird back compat. behaviour rpmdb.returnPackages(patterns=[]) returns all the packages on the system. For F-13 just fix #1 by just checking for == 'e' again, and ignore obsoleted for now. Again, for F-13 #2 needs an: if not pkgmatches: return
I haven't tested an F-13 box with langpacks yet (I can do that later tonight if nobody else gets around to it) ... but following the code, I'm pretty sure it can happen. Someone just try updating openoffice-core in F-13, with LANG=C.
99.999% confirmed this on an F-13 box: % sudo yum install yum-langpacks [...] % sudo yum downgrade openoffice.org --releasever=12 [...] Dep fails. % LANG=C sudo yum downgrade openoffice.org --releasever=12 [...] Wants to erase glibc etc.
Thanks James for the report. I would really appreciate patch please, though if not I will try to grok your comments as best I can.
(I am not really convinced that this is a blocker though given that yum-langpacks is not installed by default in F13, but sure let's fix it. You're also more than welcome to commit the fix.:)
Well I'm pretty sure this is what deleted Jim Meyering's box: http://lists.fedoraproject.org/pipermail/devel/2010-April/135037.html ...so it seemed kind of important ;). I have F-13 changes ready to go, as soon as I get ACLs to commit.
Created attachment 408836 [details] Fix the problems with langpacks deleting systems. Here is the patch, in case you want to do it yourself.
yum-langpacks-0.1.5-2.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/yum-langpacks-0.1.5-2.fc13
*** Bug 584997 has been marked as a duplicate of this bug. ***
Thank you very much, James. Appreciate your assistance. I didn't realise what a dangerous business I was getting into. :(
yum-langpacks-0.1.5-2.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update yum-langpacks'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/yum-langpacks-0.1.5-2.fc13
Thanks for the fix, James, and for the heads-up, Seth. I confirm that LC_ALL=C is often set in my environment (in which case, LANG is not set at all).
This needs to be tested ASAP to get in for final. I will try and test it later tonight using the reproduction steps listed above, but any help would obviously be appreciated :) -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
Can't find a reproducer for the actual bug with the current package set, but the updated yum-langpacks installs correctly and does what it's meant to do. -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
can the update please be submitted to stable ASAP? it has sufficient karma. thanks!
yum-langpacks-0.1.5-2.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.