https://bugzilla.redhat.com/show_bug.cgi?id=1164041
Bug ID: 1164041
Summary: Erasing one version of duplicate autocorr-en tries to
erase the others
Product: Fedora
Version: 20
Component: yum-langpacks
Assignee: pnemade(a)redhat.com
Reporter: matt(a)mattmccutchen.net
QA Contact: extras-qa(a)fedoraproject.org
CC: i18n-bugs(a)lists.fedoraproject.org,
james.antill(a)redhat.com, notting(a)splat.cc,
petersen(a)redhat.com, pnemade(a)redhat.com
Description of problem:
My machine crashed in the middle of a yum transaction that included an update
of the autocorr-en package and was left with two versions (really, releases)
installed:
autocorr-en-4.2.7.2-1.fc20.noarch
autocorr-en-4.2.7.2-4.fc20.noarch
When I ran yum-complete-transaction, it tried to do the erase of
autocorr-en-4.2.7.2-1.fc20.noarch. Since autocorr-en is configured as a
conditional package on itself, the code path at
https://git.fedorahosted.org/cgit/yum-langpacks.git/tree/langpacks.py#n489
tried to erase _all_ versions of autocorr-en. In my case, this led to broken
dependencies and the transaction failed; it's conceivable that in other cases,
the dependent packages would simply be automatically erased.
AFAIK, the only way this could happen to a normal user is via a system crash,
but I was able to reproduce it by manually reinstalling the old version with
"rpm -i --oldpackage --replacefiles autocorr-en-4.2.7.2-1.fc20.noarch.rpm" and
then running "yum erase autocorr-en-4.2.7.2-1.fc20.noarch".
Note, not all pairs of autocorr-en versions reproduce the problem. For
instance, I tried autocorr-en-4.1.3.2-9.fc20 in combination with
autocorr-en-4.2.7.2-4.fc20.noarch and did not reproduce the problem. This
appears to be because:
- First the package we originally wanted to erase is added to the transaction
set.
- Then the langpacks plugin calls yb.remove(pattern='autocorr-en') (
https://git.fedorahosted.org/cgit/yum-langpacks.git/tree/langpacks.py#n390 ),
multiple times in fact. This method uses matchPackageNames, which returns the
matching RPMInstalledPackage objects in Python set iteration order via
misc.unique. The calls to yb.remove(pattern='autocorr-en') get into a cycle in
which each time the originally requested package is processed, the code at
http://yum.baseurl.org/gitweb?p=yum.git;a=blob;f=yum/__init__.py;h=6d2c07...
clears the transaction set and then adds back that package. Other packages are
simply added to the transaction set when they are processed.
- So at the end, the originally requested package and any that came _after_ it
in the iteration order are the ones that are left in the transaction set to be
erased.
Version-Release number of selected component (if applicable):
yum-langpacks-0.4.3-1.fc20.noarch
How reproducible:
Always
Steps to Reproduce:
1. Have autocorr-en-4.2.7.2-4.fc20.noarch installed.
2. wget
https://kojipkgs.fedoraproject.org//packages/libreoffice/4.2.7.2/1.fc20/n...
3. rpm -ivh --oldpackage --replacefiles autocorr-en-4.2.7.2-1.fc20.noarch.rpm
4. yum erase autocorr-en-4.2.7.2-1.fc20.noarch
Actual results:
Yum wants to erase all versions of autocorr-en and dependent packages.
Expected results:
Only the specified version is erased.
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug
https://bugzilla.redhat.com/token.cgi?t=q1L1RyBkYc&a=cc_unsubscribe