Hi, Am Montag, 7. März 2011, 15:49:59 schrieb Miroslav Suchý: > On 03/07/2011 02:28 PM, Michael Calmer wrote: > > Hello, [...] > Regarding patch 0001-implement-updateinfo-Errata-import-5.patch... > It seems to me that it is merge of 4 smaller commits and therefore the > commit description is quite misleading... > I would expectd something like: > Decide if package is errata based on updateinfo....
Well, this was the initial patch for this feature. So I think "implement updateinfo to Errata import" is a good headline. The 2 additional patches merged into this first commit were smaller bugfixes for the initial patch. > and something more how the detection works and which all information you > extract from updateinfo. * fix errata override bug. Create a unique advisory_name This was about the <id> element in the updateinfo which is not unique. To get it unique we append notice['version'] to it. The next hit was, that patches may be created for mulitarch repositories, but in spacewalk we have single arch channels. This can lead into duplicate updates where only the package list differ because of the architectures. So we also append self.channel['arch'] to advisory and advisory_name * we need to search for the package in the correct channel. It may happen, that the same nevra exists multiple times in rhnPackage. The only difference is the checksum. They are assigned to different channels. So we need to take care during errata import to get the right package added to the errata. This was a fix for the big select statement which searches for the checksum of a package. The updateinfo only contains the package nevra and and errata wants the package checksum. So we need to search for the package in the DB. But if we do not include the channel as search criteria, we may find the wrong package which exists in a different channel. The complete patchset uses the following updateinfo elements: id: used in "advisory" and "advisory_name" version: used in "advisory" and "advisory_name" and set to "advisory_rel" type: is translated into spacewalk errata types and put into "advisory_type" title: set to "synopsis" release: set to "product" issued: converted to db date and put into "issue_date" references: bugzilla and CVE numbers are converted to the errata tables description: set to "description" The package list is evaluated and the packages are linked to the errata reboot_suggested: this flag is added as keyword to errata restart_suggested: this flag is added as keyword to errata from: we enhanced the errata table and add the column errata_from to have a place where the author/vendor could be stored. The errata fields "topic" and "solution" are set to " "(empty) because there is no equivalent in updateinfo (yet). -- MFG Michael Calmer -------------------------------------------------------------------------- Michael Calmer SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg T: +49 (0) 911 74053 0 F: +49 (0) 911 74053575 - e-mail: michael.cal...@suse.com -------------------------------------------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) _______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel