Comment 2 for bug 420230

Revision history for this message
Curtis Hovey (sinzui) wrote :

I think we need to update the documentation. Since SourcePackage is a meta object representing names and publishing history, getSourcePackage does not guarantee that the package was published. The method is used to access the meta-information needed to publish a source package in a series, changing its behaviour will break initial publication.

We should add a optional kwarg (published_only=False) that guarantees that will ensure None is returned if there is no publishing history. This means that a deleted package will still be returned, as well as one that has not been built yet.

I am not sure the Launchpad would use this kwarg. For example if it was used, non-Ubuntu distros (which have no publishing history) will always raise a 404 when someone tries to navigate to the page. This may cause many 404s because users who report a package in Fedora for example are implicitly making a link to an unpublished package.