Merge lp:~wgrant/launchpad/link-uploaded-ddebs into lp:launchpad/db-devel
| Status: | Merged |
|---|---|
| Approved by: | Jelmer Vernooij on 2010-07-22 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 9567 |
| Proposed branch: | lp:~wgrant/launchpad/link-uploaded-ddebs |
| Merge into: | lp:launchpad/db-devel |
| Diff against target: |
674 lines (+269/-81) 16 files modified
database/schema/comments.sql (+1/-0) database/schema/patch-2207-73-0.sql (+10/-0) lib/lp/archiveuploader/nascentupload.py (+46/-3) lib/lp/archiveuploader/nascentuploadfile.py (+11/-19) lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1.dsc (+13/-0) lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1_i386.changes (+31/-0) lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1_source.changes (+26/-0) lib/lp/archiveuploader/tests/nascentupload-ddebs.txt (+80/-41) lib/lp/soyuz/doc/archive-files.txt (+8/-0) lib/lp/soyuz/doc/binarypackagebuild.txt (+3/-2) lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt (+4/-2) lib/lp/soyuz/interfaces/binarypackagebuild.py (+9/-1) lib/lp/soyuz/interfaces/binarypackagerelease.py (+5/-1) lib/lp/soyuz/model/binarypackagebuild.py (+17/-10) lib/lp/soyuz/model/binarypackagerelease.py (+2/-0) lib/lp/soyuz/tests/test_publishing.py (+3/-2) |
| To merge this branch: | bzr merge lp:~wgrant/launchpad/link-uploaded-ddebs |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Jelmer Vernooij (community) | code | Approve on 2010-07-22 | |
| Julian Edwards (community) | direction | 2010-07-12 | Approve on 2010-07-21 |
| Stuart Bishop | db | 2010-07-21 | Approve on 2010-07-21 |
| Robert Collins (community) | db | 2010-07-21 | Approve on 2010-07-21 |
|
Review via email:
|
|||
Commit Message
DDEBs are now linked to and respect the overrides of their corresponding DEBs.
Description of the Change
This branch alters the upload processor to link DDEBs and their DEBs, a piece critical to the pleasant DDEB experience which will be provided by this series of branches.
DDEBs contain debug symbols for their corresponding DEBs, so they need to be very tightly tied and always have matching changes performed. The only way to determine the link between two uploaded files is by comparing names within a build, so it is most efficient and simplest to store this link explicitly as the upload is processed. BinaryPackageRe
In addition to being linked to the corresponding DEB, DDEBs will now also inherit the DEB's overrides. This fixes bug #430025
| Julian Edwards (julian-edwards) wrote : | # |
<bigjools> wgrant: unit tests please, not tests in doctests
<bigjools> wgrant: also consider factoring out your new code so you can write unit tests for it
<bigjools> Running the upload processor in tests is something I want to reduce, not increase ;)
<bigjools> wgrant: finally, my alarm bells go off very strongly when I see removeSecurityProxy being used in code
<wgrant> bigjools: Fair point.
<wgrant> In my defense, it's a reasonably large test to rewrite, and I revived this branch from October last year. I'll probably replace nascentupload-
<bigjools> ok
<wgrant> And yes, I strongly considered factoring that out.
<bigjools> you should XXX it and file a bug plz
<wgrant> But it means a significant restructure, so... maybe for another branch.
<bigjools> that's fine
<bigjools> thanks for fixing ddebs!
| William Grant (wgrant) wrote : | # |
The removeSecurityProxy call is gone. DDEBs are created in the DB first, and BaseBinaryUploa
| Stuart Bishop (stub) wrote : | # |
We can make it easier to clean out unwanted binarypackages:
ALTER TABLE BinaryPackageRe
ADD COLUMN debug_package integer REFERENCES BinaryPackageRe
Otherwise fine. patch-2207-73-0.sql
| Julian Edwards (julian-edwards) wrote : | # |
I'm happy with the direction this is going now, although I don't have the spare time to do a thorough review right now. Provided someone else blesses this then that's ok with me too.
<bigjools> wgrant: don't forget to file a bug about fixing the tests though
<bigjools> the basic doc tests are fine, we just don't want unit tests in them
<wgrant> Hmm.
<bigjools> and also I would prefer unit tests instead of uploading whole new packages where possible
<wgrant> Oh, certainly.
<bigjools> if you add unit tests to doctests, various people like jml will hunt you down :)
<wgrant> But archiveuploader isn't awesome for that at the moment.
<bigjools> you need to factor out your new code
<bigjools> then it becomes testable :)
<wgrant> I need to move around some other stuff before I can do that.
<bigjools> ok
<bigjools> like I said, feel free to file a bug about it
| Jelmer Vernooij (jelmer) wrote : | # |
> === added file 'database/
> --- database/
> +++ database/
> @@ -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(
> + and uploaded_
> + ancestry_name = uploaded_
> + else:
> + ancestry_name = uploaded_
> +
> binary_name = getUtility(
> - IBinaryPackageN
> + IBinaryPackageN
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/
> --- lib/lp/
> +++ lib/lp/
> @@ -152,6 +153,13 @@
> :return the corresponding `ILibraryFileAlias` if the file was found.
> """
>
> + def getBinaryPackag
> + """Return the corresponding `IBinaryPackage
> +
> + :param filename: the filename to look up.
> + :return: the correpsonding `IBinaryPackage
> + """
> +
corresponding ?
> class IBinaryPackageB
> """A Build interface for items requiring launchpad.Edit."""
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -18,7 +18,7 @@
> from lazr.enum import DBEnumeratedType, DBItem
> from lazr.restful.
> 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/
> --- lib/lp/
> +++ lib/lp/
> @@ -450,7 +450,7 @@
> binpackageformat, component,section, priority, shlibdeps,
> depends, recommends, suggests, conflicts, replaces, provides,
> pre_depends, enhances, breaks, essential, installedsize,
> - architecturespe
> + architecturespe
> """See...

Ok from a schema pov, I haven't done a code review.