Merge lp:~wgrant/launchpad/link-uploaded-ddebs into lp:launchpad/db-devel

Proposed by William Grant
Status: Merged
Approved by: Jelmer Vernooij
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
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) code Approve
Julian Edwards (community) direction Approve
Stuart Bishop (community) db Approve
Robert Collins (community) db Approve
Review via email: mp+29669@code.launchpad.net

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. BinaryPackageRelease.debug_package, a new column, will provide the link from a DEB to its matching DDEB.

In addition to being linked to the corresponding DEB, DDEBs will now also inherit the DEB's overrides. This fixes bug #430025

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

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

review: Approve (db)
Revision history for this message
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-ddebs.txt in a separate branch.
<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!

review: Needs Fixing (code)
Revision history for this message
William Grant (wgrant) wrote :

The removeSecurityProxy call is gone. DDEBs are created in the DB first, and BaseBinaryUploadFile.storeInDatabase itself now finds the matching DDEB in the build and adds it to the creation arguments.

Revision history for this message
Stuart Bishop (stub) wrote :

We can make it easier to clean out unwanted binarypackages:

ALTER TABLE BinaryPackageRelease
ADD COLUMN debug_package integer REFERENCES BinaryPackageRelease ON DELETE SET NULL;

Otherwise fine. patch-2207-73-0.sql

review: Approve (db)
Revision history for this message
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

review: Approve (direction)
Revision history for this message
Jelmer Vernooij (jelmer) wrote :
Download full text (3.4 KiB)

> === 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...

Read more...

Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'database/schema/comments.sql'
--- database/schema/comments.sql 2010-07-15 15:29:28 +0000
+++ database/schema/comments.sql 2010-07-22 11:40:00 +0000
@@ -1483,6 +1483,7 @@
1483COMMENT ON COLUMN BinaryPackageRelease.pre_depends IS 'The list of packages this binary requires to be installed beforehand in apt/dpkg format, as it is in control file "Pre-Depends:" field.';1483COMMENT ON COLUMN BinaryPackageRelease.pre_depends IS 'The list of packages this binary requires to be installed beforehand in apt/dpkg format, as it is in control file "Pre-Depends:" field.';
1484COMMENT ON COLUMN BinaryPackageRelease.enhances IS 'The list of packages pointed as "enhanced" after the installation of this package, as it is in control file "Enhances:" field.';1484COMMENT ON COLUMN BinaryPackageRelease.enhances IS 'The list of packages pointed as "enhanced" after the installation of this package, as it is in control file "Enhances:" field.';
1485COMMENT ON COLUMN BinaryPackageRelease.breaks IS 'The list of packages which will be broken by the installtion of this package, as it is in the control file "Breaks:" field.';1485COMMENT ON COLUMN BinaryPackageRelease.breaks IS 'The list of packages which will be broken by the installtion of this package, as it is in the control file "Breaks:" field.';
1486COMMENT ON COLUMN BinaryPackageRelease.debug_package IS 'The corresponding binary package release containing debug symbols for this binary, if any.';
14861487
14871488
1488-- BinaryPackageFile1489-- BinaryPackageFile
14891490
=== 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-22 11:40:00 +0000
@@ -0,0 +1,10 @@
1-- Copyright 2010 Canonical Ltd. This software is licensed under the
2-- GNU Affero General Public License version 3 (see the file LICENSE).
3
4ALTER TABLE BinaryPackageRelease
5 ADD COLUMN debug_package integer REFERENCES BinaryPackageRelease;
6
7CREATE UNIQUE INDEX binarypackagerelease__debug_package__key
8 ON BinaryPackageRelease(debug_package);
9
10INSERT INTO LaunchpadDatabaseRevision VALUES (2207, 73, 0);
011
=== modified file 'lib/lp/archiveuploader/nascentupload.py'
--- lib/lp/archiveuploader/nascentupload.py 2010-07-15 09:42:28 +0000
+++ lib/lp/archiveuploader/nascentupload.py 2010-07-22 11:40:00 +0000
@@ -27,7 +27,7 @@
27from lp.archiveuploader.dscfile import DSCFile27from lp.archiveuploader.dscfile import DSCFile
28from lp.archiveuploader.nascentuploadfile import (28from lp.archiveuploader.nascentuploadfile import (
29 UploadError, UploadWarning, CustomUploadFile, SourceUploadFile,29 UploadError, UploadWarning, CustomUploadFile, SourceUploadFile,
30 BaseBinaryUploadFile)30 BaseBinaryUploadFile, DdebBinaryUploadFile, DebBinaryUploadFile)
31from lp.archiveuploader.utils import determine_source_file_type31from lp.archiveuploader.utils import determine_source_file_type
32from lp.registry.interfaces.pocket import PackagePublishingPocket32from lp.registry.interfaces.pocket import PackagePublishingPocket
33from lp.registry.interfaces.sourcepackage import SourcePackageFileType33from lp.registry.interfaces.sourcepackage import SourcePackageFileType
@@ -158,6 +158,35 @@
158 for uploaded_file in self.changes.files:158 for uploaded_file in self.changes.files:
159 self.run_and_collect_errors(uploaded_file.verify)159 self.run_and_collect_errors(uploaded_file.verify)
160160
161 unmatched_ddebs = {}
162 for uploaded_file in self.changes.files:
163 if isinstance(uploaded_file, DdebBinaryUploadFile):
164 ddeb_key = (uploaded_file.package, uploaded_file.version,
165 uploaded_file.architecture)
166 if ddeb_key in unmatched_ddebs:
167 self.reject("Duplicated debug packages: %s %s (%s)" %
168 ddeb_key)
169 else:
170 unmatched_ddebs[ddeb_key] = uploaded_file
171
172 for uploaded_file in self.changes.files:
173 # We need exactly a DEB, not a DDEB.
174 if (isinstance(uploaded_file, DebBinaryUploadFile) and
175 not isinstance(uploaded_file, DdebBinaryUploadFile)):
176 try:
177 matching_ddeb = unmatched_ddebs.pop(
178 (uploaded_file.package + '-dbgsym',
179 uploaded_file.version,
180 uploaded_file.architecture))
181 except KeyError:
182 continue
183 uploaded_file.ddeb_file = matching_ddeb
184 matching_ddeb.deb_file = uploaded_file
185
186 if len(unmatched_ddebs) > 0:
187 self.reject("Orphaned debug packages: %s" % ', '.join('%s %s (%s)' % d
188 for d in unmatched_ddebs))
189
161 if (len(self.changes.files) == 1 and190 if (len(self.changes.files) == 1 and
162 isinstance(self.changes.files[0], CustomUploadFile)):191 isinstance(self.changes.files[0], CustomUploadFile)):
163 self.logger.debug("Single Custom Upload detected.")192 self.logger.debug("Single Custom Upload detected.")
@@ -561,8 +590,17 @@
561 uploaded file targeted to an architecture not present in the590 uploaded file targeted to an architecture not present in the
562 distroseries in context. So callsites needs to be aware.591 distroseries in context. So callsites needs to be aware.
563 """592 """
593 # If we are dealing with a DDEB, use the DEB's overrides.
594 # If there's no deb_file set, don't worry about it. Rejection is
595 # already guaranteed.
596 if (isinstance(uploaded_file, DdebBinaryUploadFile)
597 and uploaded_file.deb_file):
598 ancestry_name = uploaded_file.deb_file.package
599 else:
600 ancestry_name = uploaded_file.package
601
564 binary_name = getUtility(602 binary_name = getUtility(
565 IBinaryPackageNameSet).queryByName(uploaded_file.package)603 IBinaryPackageNameSet).queryByName(ancestry_name)
566604
567 if binary_name is None:605 if binary_name is None:
568 return None606 return None
@@ -939,7 +977,12 @@
939 # Container for the build that will be processed.977 # Container for the build that will be processed.
940 processed_builds = []978 processed_builds = []
941979
942 for binary_package_file in self.changes.binary_package_files:980 # Create the BPFs referencing DDEBs last. This lets
981 # storeInDatabase find and link DDEBs when creating DEBs.
982 bpfs_to_create = sorted(
983 self.changes.binary_package_files,
984 key=lambda file: file.ddeb_file is not None)
985 for binary_package_file in bpfs_to_create:
943 if self.sourceful:986 if self.sourceful:
944 # The reason we need to do this verification987 # The reason we need to do this verification
945 # so late in the game is that in the988 # so late in the game is that in the
946989
=== modified file 'lib/lp/archiveuploader/nascentuploadfile.py'
--- lib/lp/archiveuploader/nascentuploadfile.py 2010-06-25 16:26:20 +0000
+++ lib/lp/archiveuploader/nascentuploadfile.py 2010-07-22 11:40:00 +0000
@@ -372,6 +372,7 @@
372 """Base methods for binary upload modeling."""372 """Base methods for binary upload modeling."""
373373
374 format = None374 format = None
375 ddeb_file = None
375376
376 # Capitalised because we extract these directly from the control file.377 # Capitalised because we extract these directly from the control file.
377 mandatory_fields = set(["Package", "Architecture", "Version"])378 mandatory_fields = set(["Package", "Architecture", "Version"])
@@ -864,6 +865,12 @@
864 binary_name = getUtility(865 binary_name = getUtility(
865 IBinaryPackageNameSet).getOrCreateByName(self.package)866 IBinaryPackageNameSet).getOrCreateByName(self.package)
866867
868 if self.ddeb_file:
869 debug_package = build.getBinaryPackageFileByName(
870 self.ddeb_file.filename).binarypackagerelease
871 else:
872 debug_package = None
873
867 binary = build.createBinaryPackageRelease(874 binary = build.createBinaryPackageRelease(
868 binarypackagename=binary_name,875 binarypackagename=binary_name,
869 version=self.control_version,876 version=self.control_version,
@@ -885,7 +892,8 @@
885 breaks=encoded.get('Breaks', ''),892 breaks=encoded.get('Breaks', ''),
886 essential=is_essential,893 essential=is_essential,
887 installedsize=installedsize,894 installedsize=installedsize,
888 architecturespecific=architecturespecific)895 architecturespecific=architecturespecific,
896 debug_package=debug_package)
889897
890 library_file = self.librarian.create(self.filename,898 library_file = self.librarian.create(self.filename,
891 self.size, open(self.filepath, "rb"), self.content_type,899 self.size, open(self.filepath, "rb"), self.content_type,
@@ -932,22 +940,6 @@
932940
933941
934class DdebBinaryUploadFile(DebBinaryUploadFile):942class DdebBinaryUploadFile(DebBinaryUploadFile):
935 """Represents an uploaded binary package file in ddeb format.943 """Represents an uploaded binary package file in ddeb format."""
936
937 DDEBs are never considered 'NEW', they don't require review since
938 they are automatically generated.
939 """
940 format = BinaryPackageFormat.DDEB944 format = BinaryPackageFormat.DDEB
941945 deb_file = None
942 # Override the 'new' flag in a way any values set are ignored and
943 # it always return False.
944 def _get_new(self):
945 """DDEBs are never considered NEW."""
946 return False
947
948 def _set_new(self, value):
949 """DDEBs cannot be made NEW."""
950 pass
951
952 new = property(
953 _get_new, _set_new, doc="DDEBs are never flagged as NEW.")
954946
=== added directory 'lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken'
=== added file 'lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug-bin-dbgsym_1.0-1_i386.ddeb'
955Binary files lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug-bin-dbgsym_1.0-1_i386.ddeb 1970-01-01 00:00:00 +0000 and lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug-bin-dbgsym_1.0-1_i386.ddeb 2010-07-22 11:40:00 +0000 differ947Binary files lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug-bin-dbgsym_1.0-1_i386.ddeb 1970-01-01 00:00:00 +0000 and lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug-bin-dbgsym_1.0-1_i386.ddeb 2010-07-22 11:40:00 +0000 differ
=== added file 'lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug-bin_1.0-1_i386.deb'
956Binary files lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug-bin_1.0-1_i386.deb 1970-01-01 00:00:00 +0000 and lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug-bin_1.0-1_i386.deb 2010-07-22 11:40:00 +0000 differ948Binary files lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug-bin_1.0-1_i386.deb 1970-01-01 00:00:00 +0000 and lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug-bin_1.0-1_i386.deb 2010-07-22 11:40:00 +0000 differ
=== added file 'lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1.dsc'
--- lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1.dsc 1970-01-01 00:00:00 +0000
+++ lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1.dsc 2010-07-22 11:40:00 +0000
@@ -0,0 +1,13 @@
1Format: 1.0
2Source: debug
3Binary: debug-bin, debug-bin-dbgsym
4Architecture: any
5Version: 1.0-1
6Maintainer: Launchpad team <launchpad@lists.canonical.com>
7Standards-Version: 3.6.2
8Checksums-Sha1:
9 6851f625a32f6c83a1af4c972b5bead14fbee06c 740 debug_1.0-1.tar.gz
10Checksums-Sha256:
11 1a1ed198644169f16eeee93c843ab8b7d9eef25cd91b83f55f497dbe744d3c95 740 debug_1.0-1.tar.gz
12Files:
13 8225b515f30dd8c0252847f17f4b7069 740 debug_1.0-1.tar.gz
014
=== added file 'lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1.tar.gz'
1Binary files lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1.tar.gz 1970-01-01 00:00:00 +0000 and lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1.tar.gz 2010-07-22 11:40:00 +0000 differ15Binary files lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1.tar.gz 1970-01-01 00:00:00 +0000 and lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1.tar.gz 2010-07-22 11:40:00 +0000 differ
=== added file 'lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1_i386.changes'
--- lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1_i386.changes 1970-01-01 00:00:00 +0000
+++ lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1_i386.changes 2010-07-22 11:40:00 +0000
@@ -0,0 +1,31 @@
1Format: 1.8
2Date: Thu, 15 Apr 2009 15:14:09 +0100
3Source: debug
4Binary: debug-bin
5Architecture: i386
6Version: 1.0-1
7Distribution: hoary
8Urgency: low
9Maintainer: Launchpad team <launchpad@lists.canonical.com>
10Changed-By: Celso Providelo <cprov@canonical.com>
11Description:
12 debug-bin - Stuff for testing
13Changes:
14 debug (1.0-1) hoary; urgency=low
15 .
16 * Testing debug binaries
17Checksums-Sha1:
18 91556113ad38eb35d2fe03d27ae646e0ed487a3d 654 debug-bin_1.0-1_i386.deb
19 d120be63a4535e31ec08657cc4d3018cc8b62d54 668 debug-bin-dbgsym_1.0-1_i386.ddeb
20 d120be63a4535e31ec08657cc4d3018cc8b62d54 668 debug-bin-dbgsym_1.0-1_i386.ddeb
21 473bafe5b391c52f9a527cc550bb1fd6d5256031 692 not-debug-bin-dbgsym_1.0-1_i386.ddeb
22Checksums-Sha256:
23 5ca0ce3d3bfde3cc698d9ad4b027663abecb958bea641d29ac3bf8333fd3ebad 654 debug-bin_1.0-1_i386.deb
24 9c0013badb1bb78fa1ccbf1508398cbf51904f7242d8931f4994c1aa18519b63 668 debug-bin-dbgsym_1.0-1_i386.ddeb
25 9c0013badb1bb78fa1ccbf1508398cbf51904f7242d8931f4994c1aa18519b63 668 debug-bin-dbgsym_1.0-1_i386.ddeb
26 c474f06a1481111b4af58c583df0a2c4504a18c0d2d960db3a0416aafd1bfd0e 692 not-debug-bin-dbgsym_1.0-1_i386.ddeb
27Files:
28 48b4eed5980c754cc74a06ffc4372f64 654 devel optional debug-bin_1.0-1_i386.deb
29 ac5c44025ffc026485b22722e0f13804 668 devel optional debug-bin-dbgsym_1.0-1_i386.ddeb
30 ac5c44025ffc026485b22722e0f13804 668 devel optional debug-bin-dbgsym_1.0-1_i386.ddeb
31 e6cb038fdfed5f1150814f719a618698 692 devel optional not-debug-bin-dbgsym_1.0-1_i386.ddeb
032
=== added file 'lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1_source.changes'
--- lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1_source.changes 1970-01-01 00:00:00 +0000
+++ lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/debug_1.0-1_source.changes 2010-07-22 11:40:00 +0000
@@ -0,0 +1,26 @@
1Format: 1.8
2Date: Thu, 15 Apr 2009 15:14:09 +0100
3Source: debug
4Binary: debug-bin debug-bin-dbgsym
5Architecture: source
6Version: 1.0-1
7Distribution: hoary
8Urgency: low
9Maintainer: Launchpad team <launchpad@lists.canonical.com>
10Changed-By: Celso Providelo <cprov@canonical.com>
11Description:
12 debug-bin - Stuff for testing
13 debug-bin-dbgsym - Stuff for testing DDEBs
14Changes:
15 debug (1.0-1) hoary; urgency=low
16 .
17 * Testing debug binaries
18Checksums-Sha1:
19 f30c2462e897e07534a5c9960a8f653d5a51b066 434 debug_1.0-1.dsc
20 6851f625a32f6c83a1af4c972b5bead14fbee06c 740 debug_1.0-1.tar.gz
21Checksums-Sha256:
22 ab5e1eea2551828761d8734224d1a024be401ac05e83010494a0d9c69b8982c3 434 debug_1.0-1.dsc
23 1a1ed198644169f16eeee93c843ab8b7d9eef25cd91b83f55f497dbe744d3c95 740 debug_1.0-1.tar.gz
24Files:
25 81d19cae151472dfd2f797a69a2c1f54 434 devel optional debug_1.0-1.dsc
26 8225b515f30dd8c0252847f17f4b7069 740 devel optional debug_1.0-1.tar.gz
027
=== added file 'lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/not-debug-bin-dbgsym_1.0-1_i386.ddeb'
1Binary files lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/not-debug-bin-dbgsym_1.0-1_i386.ddeb 1970-01-01 00:00:00 +0000 and lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/not-debug-bin-dbgsym_1.0-1_i386.ddeb 2010-07-22 11:40:00 +0000 differ28Binary files lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/not-debug-bin-dbgsym_1.0-1_i386.ddeb 1970-01-01 00:00:00 +0000 and lib/lp/archiveuploader/tests/data/suite/debug_1.0-1_broken/not-debug-bin-dbgsym_1.0-1_i386.ddeb 2010-07-22 11:40:00 +0000 differ
=== modified file 'lib/lp/archiveuploader/tests/nascentupload-ddebs.txt'
--- lib/lp/archiveuploader/tests/nascentupload-ddebs.txt 2009-10-11 05:25:10 +0000
+++ lib/lp/archiveuploader/tests/nascentupload-ddebs.txt 2010-07-22 11:40:00 +0000
@@ -1,4 +1,5 @@
1== Uploading DDEBs ==1Uploading DDEBs
2===============
23
3DDEBs ('.ddeb' extension) are essentially a Debian binary packages,4DDEBs ('.ddeb' extension) are essentially a Debian binary packages,
4they only use a different extension as a convenience to identify their5they only use a different extension as a convenience to identify their
@@ -9,10 +10,8 @@
9for obtaining extra information about crashes in the corresponding10for obtaining extra information about crashes in the corresponding
10feature.11feature.
1112
12First we will create a source and a corresponding binary publication13 >>> from canonical.config import config
13in the database, 'debug' and 'debug-bin' version '0.9', which will be14 >>> from canonical.testing import LaunchpadZopelessLayer
14an ancestor for the subsequent upload containing a 'debug-bin-dbgsym'
15DDEB. This is done using `SoyuzTestPublisher`.
1615
17 >>> from lp.soyuz.tests.test_publishing import (16 >>> from lp.soyuz.tests.test_publishing import (
18 ... SoyuzTestPublisher)17 ... SoyuzTestPublisher)
@@ -26,31 +25,22 @@
2625
27 >>> unused = test_publisher.setUpDefaultDistroSeries(hoary)26 >>> unused = test_publisher.setUpDefaultDistroSeries(hoary)
2827
29 >>> source_ancestry = test_publisher.getPubSource(28We first upload a new source, 'debug - 1.0-1'. Because this is NEW,
30 ... sourcename='debug', version='0.99')29it is in the queue awaiting overrides and acceptance.
31
32We need a slightly different database setup for creating binaries.
33
34 >>> from canonical.config import config
35 >>> from canonical.testing import LaunchpadZopelessLayer
36
37 >>> LaunchpadZopelessLayer.txn.commit()
38 >>> LaunchpadZopelessLayer.switchDbUser('launchpad')
39
40 >>> binary_ancestry = test_publisher.getPubBinaries(
41 ... binaryname='debug-bin', pub_source=source_ancestry)
42
43 >>> LaunchpadZopelessLayer.txn.commit()
44 >>> LaunchpadZopelessLayer.switchDbUser('uploader')
45
46With that done, we now upload a new source, 'debug - 1.0-1', which is
47immediately accepted and stands pending publication.
4830
49 >>> src = getUploadForSource(31 >>> src = getUploadForSource(
50 ... 'suite/debug_1.0-1/debug_1.0-1_source.changes')32 ... 'suite/debug_1.0-1/debug_1.0-1_source.changes')
51 >>> src.process()33 >>> src.process()
52 >>> result = src.do_accept()34 >>> result = src.do_accept()
53 >>> print src.queue_root.status.name35 >>> print src.queue_root.status.name
36 NEW
37 >>> LaunchpadZopelessLayer.txn.commit()
38
39We don't really care where the source ends up, so we just accept the
40default overrides. It is now pending publication.
41
42 >>> src.queue_root.acceptFromQueue("announce@example.com")
43 >>> print src.queue_root.status.name
54 DONE44 DONE
5545
56 >>> [src_pub] = src.queue_root.archive.getPublishedSources(46 >>> [src_pub] = src.queue_root.archive.getPublishedSources(
@@ -66,17 +56,46 @@
66 >>> bin = getUploadForBinary(56 >>> bin = getUploadForBinary(
67 ... 'suite/debug_1.0-1/debug_1.0-1_i386.changes')57 ... 'suite/debug_1.0-1/debug_1.0-1_i386.changes')
6858
69DDEBs undergo exactly the same checks as ordinary DEBs. These are59Because the DEB is new, the binary upload is held in NEW.
70never considered NEW, so the binary upload has a 'never-seen-before'
71DDEB even though it isn't parked in queue for review.
7260
73 >>> bin.process()61 >>> bin.process()
74 >>> result = bin.do_accept()62 >>> result = bin.do_accept()
75 >>> print bin.queue_root.status.name63 >>> print bin.queue_root.status.name
64 NEW
65
66This upload has one build with two binaries: a DEB and its corresponding
67DDEB.
68
69 >>> build = bin.queue_root.builds[0].build
70 >>> build.binarypackages.count()
71 2
72 >>> print build.binarypackages[0].binpackageformat.name
73 DEB
74 >>> print build.binarypackages[1].binpackageformat.name
75 DDEB
76 >>> build.binarypackages[0].debug_package == build.binarypackages[1]
77 True
78 >>> build.binarypackages[1].debug_package is None
79 True
80
81We override the binary to main/devel, and accept it into the archive.
82
83 >>> from lp.soyuz.interfaces.component import IComponentSet
84 >>> from lp.soyuz.interfaces.section import ISectionSet
85 >>> main = getUtility(IComponentSet)['main']
86 >>> universe = getUtility(IComponentSet)['universe']
87 >>> devel = getUtility(ISectionSet)['devel']
88
89 >>> LaunchpadZopelessLayer.txn.commit()
90 >>> LaunchpadZopelessLayer.switchDbUser('launchpad')
91
92 >>> bin.queue_root.overrideBinaries(main, devel, None, [main, universe])
93 True
94 >>> bin.queue_root.acceptFromQueue('announce@example.com')
95
96 >>> print bin.queue_root.status.name
76 ACCEPTED97 ACCEPTED
7798
78Again, binary publications need an extra database setup.
79
80 >>> LaunchpadZopelessLayer.txn.commit()99 >>> LaunchpadZopelessLayer.txn.commit()
81 >>> LaunchpadZopelessLayer.switchDbUser(config.uploadqueue.dbuser)100 >>> LaunchpadZopelessLayer.switchDbUser(config.uploadqueue.dbuser)
82101
@@ -88,11 +107,12 @@
88Now, both, binary and debug-symbol packages are pending publication.107Now, both, binary and debug-symbol packages are pending publication.
89108
90 >>> for bin_pub in bin_pubs:109 >>> for bin_pub in bin_pubs:
91 ... print '%s %s %s' % (110 ... print '%s %s %s %s %s' % (
92 ... bin_pub.displayname, bin_pub.status.name,111 ... bin_pub.displayname, bin_pub.status.name,
112 ... bin_pub.component.name, bin_pub.section.name,
93 ... bin_pub.archive.purpose.name)113 ... bin_pub.archive.purpose.name)
94 debug-bin 1.0-1 in hoary i386 PENDING PRIMARY114 debug-bin 1.0-1 in hoary i386 PENDING main devel PRIMARY
95 debug-bin-dbgsym 1.0-1 in hoary i386 PENDING DEBUG115 debug-bin-dbgsym 1.0-1 in hoary i386 PENDING main devel DEBUG
96116
97DEBs and DDEBs are uploaded to separate archives, because the size117DEBs and DDEBs are uploaded to separate archives, because the size
98impact of uploading them to a single archive on mirrors would be118impact of uploading them to a single archive on mirrors would be
@@ -118,7 +138,8 @@
118 debug-bin-dbgsym_1.0-1_i386.ddeb DDEB138 debug-bin-dbgsym_1.0-1_i386.ddeb DDEB
119139
120140
121== DDEBs in other archives ==141DDEBs in other archives
142-----------------------
122143
123DDEBs can be produced in other contexts than the primary archive. For144DDEBs can be produced in other contexts than the primary archive. For
124instance, a COPY (test-rebuild) archive. In this case, they will be145instance, a COPY (test-rebuild) archive. In this case, they will be
@@ -134,14 +155,14 @@
134 ... owner=ubuntu.owner, purpose=ArchivePurpose.COPY,155 ... owner=ubuntu.owner, purpose=ArchivePurpose.COPY,
135 ... name='test-rebuild')156 ... name='test-rebuild')
136157
137 >>> copied_source = source_ancestry.copyTo(
138 ... hoary, source_ancestry.pocket, copy)
139
140 >>> LaunchpadZopelessLayer.txn.commit()158 >>> LaunchpadZopelessLayer.txn.commit()
141 >>> LaunchpadZopelessLayer.switchDbUser('launchpad')159 >>> LaunchpadZopelessLayer.switchDbUser('launchpad')
142160
161 >>> initial_source = test_publisher.getPubSource(
162 ... sourcename='debug', version='0.9', archive=copy)
163
143 >>> binary_ancestry2 = test_publisher.getPubBinaries(164 >>> binary_ancestry2 = test_publisher.getPubBinaries(
144 ... binaryname='debug-bin', pub_source=copied_source, archive=copy)165 ... binaryname='debug-bin', pub_source=initial_source, archive=copy)
145166
146 >>> src_pub = test_publisher.getPubSource(167 >>> src_pub = test_publisher.getPubSource(
147 ... sourcename='debug', version='1.0-1', archive=copy)168 ... sourcename='debug', version='1.0-1', archive=copy)
@@ -172,9 +193,27 @@
172 >>> LaunchpadZopelessLayer.switchDbUser('uploader')193 >>> LaunchpadZopelessLayer.switchDbUser('uploader')
173194
174 >>> for bin_pub in bin_pubs:195 >>> for bin_pub in bin_pubs:
175 ... print '%s %s %s' % (196 ... print '%s %s %s %s %s' % (
176 ... bin_pub.displayname, bin_pub.status.name,197 ... bin_pub.displayname, bin_pub.status.name,
198 ... bin_pub.component.name, bin_pub.section.name,
177 ... bin_pub.archive.purpose.name)199 ... bin_pub.archive.purpose.name)
178 debug-bin 1.0-1 in hoary i386 PENDING COPY200 debug-bin 1.0-1 in hoary i386 PENDING main devel COPY
179 debug-bin-dbgsym 1.0-1 in hoary i386 PENDING COPY201 debug-bin-dbgsym 1.0-1 in hoary i386 PENDING main devel COPY
180202
203
204Mismatched DDEBs
205----------------
206
207Each uploaded DDEB must be associated with a normal DEB. Any duplicated
208DDEBs or DDEBs without matching DEBs will cause the upload to be
209rejected.
210
211 >>> bin = getUploadForBinary(
212 ... 'suite/debug_1.0-1_broken/debug_1.0-1_i386.changes')
213 >>> bin.process()
214 >>> bin.is_rejected
215 True
216 >>> print bin.rejection_message
217 Duplicated debug packages: debug-bin-dbgsym 1.0-1 (i386)
218 Orphaned debug packages: not-debug-bin-dbgsym 1.0-1 (i386)
219
181220
=== modified file 'lib/lp/soyuz/doc/archive-files.txt'
--- lib/lp/soyuz/doc/archive-files.txt 2010-05-11 07:09:18 +0000
+++ lib/lp/soyuz/doc/archive-files.txt 2010-07-22 11:40:00 +0000
@@ -209,3 +209,11 @@
209209
210 >>> deb == build.getFileByName('test_1.0_all.deb')210 >>> deb == build.getFileByName('test_1.0_all.deb')
211 True211 True
212
213We can also retrieve the corresponding BinaryPackageFile:
214
215 >>> bpf = build.getBinaryPackageFileByName('test_1.0_all.deb')
216 >>> bpf
217 <BinaryPackageFile ...>
218 >>> bpf.libraryfile == deb
219 True
212220
=== modified file 'lib/lp/soyuz/doc/binarypackagebuild.txt'
--- lib/lp/soyuz/doc/binarypackagebuild.txt 2010-07-17 12:56:41 +0000
+++ lib/lp/soyuz/doc/binarypackagebuild.txt 2010-07-22 11:40:00 +0000
@@ -323,6 +323,7 @@
323 >>> pre_depends = None323 >>> pre_depends = None
324 >>> enhances = None324 >>> enhances = None
325 >>> breaks = None325 >>> breaks = None
326 >>> debug_package = None
326327
327Invoke createBinaryPackageRelease with all required arguments.328Invoke createBinaryPackageRelease with all required arguments.
328329
@@ -334,7 +335,7 @@
334 ... binpackageformat, component, section, priority, shlibdeps,335 ... binpackageformat, component, section, priority, shlibdeps,
335 ... depends, recommends, suggests, conflicts, replaces, provides,336 ... depends, recommends, suggests, conflicts, replaces, provides,
336 ... pre_depends, enhances, breaks, essential, installedsize,337 ... pre_depends, enhances, breaks, essential, installedsize,
337 ... architecturespecific)338 ... architecturespecific, debug_package)
338339
339 >>> from canonical.launchpad.interfaces import IBinaryPackageRelease340 >>> from canonical.launchpad.interfaces import IBinaryPackageRelease
340 >>> from canonical.launchpad.webapp.testing import verifyObject341 >>> from canonical.launchpad.webapp.testing import verifyObject
@@ -367,7 +368,7 @@
367 ... binpackageformat, component, section, priority, shlibdeps,368 ... binpackageformat, component, section, priority, shlibdeps,
368 ... depends, recommends, suggests, conflicts, replaces, provides,369 ... depends, recommends, suggests, conflicts, replaces, provides,
369 ... pre_depends, enhances, breaks, essential, installedsize,370 ... pre_depends, enhances, breaks, essential, installedsize,
370 ... architecturespecific)371 ... architecturespecific, debug_package)
371372
372373
373Check if the property is still working:374Check if the property is still working:
374375
=== modified file 'lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt'
--- lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt 2010-04-12 08:29:02 +0000
+++ lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt 2010-07-22 11:40:00 +0000
@@ -66,7 +66,8 @@
66 ... breaks=None,66 ... breaks=None,
67 ... essential=False,67 ... essential=False,
68 ... installedsize=0,68 ... installedsize=0,
69 ... architecturespecific=False)69 ... architecturespecific=False,
70 ... debug_package=None)
7071
71 >>> pe = BinaryPackagePublishingHistory(72 >>> pe = BinaryPackagePublishingHistory(
72 ... binarypackagerelease=bpr.id,73 ... binarypackagerelease=bpr.id,
@@ -107,7 +108,8 @@
107 ... breaks=None,108 ... breaks=None,
108 ... essential=False,109 ... essential=False,
109 ... installedsize=0,110 ... installedsize=0,
110 ... architecturespecific=False)111 ... architecturespecific=False,
112 ... debug_package=None)
111113
112 >>> pe = BinaryPackagePublishingHistory(114 >>> pe = BinaryPackagePublishingHistory(
113 ... binarypackagerelease=bpr.id,115 ... binarypackagerelease=bpr.id,
114116
=== 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-22 11:40:00 +0000
@@ -127,7 +127,8 @@
127 binarypackagename, version, summary, description, binpackageformat,127 binarypackagename, version, summary, description, binpackageformat,
128 component, section, priority, shlibdeps, depends, recommends,128 component, section, priority, shlibdeps, depends, recommends,
129 suggests, conflicts, replaces, provides, pre_depends, enhances,129 suggests, conflicts, replaces, provides, pre_depends, enhances,
130 breaks, essential, installedsize, architecturespecific):130 breaks, essential, installedsize, architecturespecific,
131 debug_package):
131 """Create and return a `BinaryPackageRelease`.132 """Create and return a `BinaryPackageRelease`.
132133
133 The binarypackagerelease will be attached to this specific build.134 The binarypackagerelease will be attached to this specific build.
@@ -152,6 +153,13 @@
152 :return the corresponding `ILibraryFileAlias` if the file was found.153 :return the corresponding `ILibraryFileAlias` if the file was found.
153 """154 """
154155
156 def getBinaryPackageFileByName(filename):
157 """Return the corresponding `IBinaryPackageFile` in this context.
158
159 :param filename: the filename to look up.
160 :return: the corresponding `IBinaryPackageFile` if it was found.
161 """
162
155163
156class IBinaryPackageBuildEdit(Interface):164class IBinaryPackageBuildEdit(Interface):
157 """A Build interface for items requiring launchpad.Edit."""165 """A Build interface for items requiring launchpad.Edit."""
158166
=== 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-22 11:40:00 +0000
@@ -18,7 +18,7 @@
18from lazr.enum import DBEnumeratedType, DBItem18from lazr.enum import DBEnumeratedType, DBItem
19from lazr.restful.declarations import exported, export_as_webservice_entry19from lazr.restful.declarations import exported, export_as_webservice_entry
20from lazr.restful.fields import Reference, ReferenceChoice20from lazr.restful.fields import Reference, ReferenceChoice
21from zope.schema import Bool, Date, Int, Text, TextLine, Datetime21from zope.schema import Bool, Date, Datetime, Int, Object, Text, TextLine
22from zope.interface import Interface, Attribute22from zope.interface import Interface, Attribute
2323
24from canonical.launchpad import _24from canonical.launchpad import _
@@ -52,6 +52,10 @@
52 installedsize = Int(required=False)52 installedsize = Int(required=False)
53 architecturespecific = Bool(required=True)53 architecturespecific = Bool(required=True)
54 datecreated = Datetime(required=True, readonly=True)54 datecreated = Datetime(required=True, readonly=True)
55 debug_package = Object(
56 title=_("Debug package"), schema=Interface, required=False,
57 description=_("The corresponding package containing debug symbols "
58 "for this binary."))
5559
56 files = Attribute("Related list of IBinaryPackageFile entries")60 files = Attribute("Related list of IBinaryPackageFile entries")
5761
5862
=== modified file 'lib/lp/soyuz/model/binarypackagebuild.py'
--- lib/lp/soyuz/model/binarypackagebuild.py 2010-07-20 19:12:33 +0000
+++ lib/lp/soyuz/model/binarypackagebuild.py 2010-07-22 11:40:00 +0000
@@ -451,7 +451,7 @@
451 binpackageformat, component,section, priority, shlibdeps,451 binpackageformat, component,section, priority, shlibdeps,
452 depends, recommends, suggests, conflicts, replaces, provides,452 depends, recommends, suggests, conflicts, replaces, provides,
453 pre_depends, enhances, breaks, essential, installedsize,453 pre_depends, enhances, breaks, essential, installedsize,
454 architecturespecific):454 architecturespecific, debug_package):
455 """See IBuild."""455 """See IBuild."""
456 return BinaryPackageRelease(456 return BinaryPackageRelease(
457 build=self, binarypackagename=binarypackagename, version=version,457 build=self, binarypackagename=binarypackagename, version=version,
@@ -462,7 +462,8 @@
462 suggests=suggests, conflicts=conflicts, replaces=replaces,462 suggests=suggests, conflicts=conflicts, replaces=replaces,
463 provides=provides, pre_depends=pre_depends, enhances=enhances,463 provides=provides, pre_depends=pre_depends, enhances=enhances,
464 breaks=breaks, essential=essential, installedsize=installedsize,464 breaks=breaks, essential=essential, installedsize=installedsize,
465 architecturespecific=architecturespecific)465 architecturespecific=architecturespecific,
466 debug_package=debug_package)
466467
467 def estimateDuration(self):468 def estimateDuration(self):
468 """See `IBuildBase`."""469 """See `IBuildBase`."""
@@ -678,14 +679,11 @@
678679
679 def _getDebByFileName(self, filename):680 def _getDebByFileName(self, filename):
680 """Helper function to get a .deb LFA in the context of this build."""681 """Helper function to get a .deb LFA in the context of this build."""
681 store = Store.of(self)682 bpf = self.getBinaryPackageFileByName(filename)
682 return store.find(683 if bpf is not None:
683 LibraryFileAlias,684 return bpf.libraryfile
684 BinaryPackageRelease.build == self.id,685 else:
685 BinaryPackageFile.binarypackagerelease == BinaryPackageRelease.id,686 return None
686 LibraryFileAlias.id == BinaryPackageFile.libraryfileID,
687 LibraryFileAlias.filename == filename
688 ).one()
689687
690 def getFileByName(self, filename):688 def getFileByName(self, filename):
691 """See `IBuild`."""689 """See `IBuild`."""
@@ -705,6 +703,15 @@
705703
706 raise NotFoundError(filename)704 raise NotFoundError(filename)
707705
706 def getBinaryPackageFileByName(self, filename):
707 """See `IBuild`."""
708 return Store.of(self).find(
709 BinaryPackageFile,
710 BinaryPackageRelease.build == self.id,
711 BinaryPackageFile.binarypackagerelease == BinaryPackageRelease.id,
712 LibraryFileAlias.id == BinaryPackageFile.libraryfileID,
713 LibraryFileAlias.filename == filename).one()
714
708 def getSpecificJob(self):715 def getSpecificJob(self):
709 """See `IBuildFarmJob`."""716 """See `IBuildFarmJob`."""
710 # If we are asked to adapt an object that is already a binary717 # If we are asked to adapt an object that is already a binary
711718
=== modified file 'lib/lp/soyuz/model/binarypackagerelease.py'
--- lib/lp/soyuz/model/binarypackagerelease.py 2010-05-11 09:35:33 +0000
+++ lib/lp/soyuz/model/binarypackagerelease.py 2010-07-22 11:40:00 +0000
@@ -62,6 +62,8 @@
62 architecturespecific = BoolCol(dbName='architecturespecific',62 architecturespecific = BoolCol(dbName='architecturespecific',
63 notNull=True)63 notNull=True)
64 datecreated = UtcDateTimeCol(notNull=True, default=UTC_NOW)64 datecreated = UtcDateTimeCol(notNull=True, default=UTC_NOW)
65 debug_package = ForeignKey(dbName='debug_package',
66 foreignKey='BinaryPackageRelease')
6567
66 files = SQLMultipleJoin('BinaryPackageFile',68 files = SQLMultipleJoin('BinaryPackageFile',
67 joinColumn='binarypackagerelease', orderBy="libraryfile")69 joinColumn='binarypackagerelease', orderBy="libraryfile")
6870
=== modified file 'lib/lp/soyuz/tests/test_publishing.py'
--- lib/lp/soyuz/tests/test_publishing.py 2010-07-21 14:14:54 +0000
+++ lib/lp/soyuz/tests/test_publishing.py 2010-07-22 11:40:00 +0000
@@ -321,7 +321,7 @@
321 summary="summary", description="description", shlibdep=None,321 summary="summary", description="description", shlibdep=None,
322 depends=None, recommends=None, suggests=None, conflicts=None,322 depends=None, recommends=None, suggests=None, conflicts=None,
323 replaces=None, provides=None, pre_depends=None, enhances=None,323 replaces=None, provides=None, pre_depends=None, enhances=None,
324 breaks=None, format=BinaryPackageFormat.DEB):324 breaks=None, format=BinaryPackageFormat.DEB, debug_package=None):
325 """Return the corresponding `BinaryPackageRelease`."""325 """Return the corresponding `BinaryPackageRelease`."""
326 sourcepackagerelease = build.source_package_release326 sourcepackagerelease = build.source_package_release
327 distroarchseries = build.distro_arch_series327 distroarchseries = build.distro_arch_series
@@ -352,7 +352,8 @@
352 installedsize=100,352 installedsize=100,
353 architecturespecific=architecturespecific,353 architecturespecific=architecturespecific,
354 binpackageformat=format,354 binpackageformat=format,
355 priority=PackagePublishingPriority.STANDARD)355 priority=PackagePublishingPriority.STANDARD,
356 debug_package=debug_package)
356357
357 # Create the corresponding binary file.358 # Create the corresponding binary file.
358 if architecturespecific:359 if architecturespecific:

Subscribers

People subscribed via source and target branches

to status/vote changes: