Bug 476862

Summary: preupgrade f10->rawhide fails with UnicodeDecodeError on libXdamage
Product: [Fedora] Fedora Reporter: Jerry Amundson <jamundso>
Component: preupgradeAssignee: Seth Vidal <skvidal>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.1.0-1.fc10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-28 04:13:29 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Jerry Amundson 2008-12-17 11:08:00 EST
Description of problem:
preupgrade f10->rawhide fails with UnicodeDecodeError on libXdamage

Version-Release number of selected component (if applicable):
preupgrade-1.0.0-1.fc10.noarch


How reproducible:
always

Steps to Reproduce:
1. preupgrade-cli Rawhide
2.
3.
  
Actual results:
error

Expected results:
upgrade

Additional info:
648/789 - preupgrade/packages/libXdamage-1.1.1-5.fc11.i386.rpmTraceback (most recent call last):                                                                
  File "/usr/share/preupgrade/preupgrade-cli.py", line 284, in <module>         
    pu.main(myrelease)                                                          
  File "/usr/share/preupgrade/preupgrade-cli.py", line 249, in main             
    self.generate_repodata(cachedir, comps) # TODO: callback?                   
  File "/usr/lib/python2.5/site-packages/preupgrade/__init__.py", line 711, in generate_repodata                                                                
    generate_repodata(dir, comps, callback)                                     
  File "/usr/lib/python2.5/site-packages/preupgrade/__init__.py", line 727, in generate_repodata_f9                                                             
    mdgen.doPkgMetadata()
  File "/usr/lib/python2.5/site-packages/createrepo/__init__.py", line 332, in doPkgMetadata
    self.writeMetadataDocs(packages)
  File "/usr/lib/python2.5/site-packages/createrepo/__init__.py", line 475, in writeMetadataDocs
    clog_limit=self.conf.changelog_limit))
  File "/usr/lib/python2.5/site-packages/yum/packages.py", line 959, in xml_dump_other_metadata
    msg += "%s\n</package>\n" % misc.to_unicode(self._dump_changelog(clog_limit))
  File "/usr/lib/python2.5/site-packages/yum/packages.py", line 936, in _dump_changelog
    misc.to_xml(author, attrib=True), misc.to_xml(str(ts)),
  File "/usr/lib/python2.5/site-packages/yum/misc.py", line 749, in to_xml
    item = _ugly_utf8_string_hack(item)
  File "/usr/lib/python2.5/site-packages/yum/misc.py", line 728, in _ugly_utf8_string_hack
    print '\n%s encoding on %s\n' % (enc, item)
  File "/usr/lib64/python2.5/codecs.py", line 303, in write
    data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf8 in position 34: ordinal not in range(128)
Comment 1 Will Woods 2008-12-17 16:30:32 EST
The most recent changelog item in libXdamage-1.1.1-5.fc11.i386.rpm is:

* Wed Dec 03 2008 Caolán McNamara <caolanm@redhat.com> - 1.1.1-5
- rebuild to get provides pkgconfig(xdamage)

Note the 'á' in Caolán. Somehow this is causing createrepo to choke. But createrepo happily works with that package when run outside of preupgrade, so we must be setting something up wrong.
Comment 2 seth vidal 2008-12-17 17:06:39 EST
Can you tell me the version of yum and createrepo in use here?
Comment 3 Jerry Amundson 2008-12-17 17:13:44 EST
yum-3.2.20-5.fc10.noarch
createrepo-0.9.6-3.fc10.noarch
Comment 4 Will Woods 2008-12-17 18:10:13 EST
preupgrade does:
  from yum.misc import setup_locale
  setup_locale()
because of bug 467088.

Removing these two lines fixes the problem. Maybe I need to un-setup locale before doing mdgen.doPkgMetadata()?
Comment 5 Will Woods 2008-12-18 14:13:28 EST
Changing to setup_locale(override_codecs=False) fixes the problem, without regressing on bug 467088. Yay.

I'll get this fix into the next preupgrade build.
Comment 6 Fedora Update System 2009-04-28 18:07:33 EDT
preupgrade-1.1.0-0.pre2.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/preupgrade-1.1.0-0.pre2.fc10
Comment 7 Fedora Update System 2009-05-02 12:41:54 EDT
preupgrade-1.1.0-0.pre2.fc10 has been pushed to the Fedora 10 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 preupgrade'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-4211
Comment 8 Fedora Update System 2009-05-13 18:46:56 EDT
preupgrade-1.1.0-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/preupgrade-1.1.0-1.fc9
Comment 9 Fedora Update System 2009-05-13 18:47:51 EDT
preupgrade-1.1.0-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/preupgrade-1.1.0-1.fc11
Comment 10 Fedora Update System 2009-05-15 19:33:55 EDT
preupgrade-1.1.0-1.fc10 has been pushed to the Fedora 10 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 preupgrade'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-4211
Comment 11 Fedora Update System 2009-05-28 03:58:09 EDT
preupgrade-1.1.0-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2009-05-28 04:10:53 EDT
preupgrade-1.1.0-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 13 Fedora Update System 2009-05-28 04:12:52 EDT
preupgrade-1.1.0-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.