Merge lp://qastaging/~edwin-grubbs/launchpad/bug-600876-ubuntupkg-integrity-error into lp://qastaging/launchpad

Proposed by Edwin Grubbs
Status: Merged
Approved by: Curtis Hovey
Approved revision: no longer in the source branch.
Merged at revision: 11116
Proposed branch: lp://qastaging/~edwin-grubbs/launchpad/bug-600876-ubuntupkg-integrity-error
Merge into: lp://qastaging/launchpad
Diff against target: 135 lines (+29/-28)
2 files modified
lib/lp/registry/browser/productseries.py (+10/-22)
lib/lp/registry/browser/tests/test_packaging.py (+19/-6)
To merge this branch: bzr merge lp://qastaging/~edwin-grubbs/launchpad/bug-600876-ubuntupkg-integrity-error
Reviewer Review Type Date Requested Status
Curtis Hovey (community) Approve
Review via email: mp+29499@code.qastaging.launchpad.net

Description of the change

Summary
-------

thunderbird-locales has packaging links for:
  Maverick -> Mozilla Thunderbird 3.1 series
  Lucid -> Mozilla Thunderbird 3.0 series

https://edge.launchpad.net/ubuntu/+source/thunderbird-locales

If you go to
    https://edge.launchpad.net/thunderbird/3.1/+ubuntupkg
and try to create packaging for 'thunderbird-locales' and
the Lucid distroseries, the view class validate() stops
checking as soon as it finds out that the sourcepackagename
is the same as the existing package on the current distroseries,
which is maverick. The action handler tries to create the packaging
link, since it is only meant to ignore the links on the same
productseries.

Implementation details
----------------------

lib/lp/registry/browser/productseries.py
lib/lp/registry/browser/tests/test_packaging.py

Tests
-----

./bin/test -vv -t test_packaging

Demo and Q/A
------------

On Dev:
* Open https://launchpad.dev/netapplet/+packages
  * Remove the package for warty, since it is on the trunk distroseries.
* Open https://launchpad.dev/netapplet/+addseries
  * Create the series.
  * Click on "Link to Ubuntu package" on the new productseries page.
  * Link it to netapplet/Warty.
* Open https://launchpad.dev/netapplet/trunk/+ubuntupkg
  * Try to link it to netapplet/Warty.
  * You should get this error message instead of an oops:
    "The netapplet package in Warty is already linked to another series."

On Edge:
* https://edge.launchpad.net/thunderbird/3.1/+ubuntupkg
  * The sourcepackagename field should say "thunderbird-locales".
  * Select Lucid from the Series drop-down.
  * Click "Update".
  * You should get an error message instead of an oops.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank for resolving the contradictory rules to return early when the packaging will be identical (a no change op).

I think the test step is weak (70-77). It looks like it is doing two state transitions. I think the test should directly create the package, then verify that the view return without error when the user attempts to create the identical packaging.

    self.packaging_util.createPackaging(
        productseries=productseries, sourcepackagename=sourcepackagename,
        distroseries=distroseries, packaging=Packaging.PRIMARY, self.product.owner)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.