This is my second branch to ensure valid upstream package links. There
are many oopses relating to the creation and efforts to fix invalid packages.
The root cause is a bad DB constraint and two views that do not do the
required sanity checks: +addpackage and +ubuntupkg
This branch fixes +addpackage to make sane packages.
(+ubuntupkg need major refactoring and is the scope od a single branch.)
Bug 196774 [It shouldn't be possible to link multiple productseries to a
sourcepackage in a given distroseries]
+addpackage and +ubuntupkg do not verify that the SP is unlinked for the
distroseries.
Bug 344376 [+addpackage oopses if the "Source Package Name" is left blank]
The most common reason users leave the field blank is that they are
trying to remove an invalid packaging link.
Bug 89392 [+addpackage form contains nonsensical "Packaging" field]
The final menu is labeled "Packaging" and contains options "Primary
Product" and "SourcePackage Includes Product". This makes absolutely no
sense to a product author.
== Rules ==
Bug 196774 [It shouldn't be possible to link multiple productseries to a
sourcepackage in a given distroseries]
Verify that the SP for the distroseries is available for linking.
If not, provide a link to the current package so that the user can
investigate it.
Bug 344376 [+addpackage oopses if the "Source Package Name" is left blank]
Use the validate() method and report a form error if the choice is not
sane.
Bug 89392 [+addpackage form contains nonsensical "Packaging" field]
rewrite the form instructions
== QA ==
On staging
* Visit a productseries
* Choose (+) Add packaging
* Verify the packaging field explains primary from source
* Submit the form without a source package name
* Verify the form error message explains that the source package must
be provided
* Submit the form with Ubuntu Karmic, 'gedit', primary
* Verify the form error message explains that the gedit is already
packaged in Ubuntu karmic. Follow the link
* Verify the “gedit” source package in Karmic page displays.
This is my second branch to ensure valid upstream package links. There
are many oopses relating to the creation and efforts to fix invalid packages.
The root cause is a bad DB constraint and two views that do not do the
required sanity checks: +addpackage and +ubuntupkg
This branch fixes +addpackage to make sane packages.
(+ubuntupkg need major refactoring and is the scope od a single branch.)
lp:~sinzui/launchpad/package-link-validation-1 /bugs.launchpad .net/bugs/ 344376 /bugs.launchpad .net/bugs/ 89392 /bugs.launchpad .net/bugs/ 196774 *(productseries |packaging) ' implementation: flacoste
Diff size: 372
Launchpad bug: https:/
https:/
https:/
Test command: ./bin/test -vv -t 'lp.reg.
Pre-
Target release: 3.1.10
== Fixing upstream packaging links ==
Bug 196774 [It shouldn't be possible to link multiple productseries to a
sourcepackage in a given distroseries]
+addpackage and +ubuntupkg do not verify that the SP is unlinked for the
distroseries.
Bug 344376 [+addpackage oopses if the "Source Package Name" is left blank]
The most common reason users leave the field blank is that they are
trying to remove an invalid packaging link.
Bug 89392 [+addpackage form contains nonsensical "Packaging" field]
The final menu is labeled "Packaging" and contains options "Primary
Product" and "SourcePackage Includes Product". This makes absolutely no
sense to a product author.
== Rules ==
Bug 196774 [It shouldn't be possible to link multiple productseries to a
sourcepackage in a given distroseries]
Verify that the SP for the distroseries is available for linking.
If not, provide a link to the current package so that the user can
investigate it.
Bug 344376 [+addpackage oopses if the "Source Package Name" is left blank]
Use the validate() method and report a form error if the choice is not
sane.
Bug 89392 [+addpackage form contains nonsensical "Packaging" field]
rewrite the form instructions
== QA ==
On staging
* Visit a productseries
* Choose (+) Add packaging
* Verify the packaging field explains primary from source
* Submit the form without a source package name
* Verify the form error message explains that the source package must
be provided
* Submit the form with Ubuntu Karmic, 'gedit', primary
* Verify the form error message explains that the gedit is already
packaged in Ubuntu karmic. Follow the link
* Verify the “gedit” source package in Karmic page displays.
== Lint ==
Linting changed files: registry/ browser/ packaging. py registry/ browser/ tests/productse ries-views. txt registry/ interfaces/ packaging. py registry/ model/packaging .py registry/ tests/test_ packaging. py
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Test ==
* lib/lp/ registry/ browser/ tests/productse ries-views. txt registry/ tests/test_ packaging. py
* lib/lp/
== Implementation ==
* lib/lp/ registry/ browser/ packaging. py registry/ interfaces/ packaging. py registry/ model/packaging .py
* lib/lp/
* lib/lp/