Bug 1288190 - system_upgrade plugin is unable to load
Summary: system_upgrade plugin is unable to load
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugin-system-upgrade
Version: 25
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Will Woods
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-03 19:10 UTC by Tomas Straupis
Modified: 2017-12-08 16:31 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-08 12:26:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomas Straupis 2015-12-03 19:10:17 UTC
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 09:33:36 UTC
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 18:33:50 UTC
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 19:11:53 UTC
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 15:55:06 UTC
not bug in DNF.

Comment 5 Will Woods 2016-07-21 20:36:40 UTC
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 13:56:58 UTC
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 14:08:55 UTC
The same problem is in Fedora 25.

Comment 8 Fedora End Of Life 2017-11-16 19:07:47 UTC
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 12:26:36 UTC
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 16:31:07 UTC
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.