Bug 661278
Summary: | pirut traceback when updating package from RHN repo | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Miroslav Vadkerti <mvadkert> | ||||
Component: | pirut | Assignee: | James Antill <james.antill> | ||||
Status: | CLOSED ERRATA | QA Contact: | Red Hat Satellite QA List <satqe-list> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 5.6 | CC: | aalam, ankit, bkearney, ddumas, eng-i18n-bugs, eng-l10n-bugs, mhideo, petersen, rolf.kyburz, slukasik | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | pirut-1.3.28-19.el5 | Doc Type: | Bug Fix | ||||
Doc Text: |
Due to an error in the Slovak translation, working with a package that was signed with an unknown GPG key caused pirut to terminate unexpectedly with a traceback. This update corrects the Slovak translation, and pirut no longer crashes.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2011-01-13 23:51:44 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 640580 | ||||||
Attachments: |
|
Description
Miroslav Vadkerti
2010-12-08 11:58:19 UTC
The code is: sec = _("The package %s is signed with a key " "%s (0x%s) from %s. Would you like to " "import this key?") %(po, userid, hexkeyid, keyurl) ...which is asking the user about installing a GPG key, as the package does not verify with the known keys. The error from pyhton implies that there aren't four %s's (which there are in the above) ... looking through the translations I see a few problems: % fgrep 'The package' pirut-1.3.28/po/* -A 2 [...] -- pirut-1.3.28/po/mai.po:"The package %s is signed with a key %s (0x%s) from %s. Would you like to " pirut-1.3.28/po/mai.po-"import this key?" pirut-1.3.28/po/mai.po-msgstr "सँकुल %s हस्ताक्षरित अछि %s (0x%s) की कुंजी सँ. की अहाँ ई कुंजी आयात करना चाहब?" -- [...] pirut-1.3.28/po/ru.po:"The package %s is signed with a key %s (0x%s) from %s. Would you like to " pirut-1.3.28/po/ru.po-"import this key?" pirut-1.3.28/po/ru.po-msgstr "Пакет %s подписан ключом %s (0x%s). Нужно ли импортировать этот ключ?" -- [...] pirut-1.3.28/po/sl.po:"The package %s is signed with a key %s (0x%s) from %s. Would you like to " pirut-1.3.28/po/sl.po-"import this key?" pirut-1.3.28/po/sl.po-msgstr "Paket %s je podpisan s ključem iz %s (0x%s). Ali naj ga uvozim?" -- [...] pirut-1.3.28/po/zh_CN.po:"The package %s is signed with a key %s (0x%s) from %s. Would you like to " pirut-1.3.28/po/zh_CN.po-"import this key?" pirut-1.3.28/po/zh_CN.po-msgstr "软件包 %s 被来自 %s的 (0x%s) 密钥%s标注.您需要导入这个密钥吗?" -- pirut-1.3.28/po/zh_TW.po:"The package %s is signed with a key %s (0x%s) from %s. Would you like to " pirut-1.3.28/po/zh_TW.po-"import this key?" pirut-1.3.28/po/zh_TW.po-msgstr "套件 %s 是以來自 %s(0x%s)的金鑰所簽署。您要匯入這個金鑰嗎?" Adding "Translation" keyword and "eng-l10n-bugs" in the watch list. Hi, I have reviewed the problem described in the comment #0 and also checked the po files reported in comment #1 and found that there is no issue with translation or i18n here. Translation files (po files basically) are clean and error free. Please check the problem again and try to provide exact steps to reproduce it. Thanks! Ankit Ankit, are you saying the translation conatains 4 %s as it should, not 3 %s as reported in comment #1? The repro steps are provided in the description with 1 IMPORTANT addition: use localization, e.g. system->localization->language (In reply to comment #4) > Ankit, are you saying the translation conatains 4 %s as it should, not 3 %s as > reported in comment #1? Yes and No both. Below is the actual translation content I have grabbed from /cvs/dist/pirut/RHEL-5. If you check all the reported problematic files, zh_CN.po has already 4 %s where it should be, while rest of the languages has 3 %s. However, these language PO files (mai.po, sl.po, ru.po and zh_CN.po) has marked mentioned message as "Fuzzy", i.e. those message translations will not be used for generating an MO file and hence the message will appear in English itself. So, basically I do not see a problem, when - zh_CN already has correct number of %s (4 here) - rest of the languages where the problematic message is marked as fuzzy. hence this shouldn't be a translation problem. Thanks! Ankit *** pirut-1.3.28/po/mai.po *** #: ../pirut/__init__.py:563 #, fuzzy, python-format msgid "" "The package %s is signed with a key %s (0x%s) from %s. Would you like to " "import this key?" msgstr "सँकुल %s हस्ताक्षरित अछि %s (0x%s) की कुंजी सँ. की अहाँ ई कुंजी आयात करना चाहब?" *** pirut-1.3.28/po/ru.po *** #: ../pirut/__init__.py:563 #, fuzzy, python-format msgid "" "The package %s is signed with a key %s (0x%s) from %s. Would you like to " "import this key?" msgstr "Пакет %s подписан ключом %s (0x%s). Нужно ли импортировать этот ключ?" *** pirut-1.3.28/po/sl.po *** #: ../pirut/__init__.py:563 #, fuzzy, python-format msgid "" "The package %s is signed with a key %s (0x%s) from %s. Would you like to " "import this key?" msgstr "Paket %s je podpisan s ključem iz %s (0x%s). Ali naj ga uvozim?" *** pirut-1.3.28/po/zh_CN.po *** #: ../pirut/__init__.py:563 #, python-format msgid "" "The package %s is signed with a key %s (0x%s) from %s. Would you like to " "import this key?" msgstr "软件包 %s 被来自 %s的 (0x%s) 密钥%s标注.您需要导入这个密钥吗?" *** pirut-1.3.28/po/zh_TW.po *** #: ../pirut/__init__.py:563 #, fuzzy, python-format msgid "" "The package %s is signed with a key %s (0x%s) from %s. Would you like to " "import this key?" msgstr "套件 %s 是以來自 %s(0x%s)的金鑰所簽署。您要匯入這個金鑰嗎?" I just reproduced the problem without any issues with Slovak langauge. Exact repro steps: 1. Install RHEL5.6 via http (not the latest tree, e.g. 20101014) 2. rhn_register - successfuly register to RHN 3. system->localization->language and choose a language 4. logout and login to have localization enabled 5. ALT+F2 -> pup 6. Update packages With Slovak language I get a traceback. I will attach a screenshot. Important NOTE: Not all localizations are affected. For example Slovak is affected, but Hungarian is not. Created attachment 467964 [details]
pup traceback with slovak localization
Ankit, is Slovak localization marked as Fuzzy, if not it should be. (In reply to comment #9) > Ankit, is Slovak localization marked as Fuzzy, if not it should be. Sloval (sl.po) also has that particular message marked as Fuzzy. Ankit seems to be right, testing here (LANG=zh_CN): In [1]: from rhpl.translate import _, textdomain In [2]: textdomain('pirut') In [3]: _("The package %s is signed with a key %s (0x%s) from %s. Would you like to import this key?") Out[3]: '\xe8\xbd\xaf\xe4\xbb\xb6\xe5\x8c\x85 %s \xe8\xa2\xab\xe6\x9d\xa5\xe8\x87\xaa %s\xe7\x9a\x84 (0x%s) \xe5\xaf\x86\xe9\x92\xa5%s\xe6\xa0\x87\xe6\xb3\xa8.\xe6\x82\xa8\xe9\x9c\x80\xe8\xa6\x81\xe5\xaf\xbc\xe5\x85\xa5\xe8\xbf\x99\xe4\xb8\xaa\xe5\xaf\x86\xe9\x92\xa5\xe5\x90\x97?' ...but with LANG=sl I get: In [3]: _("The package %s is signed with a key %s (0x%s) from %s. Would you like to import this key?") Out[3]: 'The package %s is signed with a key %s (0x%s) from %s. Would you like to import this key?' ...Miroslav ... what version of pirut/python do you have? Also is it possible for you to edit around line 646 to find out what the message coming back from gettext is? (just print it and run from the console). Miroslav, can you do the test? If I try doing this here: 1. remove all installed gpg keys. 2. install old version of w3m. 3. run: LANG=sl.utf8 sudo pup ...then I get half translated text, and the "bad" text is in english (and doesn't cause a traceback). Dito. zh_TW.utf8 ... and zh_CN.utf8 shows "translated" text. This is on "normal" RHN RHEL-5 James, I apologize for the late answer. Slovak is actually sk locale not Slovenian sl. The latter works for me too. $ rpm -q pirut python pirut-1.3.28-17.el5 python-2.4.3-41.el5 Here is the output of my test, when pirut tracebacks: # LANG=sk.utf8 pup Loaded plugins: rhnplugin varovanie: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 37017186 Importing GPG key 0x37017186 "Red Hat, Inc. (release key) <security>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release Balík %s je podpísaný kľúčom od %s (0x%s). Ste si istý ze chcete importovať tento kľúč? In my case the bad text is localized and causes a traceback. Sorry for the confusion. I should have corrected Ankit's post. Yeh, weird, not sure how I missed this earlier: #: ../pirut/__init__.py:563 #, python-format msgid "" "The package %s is signed with a key %s (0x%s) from %s. Would you like to " "import this key?" msgstr "" "Balík %s je podpísaný kľúčom od %s (0x%s). Ste si istý ze chcete importovať " "tento kľúč?" ...so it isn't marked fuzzy and only has 3 %s. So this is a problem in the sk localization file? yes (at least sk, but maybe only sk). I get a pup installation failure even with LANG="en_US.UTF-8" - here's my traceback: Component: pirut Summary: TB7d428655 rhnplugin.py:319:_getFile:RepoError: failed to retrieve repodata/c55860d7e201ad141a1b173a01723c8ec168b6c3-updateinfo.xml.gz from rhel-x86_64-client-5 error was [Errno -1] Metadata file does not match checksum Traceback (most recent call last): File "/usr/sbin/pup", line 617, in ? main() File "/usr/sbin/pup", line 613, in main pup.run() File "/usr/sbin/pup", line 451, in run self.doRefresh() File "/usr/sbin/pup", line 291, in doRefresh self.populateUpdates() File "/usr/sbin/pup", line 347, in populateUpdates self.updateMetadata.add(repo) File "/usr/lib/python2.4/site-packages/yum/update_md.py", line 367, in add md = obj.retrieveMD(mdtype) File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1494, in retrieveMD return self._retrieveMD(mdtype) File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1534, in _retrieveMD cache=self.http_caching == 'all') File "/usr/lib/yum-plugins/rhnplugin.py", line 319, in _getFile raise yum.Errors.RepoError, \ RepoError: failed to retrieve repodata/c55860d7e201ad141a1b173a01723c8ec168b6c3-updateinfo.xml.gz from rhel-x86_64-client-5 error was [Errno -1] Metadata file does not match checksum Local variables in innermost frame: e: [Errno -1] Metadata file does not match checksum url: None text: rhel-x86_64-client-5/updateinfo self: rhel-x86_64-client-5 cache: False reget: None relative: repodata/c55860d7e201ad141a1b173a01723c8ec168b6c3-updateinfo.xml.gz start: None checkfunc: (<bound method RhnRepo.checkMD of <rhnplugin.RhnRepo object at 0x1aa997d0>>, ('updateinfo',), {}) copy_local: 1 end: None local: /var/cache/yum/rhel-x86_64-client-5/c55860d7e201ad141a1b173a01723c8ec168b6c3-updateinfo.xml.gz This is a different bug (in RHN and the CDN). It goes away eventually, I've created a number of BZs against RHN but they keep getting closed as soon as the current problem is over. 638922 is one. 452538 is another. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Due to an error in the Slovak translation, working with a package that was signed with an unknown GPG key caused pirut to terminate unexpectedly with a traceback. This update corrects the Slovak translation, and pirut no longer crashes. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0132.html |