On Fri, Mar 11, 2011 at 10:31:45AM +0100, Michael Calmer wrote:
> > 
> > is at fault -- at least in that Fedora 7 updateinfo, the version
> > is not integer. When I've changed the line to
> > 
> >     e['advisory_rel'] = 1
> > 
> > things went much better.
> 
> Yes, this is the version appended to advisory_name. Here is an example from 
> openSUSE which shows the unique problem
> 
> <updates>
> <!--PATCHINFO id="898568de8313f62fc290e303946cfe11"!-->
> <update status="stable" from="maint-co...@suse.de" type="recommended" 
> version="1596">
>   <id>flash-player</id>
>   <issued date="1256155647"/>
> [...]
> <update status="stable" from="maint-co...@suse.de" type="security" 
> version="1707">
>   <id>flash-player</id>
>   <issued date="1260492724"/>
> 
> Same id used but with a different version. I think we need to find a way to 
> deal with all these differences in how updateinfo is used.

Right. I've checked

        
http://download.englab.brq.redhat.com/pub/fedora/linux/updates/14/i386/repodata/updateinfo.xml.gz

and it still has version="1.4" there, so it looks like Fedora uses
that attribute to mean the version of the data structure (it's 1.4
both on Fedora 7 and Fedora 14), not version of the errata.

Can you come up with some proposal? From top of my head, we could add
a "type" of updatesinfo to the repository definition in the database
and use that, or use some heuristics, either checking that the id
does not end with /-\d+-\d+$/ or checking something else specific to
Fedora / *SuSE.

> About the channel label added to the advisory_name.
> 
> I think the correct way would be to search in DB if the errata already exist.
> If so, create the errata object from the DB and add the new packages and 
> channels to it.
> Than update the errata in the database.

Exactly.

> Doing this, we do not need to append the channel label to advisory_name.
> 
> Is there already a method to create an Erratum object from the database?

There has to be, as satellite-sync does exactly that. Unfortunately,
I won't be able to dig into it for the next week as I will be away
-- if you could investigate, that would be great.

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to