Bug 1288190 - system_upgrade plugin is unable to load
system_upgrade plugin is unable to load
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: dnf-plugin-system-upgrade (Show other bugs)
25
All Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Will Woods
Fedora Extras Quality Assurance
: Reopened, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-03 14:10 EST by Tomas Straupis
Modified: 2017-12-08 11:31 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-12-08 07:26:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Straupis 2015-12-03 14:10:17 EST
Description of problem:

dnf is unable to load system_upgrade plugin (and therefore it is not possible to upgrade 22->23).
dnf.log says:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/dnf/plugin.py", line 124, in import_modules
    module = importlib.import_module(name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/system_upgrade.py", line 37, in <module>
    t = gettext.translation(TEXTDOMAIN, fallback=True)
  File "/usr/lib/python2.7/gettext.py", line 483, in translation
    t = _translations.setdefault(key, class_(fp))
  File "/usr/lib/python2.7/gettext.py", line 182, in __init__
    self._parse(fp)
  File "/usr/lib/python2.7/gettext.py", line 320, in _parse
    self.plural = c2py(plural)
  File "/usr/lib/python2.7/gettext.py", line 95, in c2py
    raise ValueError, 'plural forms expression could be dangerous'
ValueError: plural forms expression could be dangerous

This happens with the locale lt_LT. As far as I can see gettext.py fetches plural form expression for Lithuanian language and for some reason decides that it is "dangerous" and therefore raises an exception.

If I change my locale to say en_US and reboot my machine, system_upgrade plugin loads successfully.


Version-Release number of selected component (if applicable):

both fedora 22 and 23. Bug on 22 means that it is not possible to upgrade unless I change locale during upgrade.

How reproducible:

Always (with locale lt_LT)

Steps to Reproduce:
1. change locale to lt_LT
2. reboot
3. run anything with dnf, for example "dnf info blabla"

Actual results:

Unable to load plugin: system_upgrade

Expected results:

system_upgrade plugin is loaded without error message.

Additional info:

Workaround - change locale to some locale with a simple plural rules.
Comment 1 Fedora Admin XMLRPC Client 2016-07-08 05:33:36 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 2 Fedora End Of Life 2016-07-19 14:33:50 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 3 Tomas Straupis 2016-07-19 15:11:53 EDT
Yes, this bug is still reproducible on Fedora 23. So it is still only possible to upgrade to next version after changing locale from Lithuanian to say US.

With system_upgrade plugin installed and Lithuanian locale set, I always got an error message about not being able to load "system_upgrade" plugin upon running any dnf command, during work on Fedora 22, then on Fedora 23. So I'm pretty sure this bug is still valid.
Comment 4 Igor Gnatenko 2016-07-21 11:55:06 EDT
not bug in DNF.
Comment 5 Will Woods 2016-07-21 16:36:40 EDT
Well, lt.po says:

  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 or n%100>=20) ? 1 : 2)\n"
  "X-Generator: Zanata 3.7.3\n"

So it seems the Zanata-provided boilerplate for Lithuanian isn't compatible with python's gettext module. Alas.

This is probably the same root cause as in bug 1283599 (and bug 1334960); the fix there was to change the "or" to "||". That should work here as well, although I'm not certain how to get that change pushed back up to the Zanata server.
Comment 6 Fedora End Of Life 2016-11-24 08:56:58 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

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

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is 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  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

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.
Comment 7 Tomas Straupis 2016-11-24 09:08:55 EST
The same problem is in Fedora 25.
Comment 8 Fedora End Of Life 2017-11-16 14:07:47 EST
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

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

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is 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  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

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.
Comment 9 Jaroslav Mracek 2017-12-08 07:26:36 EST
I believe that the issue was solved in python3-dnf-plugin-system-upgrade that replace original plugin in version 2.0.4 that is available for Fedora 26+. Please if the problem persists with latest version, please don't hesitate to reopen the bug report.
Comment 10 Tomas Straupis 2017-12-08 11:31:07 EST
Yes, I do not see this issue anymore on Fedora 26.

Note You need to log in before you can comment on or make changes to this bug.