ProductSeries.setPackaging() should not change existing records

Bug #760699 reported by Abel Deuring
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Abel Deuring

Bug Description

If ProductSeries.setPackaging() changes an existing packaging record, two problem can arise:

1. An IntegrityError can occur. This happens, when two different source packages of the same distroseries are linked to the same productseries: The method iterates over self.packagings; the iteration stops at the first packaging for the "right" distroseries. If setPackaging() is called with the parameters of the second existing packaging, the iteration stops at the first packaging, and the subsequent code sets the property sourcepackagename. Then we would have two records for one sourcepackage, which a DB contraint does not allow:

    "packaging__distroseries__sourcepackagename__key" UNIQUE, btree (distroseries, sourcepackagename)

2. Changing an existing record without triggered a related translation sharing job causes inconcsistencies with translation sharing.

Related branches

Revision history for this message
Abel Deuring (adeuring) wrote :

note that we can have two or more sourcepackage of one distroseries linked to one productseries, if the packging links are created in sourcepackage views.

summary: - ProductSeries.setPackaging() should not change existing record
+ ProductSeries.setPackaging() should not change existing records
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
milestone: none → 11.05
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: qa-ok
removed: qa-needstesting
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.