← Back to team overview

launchpad-dev team mailing list archive

Re: weird behaviour of ProductSeries.setPackaging()

 

On Fri, 2011-04-08 at 12:13 +0200, Abel Deuring wrote:
> Working yesterday on lp:~adeuring/launchpad/bug-746460 , I found some
> quire weird code in ProductSeries.setPackaging():
> 
> - We can link a product series with two sourcepackages of the same
>   distroseries, if we create the links via
> sourcepackage.setPackaging()
> - If we try to link the two sourcepackages by calling
>   productseries.setPackaging(), the second call simply changes the
>   packaging record created during the first call.
> - If we create the two packagings via sourcepackage.setPackaging()
>   and then try to call productseries.setPackaging()
> 
> Is there any reason why we ProductSeries.setPackaging() tries to
> change
> the sourcpackagename of an existing packaging link? In other words: Is
> there any need for a constraint "A product series should have at most
> one packaging link per distroseries"?

We could change the rules to create a packaging link, but I think we
need to review the code to ensure we do not enable user to make more bad
data

ProductSeries.setPackaging() was used by the code that supports project
community users linking to Ubuntu packages. They are very bad at that.
2/3 links were wrong. Projectseries can provide more than one source
package, but project users rarely have enough packaging experience to
make a sensible link. We now suggest links to help them make good
decisions.

The linking from the source package pages is for the packaging community
and it does permit users to create and delete packaging links.

So the rule is, use PackagingUtil. If you really feel that
setPackaging() is broken, then we could factor it it out and only use
PackagingUtil.

-- 
__Curtis C. Hovey_________
http://launchpad.net/

Attachment: signature.asc
Description: This is a digitally signed message part


References