Code review comment for lp:~wgrant/launchpad/link-uploaded-ddebs

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

> === added file 'database/schema/patch-2207-73-0.sql'
> --- database/schema/patch-2207-73-0.sql 1970-01-01 00:00:00 +0000
> +++ database/schema/patch-2207-73-0.sql 2010-07-21 12:53:20 +0000
> @@ -0,0 +1,10 @@
> +-- Copyright 2009 Canonical Ltd. This software is licensed under the
^^^ 2010 ? :-)

> @@ -561,8 +590,17 @@
> uploaded file targeted to an architecture not present in the
> distroseries in context. So callsites needs to be aware.
> """
> + # If we are dealing with a DDEB, use the DEB's overrides.
> + # If there's no deb_file set, don't worry about it. Rejection is
> + # already guaranteed.
> + if (isinstance(uploaded_file, DdebBinaryUploadFile)
> + and uploaded_file.deb_file):
> + ancestry_name = uploaded_file.deb_file.package
> + else:
> + ancestry_name = uploaded_file.package
> +
> binary_name = getUtility(
> - IBinaryPackageNameSet).queryByName(uploaded_file.package)
> + IBinaryPackageNameSet).queryByName(ancestry_name)
Ugh, "deb_file" is a bit confusing here as I keep reading it as
"debug_file". Not really sure what to do about that though.

> === modified file 'lib/lp/soyuz/interfaces/binarypackagebuild.py'
> --- lib/lp/soyuz/interfaces/binarypackagebuild.py 2010-06-14 09:31:26 +0000
> +++ lib/lp/soyuz/interfaces/binarypackagebuild.py 2010-07-21 12:53:20 +0000
> @@ -152,6 +153,13 @@
> :return the corresponding `ILibraryFileAlias` if the file was found.
> """
>
> + def getBinaryPackageFileByName(filename):
> + """Return the corresponding `IBinaryPackageFile` in this context.
> +
> + :param filename: the filename to look up.
> + :return: the correpsonding `IBinaryPackageFile` if it was found.
> + """
> +
corresponding ?

> class IBinaryPackageBuildEdit(Interface):
> """A Build interface for items requiring launchpad.Edit."""
>
> === modified file 'lib/lp/soyuz/interfaces/binarypackagerelease.py'
> --- lib/lp/soyuz/interfaces/binarypackagerelease.py 2010-03-17 10:07:19 +0000
> +++ lib/lp/soyuz/interfaces/binarypackagerelease.py 2010-07-21 12:53:20 +0000
> @@ -18,7 +18,7 @@
> from lazr.enum import DBEnumeratedType, DBItem
> from lazr.restful.declarations import exported, export_as_webservice_entry
> from lazr.restful.fields import Reference, ReferenceChoice
> -from zope.schema import Bool, Date, Int, Text, TextLine, Datetime
> +from zope.schema import Bool, Date, Datetime, Int, Object, Text, TextLine
> from zope.interface import Interface, Attribute
>
> from canonical.launchpad import _
Yay for drive-by fixes.

> === modified file 'lib/lp/soyuz/model/binarypackagebuild.py'
> --- lib/lp/soyuz/model/binarypackagebuild.py 2010-07-18 00:56:16 +0000
> +++ lib/lp/soyuz/model/binarypackagebuild.py 2010-07-21 12:53:20 +0000
> @@ -450,7 +450,7 @@
> binpackageformat, component,section, priority, shlibdeps,
> depends, recommends, suggests, conflicts, replaces, provides,
> pre_depends, enhances, breaks, essential, installedsize,
> - architecturespecific):
> + architecturespecific, debug_package):
> """See IBuild."""
> return BinaryPackageRelease(
> build=self, binarypackagename=binarypackagename, version=version,
Your change is consistent with the existing arguments (none of which
have default values), though I wonder if debug_package could be optional
and defaulting to None here ?

Cheers,

Jelmer

« Back to merge proposal