Merge lp:~sinzui/launchpad/ds-get-source-package into lp:launchpad

Proposed by Curtis Hovey
Status: Merged
Merged at revision: not available
Proposed branch: lp:~sinzui/launchpad/ds-get-source-package
Merge into: lp:launchpad
Diff against target: 22 lines (+3/-2)
1 file modified
lib/lp/registry/interfaces/distroseries.py (+3/-2)
To merge this branch: bzr merge lp:~sinzui/launchpad/ds-get-source-package
Reviewer Review Type Date Requested Status
Paul Hummer (community) code Approve
Review via email: mp+20172@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

This is my branch to clarify distroseries getSourcePackage().

    lp:~sinzui/launchpad/ds-get-source-package
    Diff size: 23
    Launchpad bug: https://bugs.launchpad.net/bugs/id
    Test command:
        rm lib/canonical/launchpad/api/index.html; make build
    Pre-implementation: no one
    Target release: 10.02

clarify distroseries getSourcePackage()
---------------------------------------

When using the following commands with the Launchpad API I received back an
object and I don't think I should have.

    karmic.getSourcePackage(name='compiz-plugins')
    <source_package at .../ubuntu/karmic/+source/compiz-plugins>

    However, compiz-plugins does not exist in Karmic
    https://edge.launchpad.net/ubuntu/karmic/+source/compiz-plugins.

Curtis:
    The behaviour is correct. SourcePackages are meta objects for accessing
    publishing history, files, and common names. getSourcePackage() is used
    by Soyuz and Code to create the first publishing record of a file.
    The SourcePackages may also represent a package that was in a distro
    series, but was deleted.

Rules
-----

    * Update getSourcePackage() and getBinaryPackage() documentation to
      clarify that the object returned is not guaranteed to be published
      in the series.

QA
--

    * Verify that the API states that the methods do not guarantee that the
      object was published in the series.

Lint
----

Linting changed files:
  lib/lp/registry/interfaces/distroseries.py

Test
----

None

Implementation
--------------

    * lib/lp/registry/interfaces/distroseries.py
      * Updated the documentation.

Revision history for this message
Paul Hummer (rockstar) wrote :

Easy branches are my favorite!

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/interfaces/distroseries.py'
2--- lib/lp/registry/interfaces/distroseries.py 2010-02-19 12:03:35 +0000
3+++ lib/lp/registry/interfaces/distroseries.py 2010-02-25 19:50:38 +0000
4@@ -421,7 +421,7 @@
5 """Return a source package in this distro series by name.
6
7 The name given may be a string or an ISourcePackageName-providing
8- object.
9+ object. The source package may not be published in the distro series.
10 """
11
12 def getTranslatableSourcePackages():
13@@ -516,7 +516,8 @@
14 def getBinaryPackage(name):
15 """Return a DistroSeriesBinaryPackage for this name.
16
17- The name given may be an IBinaryPackageName or a string.
18+ The name given may be an IBinaryPackageName or a string. The
19+ binary package may not be published in the distro series.
20 """
21
22 def getSourcePackageRelease(sourcepackagerelease):