Bug 526750

Summary: TypeError: Parsing primary.xml error: attributes construct error
Product: [Fedora] Fedora Reporter: Jerry Amundson <jamundso>
Component: preupgradeAssignee: Seth Vidal <skvidal>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-01 15:53:23 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Jerry Amundson 2009-10-01 12:40:32 EDT
Description of problem:
TypeError: Parsing primary.xml error: attributes construct error
when trying to preupgrade from F11 to rawhide

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

How reproducible:

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

Expected results:
no error

Additional info:

(process:2177): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Parsing primary.xml error: Couldn't find end of Start Tag rpm:entry line 70421

Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-cli.py", line 305, in <module>
  File "/usr/share/preupgrade/preupgrade-cli.py", line 270, in main
    self.generate_repo(cachedir, comps) # TODO: callback?
  File "/usr/lib/python2.6/site-packages/preupgrade/__init__.py", line 651, in generate_repo
  File "/usr/lib/python2.6/site-packages/preupgrade/misc.py", line 131, in generate_repodata
    generate_repodata(dir, comps, callback)
  File "/usr/lib/python2.6/site-packages/preupgrade/misc.py", line 148, in generate_repodata_f9
  File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 829, in doRepoMetadata
    rp.getPrimary(complete_path, csum)
  File "/usr/lib/python2.6/site-packages/sqlitecachec.py", line 45, in getPrimary
TypeError: Parsing primary.xml error: attributes construct error
Comment 1 Jerry Amundson 2009-10-01 12:48:42 EDT
Found around line 70421 in primary.xml:

 70405    <packager>Fedora Project</packager>
 70406    <url>http://asg.web.cmu.edu/sasl/sasl-library.html</url>
 70407    <time file="1253787643" build="1253787633"/>
 70408    <size package="74068" installed="125902" archive="127884"/>
 70409  <location href="packages/cyrus-sasl-2.1.23-4.fc12.i686.rpm"/>
 70410    <format>
 70411      <rpm:license>BSD</rpm:license>
 70412      <rpm:vendor>Fedora Project</rpm:vendor>
 70413      <rpm:group>System Environment/Libraries</rpm:group>
 70414      <rpm:buildhost>x86-5.fedora.phx.redhat.com</rpm:buildhost>
 70415      <rpm:sourcerpm>cyrus-sasl-2.1.23-4.fc12.src.rpm</rpm:sourcerpm>
 70416      <rpm:header-range start="280" end="22188"/>
 70417      <rpm:provides>
 70418        <rpm:entry name="config(cyrus-sasl)" flags="EQ" epoch="0" ver="2.1
.23" rel="4.fc12"/>
 70419        <rpm:entry name="group(saslauth)" flags="EQ" epoch="0" ver=""Sasla
 70420        <rpm:entry name="user&quot;"/>
 70421        <rpm:entry name="user(saslauth)" flags="EQ" epoch="0" ver=""Saslau
 70422        <rpm:entry name="cyrus-sasl" flags="EQ" epoch="0" ver="2.1.23" rel
 70423        <rpm:entry name="cyrus-sasl(x86-32)" flags="EQ" epoch="0" ver="2.1
.23" rel="4.fc12"/>
 70424      </rpm:provides>
Comment 2 Jerry Amundson 2009-10-01 15:05:06 EDT
I ran this successfully the second time. Updates had been applied, which included
if that matters.
Comment 3 Jerry Amundson 2009-10-01 15:25:17 EDT
Feel free to CLOSE this, for any reason.
FYI, no extra double quote in the group field this time.

 70811    <packager>Fedora Project</packager>
 70812    <url>http://asg.web.cmu.edu/sasl/sasl-library.html</url>
 70813    <time file="1253787643" build="1253787633"/>
 70814    <size package="74068" installed="125902" archive="127884"/>
 70815  <location href="packages/cyrus-sasl-2.1.23-4.fc12.i686.rpm"/>
 70816    <format>
 70817      <rpm:license>BSD</rpm:license>
 70818      <rpm:vendor>Fedora Project</rpm:vendor>
 70819      <rpm:group>System Environment/Libraries</rpm:group>
 70820      <rpm:buildhost>x86-5.fedora.phx.redhat.com</rpm:buildhost>
 70821      <rpm:sourcerpm>cyrus-sasl-2.1.23-4.fc12.src.rpm</rpm:sourcerpm>
 70822      <rpm:header-range start="280" end="22188"/>
 70823      <rpm:provides>
 70824        <rpm:entry name="config(cyrus-sasl)" flags="EQ" epoch="0" ver="2.1.23" rel="4.fc12"/>
 70825        <rpm:entry name="group(saslauth)" flags="EQ" epoch="0" ver="&quot;Saslauthd"/>
 70826        <rpm:entry name="user&quot;"/>
 70827        <rpm:entry name="user(saslauth)" flags="EQ" epoch="0" ver="&quot;Saslauthd"/>
 70828        <rpm:entry name="cyrus-sasl" flags="EQ" epoch="0" ver="2.1.23" rel="4.fc12"/>
 70829        <rpm:entry name="cyrus-sasl(x86-32)" flags="EQ" epoch="0" ver="2.1.23" rel="4.fc12"/>
 70830      </rpm:provides>
Comment 4 Will Woods 2009-10-01 15:41:10 EDT
As far as I can tell the bug here was triggered in createrepo by some bad input data; that mirror seems to have fixed their data.

This Shouldn't Happen, of course, but preupgrade should probably handle it a little more cleanly.

Maybe it needs a big "Sorry dude something blew up - exiting now" try/except block.
Comment 5 seth vidal 2009-10-01 15:53:23 EDT
this is a bug we've already hit and fixed in yum/createrepo.

*** This bug has been marked as a duplicate of bug 525803 ***