Merge lp:~michael.nelson/launchpad/567922-binarypackagebuild-new-table-4 into lp:launchpad/db-devel

Proposed by Michael Nelson
Status: Merged
Approved by: Edwin Grubbs
Approved revision: no longer in the source branch.
Merged at revision: 9405
Proposed branch: lp:~michael.nelson/launchpad/567922-binarypackagebuild-new-table-4
Merge into: lp:launchpad/db-devel
Prerequisite: lp:~michael.nelson/launchpad/567922-binarypackagebuild-new-table-3
Diff against target: 785 lines (+163/-116) (has conflicts)
21 files modified
lib/lp/archiveuploader/nascentupload.py (+2/-2)
lib/lp/archiveuploader/nascentuploadfile.py (+4/-4)
lib/lp/buildmaster/browser/configure.zcml (+2/-1)
lib/lp/buildmaster/browser/packagebuild.py (+0/-42)
lib/lp/buildmaster/interfaces/buildfarmjob.py (+6/-1)
lib/lp/buildmaster/model/buildfarmjob.py (+7/-0)
lib/lp/buildmaster/tests/test_buildfarmjob.py (+24/-0)
lib/lp/soyuz/adapters/archivedependencies.py (+2/-2)
lib/lp/soyuz/doc/archive-dependencies.txt (+9/-8)
lib/lp/soyuz/doc/archive-files.txt (+1/-1)
lib/lp/soyuz/doc/archive.txt (+2/-2)
lib/lp/soyuz/doc/build-failedtoupload-workflow.txt (+4/-4)
lib/lp/soyuz/model/archive.py (+9/-6)
lib/lp/soyuz/model/binarypackagebuild.py (+33/-20)
lib/lp/soyuz/model/binarypackagerelease.py (+3/-3)
lib/lp/soyuz/model/distributionsourcepackagerelease.py (+10/-6)
lib/lp/soyuz/model/publishing.py (+6/-5)
lib/lp/soyuz/model/queue.py (+2/-2)
lib/lp/soyuz/model/sourcepackagerelease.py (+7/-5)
lib/lp/soyuz/tests/test_binarypackagebuild.py (+28/-0)
lib/lp/soyuz/tests/test_packageupload.py (+2/-2)
Text conflict in lib/lp/buildmaster/interfaces/buildbase.py
Text conflict in lib/lp/buildmaster/model/buildbase.py
Text conflict in lib/lp/buildmaster/tests/test_buildbase.py
Text conflict in lib/lp/code/model/sourcepackagerecipebuild.py
To merge this branch: bzr merge lp:~michael.nelson/launchpad/567922-binarypackagebuild-new-table-4
Reviewer Review Type Date Requested Status
Edwin Grubbs (community) code Approve
Review via email: mp+25138@code.launchpad.net

Description of the change

This branch is part of a pipeline for

https://blueprints.edge.launchpad.net/soyuz/+spec/build-generalisation
https://dev.launchpad.net/LEP/GeneralBuildHistories

**Note**: If it's possible, please ignore the conflicts with db-devel - it's due to a reversion of some work that was in db-devel and that I'd already pumped through the pipeline, and I'm waiting for that work to land again on db-devel before re-merging and pumping.

The actual diff of this branch from the previous is:
http://pastebin.ubuntu.com/432164/

Overview
========
This branch continues the work to switch our BinaryPackageBuild class to the new binarypackagebuild table (using the delegated PackageBuild/BuildFarmJob).

It (finally) gets all the soyuz unit tests passing.

Details
=======
This branch just gets the remaining soyuz unit tests passing and starts on the soyuz doctests.

This branch is dependent on the pending schema patch in a previous branch.

To test
=======

First update the test db schema (required as the db patch still needs to be updated to remove the old build table):
psql launchpad_ftest_template -f database/schema/pending/michaeln-build-generalisation.sql
bin/py database/schema/security.py -d launchpad_ftest_template

And then:
bin/test -vv -t test_packageupload -t doc/archive-files.txt -t doc/archive.txt -t doc/binarypackagerelease.txt -t build-failedtoupload-workflow.txt

The next branch will continue getting the soyuz doctests passing with the new model.

To post a comment you must log in.
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Looks good.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/archiveuploader/nascentupload.py'
--- lib/lp/archiveuploader/nascentupload.py 2010-02-26 16:52:46 +0000
+++ lib/lp/archiveuploader/nascentupload.py 2010-05-12 11:01:39 +0000
@@ -780,7 +780,7 @@
780 # fine.780 # fine.
781 ancestry = self.getBinaryAncestry(781 ancestry = self.getBinaryAncestry(
782 uploaded_file, try_other_archs=False)782 uploaded_file, try_other_archs=False)
783 if (ancestry is not None and 783 if (ancestry is not None and
784 not self.policy.archive.is_copy):784 not self.policy.archive.is_copy):
785 # Ignore version checks for copy archives785 # Ignore version checks for copy archives
786 # because the ancestry comes from the primary786 # because the ancestry comes from the primary
@@ -962,7 +962,7 @@
962 for build in self.queue_root.builds]962 for build in self.queue_root.builds]
963 if considered_build.id in attached_builds:963 if considered_build.id in attached_builds:
964 continue964 continue
965 assert (considered_build.sourcepackagerelease.id ==965 assert (considered_build.source_package_release.id ==
966 sourcepackagerelease.id), (966 sourcepackagerelease.id), (
967 "Upload contains binaries of different sources.")967 "Upload contains binaries of different sources.")
968 self.queue_root.addBuild(considered_build)968 self.queue_root.addBuild(considered_build)
969969
=== modified file 'lib/lp/archiveuploader/nascentuploadfile.py'
--- lib/lp/archiveuploader/nascentuploadfile.py 2010-04-09 15:46:09 +0000
+++ lib/lp/archiveuploader/nascentuploadfile.py 2010-05-12 11:01:39 +0000
@@ -806,7 +806,7 @@
806 build = sourcepackagerelease.getBuildByArch(806 build = sourcepackagerelease.getBuildByArch(
807 dar, self.policy.archive)807 dar, self.policy.archive)
808 if build is not None:808 if build is not None:
809 build.buildstate = BuildStatus.FULLYBUILT809 build.status = BuildStatus.FULLYBUILT
810 self.logger.debug("Updating build for %s: %s" % (810 self.logger.debug("Updating build for %s: %s" % (
811 dar.architecturetag, build.id))811 dar.architecturetag, build.id))
812 else:812 else:
@@ -822,7 +822,7 @@
822 # Ensure gathered binary is related to a FULLYBUILT build822 # Ensure gathered binary is related to a FULLYBUILT build
823 # record. It will be check in slave-scanner procedure to823 # record. It will be check in slave-scanner procedure to
824 # certify that the build was processed correctly.824 # certify that the build was processed correctly.
825 build.buildstate = BuildStatus.FULLYBUILT825 build.status = BuildStatus.FULLYBUILT
826 # Also purge any previous failed upload_log stored, so its826 # Also purge any previous failed upload_log stored, so its
827 # content can be garbage-collected since it's not useful827 # content can be garbage-collected since it's not useful
828 # anymore.828 # anymore.
@@ -831,9 +831,9 @@
831 # Sanity check; raise an error if the build we've been831 # Sanity check; raise an error if the build we've been
832 # told to link to makes no sense (ie. is not for the right832 # told to link to makes no sense (ie. is not for the right
833 # source package).833 # source package).
834 if (build.sourcepackagerelease != sourcepackagerelease or834 if (build.source_package_release != sourcepackagerelease or
835 build.pocket != self.policy.pocket or835 build.pocket != self.policy.pocket or
836 build.distroarchseries != dar or836 build.distro_arch_series != dar or
837 build.archive != self.policy.archive):837 build.archive != self.policy.archive):
838 raise UploadError(838 raise UploadError(
839 "Attempt to upload binaries specifying "839 "Attempt to upload binaries specifying "
840840
=== modified file 'lib/lp/buildmaster/browser/configure.zcml'
--- lib/lp/buildmaster/browser/configure.zcml 2010-05-12 11:01:28 +0000
+++ lib/lp/buildmaster/browser/configure.zcml 2010-05-12 11:01:39 +0000
@@ -10,5 +10,6 @@
10 i18n_domain="launchpad">10 i18n_domain="launchpad">
11 <browser:url11 <browser:url
12 for="lp.buildmaster.interfaces.packagebuild.IPackageBuild"12 for="lp.buildmaster.interfaces.packagebuild.IPackageBuild"
13 urldata="lp.buildmaster.browser.packagebuild.PackageBuildUrl"/>13 path_expression="string:+build/${build_farm_job/id}"
14 attribute_to_parent="archive"/>
14</configure>15</configure>
1516
=== removed file 'lib/lp/buildmaster/browser/packagebuild.py'
--- lib/lp/buildmaster/browser/packagebuild.py 2010-05-12 11:01:28 +0000
+++ lib/lp/buildmaster/browser/packagebuild.py 1970-01-01 00:00:00 +0000
@@ -1,42 +0,0 @@
1# Copyright 2010 Canonical Ltd. This software is licensed under the
2# GNU Affero General Public License version 3 (see the file LICENSE).
3
4"""URLs for PackageBuild classes."""
5
6from zope.interface import implements
7
8from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
9
10
11class PackageBuildUrl:
12 """Dynamic URL declaration for IPackageBuild classes.
13
14 When dealing with distribution builds we want to present them
15 under IDistributionSourcePackageRelease url:
16
17 /ubuntu/+source/foo/1.0/+build/1234
18
19 On the other hand, PPA builds will be presented under the PPA page:
20
21 /~cprov/+archive/+build/1235
22
23 Copy archives will be presented under the archives page:
24 /ubuntu/+archive/my-special-archive/+build/1234
25 """
26 implements(ICanonicalUrlData)
27 rootsite = None
28
29 def __init__(self, context):
30 self.context = context
31
32 @property
33 def inside(self):
34 if self.context.archive.is_ppa or self.context.archive.is_copy:
35 return self.context.archive
36 else:
37 return self.context.distributionsourcepackagerelease
38
39 @property
40 def path(self):
41 return u"+build/%d" % self.context.build_farm_job.id
42
430
=== modified file 'lib/lp/buildmaster/interfaces/buildfarmjob.py'
--- lib/lp/buildmaster/interfaces/buildfarmjob.py 2010-05-12 11:01:28 +0000
+++ lib/lp/buildmaster/interfaces/buildfarmjob.py 2010-05-12 11:01:39 +0000
@@ -15,7 +15,7 @@
15 ]15 ]
1616
17from zope.interface import Interface, Attribute17from zope.interface import Interface, Attribute
18from zope.schema import Bool, Choice, Datetime, TextLine18from zope.schema import Bool, Choice, Datetime, TextLine, Timedelta
19from lazr.enum import DBEnumeratedType, DBItem19from lazr.enum import DBEnumeratedType, DBItem
20from lazr.restful.declarations import exported20from lazr.restful.declarations import exported
21from lazr.restful.fields import Reference21from lazr.restful.fields import Reference
@@ -194,6 +194,11 @@
194 "The timestamp when the build farm job was finished.")),194 "The timestamp when the build farm job was finished.")),
195 ("1.0", dict(exported=True, exported_as="datebuilt")))195 ("1.0", dict(exported=True, exported_as="datebuilt")))
196196
197 duration = Timedelta(
198 title=_("Duration"), required=False,
199 description=_("Duration interval, calculated when the "
200 "result gets collected."))
201
197 date_first_dispatched = exported(202 date_first_dispatched = exported(
198 Datetime(203 Datetime(
199 title=_("Date finished"), required=False, readonly=True,204 title=_("Date finished"), required=False, readonly=True,
200205
=== modified file 'lib/lp/buildmaster/model/buildfarmjob.py'
--- lib/lp/buildmaster/model/buildfarmjob.py 2010-05-12 11:01:28 +0000
+++ lib/lp/buildmaster/model/buildfarmjob.py 2010-05-12 11:01:39 +0000
@@ -220,6 +220,13 @@
220 """See `IBuildFarmJob`."""220 """See `IBuildFarmJob`."""
221 return self.job_type.title221 return self.job_type.title
222222
223 @property
224 def duration(self):
225 """See `IBuildFarmJob`."""
226 if self.date_started is None or self.date_finished is None:
227 return None
228 return self.date_finished - self.date_started
229
223 def makeJob(self):230 def makeJob(self):
224 """See `IBuildFarmJob`."""231 """See `IBuildFarmJob`."""
225 raise NotImplementedError232 raise NotImplementedError
226233
=== modified file 'lib/lp/buildmaster/tests/test_buildfarmjob.py'
--- lib/lp/buildmaster/tests/test_buildfarmjob.py 2010-05-12 11:01:28 +0000
+++ lib/lp/buildmaster/tests/test_buildfarmjob.py 2010-05-12 11:01:39 +0000
@@ -5,10 +5,13 @@
55
6__metaclass__ = type6__metaclass__ = type
77
8from datetime import datetime, timedelta
9import pytz
8import unittest10import unittest
911
10from storm.store import Store12from storm.store import Store
11from zope.component import getUtility13from zope.component import getUtility
14from zope.security.proxy import removeSecurityProxy
1215
13from canonical.database.sqlbase import flush_database_updates16from canonical.database.sqlbase import flush_database_updates
14from canonical.testing.layers import DatabaseFunctionalLayer17from canonical.testing.layers import DatabaseFunctionalLayer
@@ -112,6 +115,27 @@
112 self.build_farm_job.job_type.title,115 self.build_farm_job.job_type.title,
113 self.build_farm_job.title)116 self.build_farm_job.title)
114117
118 def test_duration_none(self):
119 # If either start or finished is none, the duration will be
120 # none.
121 self.build_farm_job.jobStarted()
122 self.failUnlessEqual(None, self.build_farm_job.duration)
123
124 self.build_farm_job.jobAborted()
125 removeSecurityProxy(self.build_farm_job).date_finished = (
126 datetime.now(pytz.UTC))
127 self.failUnlessEqual(None, self.build_farm_job.duration)
128
129 def test_duration_set(self):
130 # If both start and finished are defined, the duration will be
131 # returned.
132 now = datetime.now(pytz.UTC)
133 duration = timedelta(1)
134 naked_bfj = removeSecurityProxy(self.build_farm_job)
135 naked_bfj.date_started = now
136 naked_bfj.date_finished = now + duration
137 self.failUnlessEqual(duration, self.build_farm_job.duration)
138
115139
116def test_suite():140def test_suite():
117 return unittest.TestLoader().loadTestsFromName(__name__)141 return unittest.TestLoader().loadTestsFromName(__name__)
118142
=== modified file 'lib/lp/soyuz/adapters/archivedependencies.py'
--- lib/lp/soyuz/adapters/archivedependencies.py 2010-02-26 13:42:51 +0000
+++ lib/lp/soyuz/adapters/archivedependencies.py 2010-05-12 11:01:39 +0000
@@ -168,7 +168,7 @@
168168
169 # Consider user-selected archive dependencies.169 # Consider user-selected archive dependencies.
170 primary_component = get_primary_current_component(170 primary_component = get_primary_current_component(
171 build.archive, build.distroseries, sourcepackagename)171 build.archive, build.distro_series, sourcepackagename)
172 for archive_dependency in build.archive.dependencies:172 for archive_dependency in build.archive.dependencies:
173 # When the dependency component is undefined, we should use173 # When the dependency component is undefined, we should use
174 # the component where the source is published in the primary174 # the component where the source is published in the primary
@@ -272,7 +272,7 @@
272 primary_dependencies = []272 primary_dependencies = []
273 for pocket in primary_pockets:273 for pocket in primary_pockets:
274 primary_dependencies.append(274 primary_dependencies.append(
275 (build.distroseries.distribution.main_archive, pocket,275 (build.distro_series.distribution.main_archive, pocket,
276 primary_components))276 primary_components))
277277
278 return primary_dependencies278 return primary_dependencies
279279
=== modified file 'lib/lp/soyuz/doc/archive-dependencies.txt'
--- lib/lp/soyuz/doc/archive-dependencies.txt 2010-03-11 01:39:25 +0000
+++ lib/lp/soyuz/doc/archive-dependencies.txt 2010-05-12 11:01:39 +0000
@@ -205,8 +205,9 @@
205 ... get_sources_list_for_building)205 ... get_sources_list_for_building)
206206
207 >>> def print_building_sources_list(candidate):207 >>> def print_building_sources_list(candidate):
208 ... sources_list = get_sources_list_for_building(candidate,208 ... sources_list = get_sources_list_for_building(
209 ... candidate.distroarchseries, candidate.sourcepackagerelease.name)209 ... candidate, candidate.distro_arch_series,
210 ... candidate.source_package_release.name)
210 ... for line in sources_list:211 ... for line in sources_list:
211 ... print line212 ... print line
212213
@@ -219,7 +220,7 @@
219 ... PackagePublishingStatus)220 ... PackagePublishingStatus)
220221
221 >>> cprov.archive.getAllPublishedBinaries(222 >>> cprov.archive.getAllPublishedBinaries(
222 ... distroarchseries=a_build.distroarchseries,223 ... distroarchseries=a_build.distro_arch_series,
223 ... status=PackagePublishingStatus.PUBLISHED).count()224 ... status=PackagePublishingStatus.PUBLISHED).count()
224 0225 0
225226
@@ -323,9 +324,9 @@
323 deb http://ppa.launchpad.dev/cprov/ppa/ubuntu hoary main324 deb http://ppa.launchpad.dev/cprov/ppa/ubuntu hoary main
324 deb http://ftpmaster.internal/ubuntu hoary325 deb http://ftpmaster.internal/ubuntu hoary
325 main restricted universe multiverse326 main restricted universe multiverse
326 deb http://ftpmaster.internal/ubuntu hoary-security 327 deb http://ftpmaster.internal/ubuntu hoary-security
327 main restricted universe multiverse328 main restricted universe multiverse
328 deb http://ftpmaster.internal/ubuntu hoary-updates 329 deb http://ftpmaster.internal/ubuntu hoary-updates
329 main restricted universe multiverse330 main restricted universe multiverse
330331
331However, in order to avoid the problem going forward (and to allow the PPA332However, in order to avoid the problem going forward (and to allow the PPA
@@ -363,9 +364,9 @@
363 deb http://ppa.launchpad.dev/cprov/ppa/ubuntu hoary main364 deb http://ppa.launchpad.dev/cprov/ppa/ubuntu hoary main
364 deb http://ftpmaster.internal/ubuntu hoary365 deb http://ftpmaster.internal/ubuntu hoary
365 main restricted universe multiverse366 main restricted universe multiverse
366 deb http://ftpmaster.internal/ubuntu hoary-security 367 deb http://ftpmaster.internal/ubuntu hoary-security
367 main restricted universe multiverse368 main restricted universe multiverse
368 deb http://ftpmaster.internal/ubuntu hoary-updates 369 deb http://ftpmaster.internal/ubuntu hoary-updates
369 main restricted universe multiverse370 main restricted universe multiverse
370371
371However, in order to avoid the problem going forward (and to allow the PPA372However, in order to avoid the problem going forward (and to allow the PPA
@@ -434,7 +435,7 @@
434 ... get_primary_current_component)435 ... get_primary_current_component)
435436
436 >>> print get_primary_current_component(a_build.archive,437 >>> print get_primary_current_component(a_build.archive,
437 ... a_build.distroseries, a_build.sourcepackagerelease.name)438 ... a_build.distro_series, a_build.source_package_release.name)
438 universe439 universe
439440
440 >>> print_building_sources_list(a_build)441 >>> print_building_sources_list(a_build)
441442
=== modified file 'lib/lp/soyuz/doc/archive-files.txt'
--- lib/lp/soyuz/doc/archive-files.txt 2009-08-28 07:34:44 +0000
+++ lib/lp/soyuz/doc/archive-files.txt 2010-05-12 11:01:39 +0000
@@ -191,7 +191,7 @@
191 ... 'buildlog_ubuntu-breezy-autotest-i386.'191 ... 'buildlog_ubuntu-breezy-autotest-i386.'
192 ... 'test-pkg_1.0_FULLYBUILT.txt.gz')192 ... 'test-pkg_1.0_FULLYBUILT.txt.gz')
193 >>> buildlog = test_publisher.addMockFile(buildlog_name)193 >>> buildlog = test_publisher.addMockFile(buildlog_name)
194 >>> build.buildlog = buildlog194 >>> build.log = buildlog
195195
196 >>> buildlog == build.getFileByName(buildlog_name)196 >>> buildlog == build.getFileByName(buildlog_name)
197 True197 True
198198
=== modified file 'lib/lp/soyuz/doc/archive.txt'
--- lib/lp/soyuz/doc/archive.txt 2010-05-06 10:05:49 +0000
+++ lib/lp/soyuz/doc/archive.txt 2010-05-12 11:01:39 +0000
@@ -1047,13 +1047,13 @@
1047 >>> cd_lookup = cprov_archive.getBuildRecords(name='cd')1047 >>> cd_lookup = cprov_archive.getBuildRecords(name='cd')
1048 >>> cd_lookup.count()1048 >>> cd_lookup.count()
1049 11049 1
1050 >>> cd_lookup[0].sourcepackagerelease.name1050 >>> cd_lookup[0].source_package_release.name
1051 u'cdrkit'1051 u'cdrkit'
10521052
1053 >>> ice_lookup = cprov_archive.getBuildRecords(name='ice')1053 >>> ice_lookup = cprov_archive.getBuildRecords(name='ice')
1054 >>> ice_lookup.count()1054 >>> ice_lookup.count()
1055 11055 1
1056 >>> ice_lookup[0].sourcepackagerelease.name1056 >>> ice_lookup[0].source_package_release.name
1057 u'iceweasel'1057 u'iceweasel'
10581058
1059 >>> cprov_archive.getBuildRecords(name='foo').count()1059 >>> cprov_archive.getBuildRecords(name='foo').count()
10601060
=== modified file 'lib/lp/soyuz/doc/build-failedtoupload-workflow.txt'
--- lib/lp/soyuz/doc/build-failedtoupload-workflow.txt 2010-04-14 17:34:35 +0000
+++ lib/lp/soyuz/doc/build-failedtoupload-workflow.txt 2010-05-12 11:01:39 +0000
@@ -28,7 +28,7 @@
28 >>> print failedtoupload_candidate.title28 >>> print failedtoupload_candidate.title
29 i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE29 i386 build of cdrkit 1.0 in ubuntu breezy-autotest RELEASE
3030
31 >>> print failedtoupload_candidate.buildstate.name31 >>> print failedtoupload_candidate.status.name
32 FAILEDTOUPLOAD32 FAILEDTOUPLOAD
3333
34 >>> print failedtoupload_candidate.upload_log.filename34 >>> print failedtoupload_candidate.upload_log.filename
@@ -110,7 +110,7 @@
110Let's emulate the procedure of rescuing an FAILEDTOUPLOAD build.110Let's emulate the procedure of rescuing an FAILEDTOUPLOAD build.
111A FAILEDTOUPLOAD build obviously has no binaries:111A FAILEDTOUPLOAD build obviously has no binaries:
112112
113 >>> print failedtoupload_candidate.buildstate.name113 >>> print failedtoupload_candidate.status.name
114 FAILEDTOUPLOAD114 FAILEDTOUPLOAD
115115
116 >>> failedtoupload_candidate.binarypackages.count()116 >>> failedtoupload_candidate.binarypackages.count()
@@ -162,7 +162,7 @@
162 >>> buildd_policy = getPolicy(162 >>> buildd_policy = getPolicy(
163 ... name='buildd',163 ... name='buildd',
164 ... distro=failedtoupload_candidate.distribution.name,164 ... distro=failedtoupload_candidate.distribution.name,
165 ... distroseries=failedtoupload_candidate.distroseries.name,165 ... distroseries=failedtoupload_candidate.distro_series.name,
166 ... buildid=failedtoupload_candidate.id)166 ... buildid=failedtoupload_candidate.id)
167167
168 >>> cdrkit_bin_upload = NascentUpload(168 >>> cdrkit_bin_upload = NascentUpload(
@@ -180,7 +180,7 @@
180previously stored upload_log is dereferenced (they are both updated180previously stored upload_log is dereferenced (they are both updated
181during the upload processing time):181during the upload processing time):
182182
183 >>> print failedtoupload_candidate.buildstate.name183 >>> print failedtoupload_candidate.status.name
184 FULLYBUILT184 FULLYBUILT
185185
186 >>> print failedtoupload_candidate.upload_log186 >>> print failedtoupload_candidate.upload_log
187187
=== modified file 'lib/lp/soyuz/model/archive.py'
--- lib/lp/soyuz/model/archive.py 2010-05-12 11:01:28 +0000
+++ lib/lp/soyuz/model/archive.py 2010-05-12 11:01:39 +0000
@@ -882,18 +882,21 @@
882 extra_exprs = []882 extra_exprs = []
883 if not include_needsbuild:883 if not include_needsbuild:
884 extra_exprs.append(884 extra_exprs.append(
885 BinaryPackageBuild.buildstate != BuildStatus.NEEDSBUILD)885 BuildFarmJob.status != BuildStatus.NEEDSBUILD)
886886
887 find_spec = (887 find_spec = (
888 BinaryPackageBuild.buildstate,888 BuildFarmJob.status,
889 Count(BinaryPackageBuild.id)889 Count(BinaryPackageBuild.id)
890 )890 )
891 result = store.using(BinaryPackageBuild).find(891 result = store.using(
892 BinaryPackageBuild, PackageBuild, BuildFarmJob).find(
892 find_spec,893 find_spec,
893 BinaryPackageBuild.archive == self,894 BinaryPackageBuild.package_build == PackageBuild.id,
895 PackageBuild.archive == self,
896 PackageBuild.build_farm_job == BuildFarmJob.id,
894 *extra_exprs897 *extra_exprs
895 ).group_by(BinaryPackageBuild.buildstate).order_by(898 ).group_by(BuildFarmJob.status).order_by(
896 BinaryPackageBuild.buildstate)899 BuildFarmJob.status)
897900
898 # Create a map for each count summary to a number of buildstates:901 # Create a map for each count summary to a number of buildstates:
899 count_map = {902 count_map = {
900903
=== modified file 'lib/lp/soyuz/model/binarypackagebuild.py'
--- lib/lp/soyuz/model/binarypackagebuild.py 2010-05-12 11:01:28 +0000
+++ lib/lp/soyuz/model/binarypackagebuild.py 2010-05-12 11:01:39 +0000
@@ -24,6 +24,8 @@
2424
25from canonical.config import config25from canonical.config import config
26from canonical.database.sqlbase import quote_like, SQLBase, sqlvalues26from canonical.database.sqlbase import quote_like, SQLBase, sqlvalues
27from canonical.launchpad.browser.librarian import (
28 ProxiedLibraryFileAlias)
27from canonical.launchpad.components.decoratedresultset import (29from canonical.launchpad.components.decoratedresultset import (
28 DecoratedResultSet)30 DecoratedResultSet)
29from canonical.launchpad.database.librarian import (31from canonical.launchpad.database.librarian import (
@@ -209,6 +211,17 @@
209 return self.distro_arch_series.architecturetag211 return self.distro_arch_series.architecturetag
210212
211 @property213 @property
214 def log_url(self):
215 """See `IBuildFarmJob`.
216
217 Overridden here for the case of builds for distro archives,
218 currently only supported for binary package builds.
219 """
220 if self.log is None:
221 return None
222 return ProxiedLibraryFileAlias(self.log, self).http_url
223
224 @property
212 def distributionsourcepackagerelease(self):225 def distributionsourcepackagerelease(self):
213 """See `IBuild`."""226 """See `IBuild`."""
214 from lp.soyuz.model.distributionsourcepackagerelease \227 from lp.soyuz.model.distributionsourcepackagerelease \
@@ -270,7 +283,7 @@
270 def retry(self):283 def retry(self):
271 """See `IBuild`."""284 """See `IBuild`."""
272 assert self.can_be_retried, "Build %s cannot be retried" % self.id285 assert self.can_be_retried, "Build %s cannot be retried" % self.id
273 self.buildstate = BuildStatus.NEEDSBUILD286 self.status = BuildStatus.NEEDSBUILD
274 self.datebuilt = None287 self.datebuilt = None
275 self.buildduration = None288 self.buildduration = None
276 self.builder = None289 self.builder = None
@@ -522,15 +535,15 @@
522 config.builddmaster.default_sender_address)535 config.builddmaster.default_sender_address)
523536
524 extra_headers = {537 extra_headers = {
525 'X-Launchpad-Build-State': self.buildstate.name,538 'X-Launchpad-Build-State': self.status.name,
526 'X-Launchpad-Build-Component' : self.current_component.name,539 'X-Launchpad-Build-Component' : self.current_component.name,
527 'X-Launchpad-Build-Arch' : self.distroarchseries.architecturetag,540 'X-Launchpad-Build-Arch' : self.distro_arch_series.architecturetag,
528 }541 }
529542
530 # XXX cprov 2006-10-27: Temporary extra debug info about the543 # XXX cprov 2006-10-27: Temporary extra debug info about the
531 # SPR.creator in context, to be used during the service quarantine,544 # SPR.creator in context, to be used during the service quarantine,
532 # notify_owner will be disabled to avoid *spamming* Debian people.545 # notify_owner will be disabled to avoid *spamming* Debian people.
533 creator = self.sourcepackagerelease.creator546 creator = self.source_package_release.creator
534 extra_headers['X-Creator-Recipient'] = ",".join(547 extra_headers['X-Creator-Recipient'] = ",".join(
535 get_contact_email_addresses(creator))548 get_contact_email_addresses(creator))
536549
@@ -545,7 +558,7 @@
545 # * the package build (failure) occurred in the original558 # * the package build (failure) occurred in the original
546 # archive.559 # archive.
547 package_was_not_copied = (560 package_was_not_copied = (
548 self.archive == self.sourcepackagerelease.upload_archive)561 self.archive == self.source_package_release.upload_archive)
549562
550 if package_was_not_copied and config.builddmaster.notify_owner:563 if package_was_not_copied and config.builddmaster.notify_owner:
551 if (self.archive.is_ppa and creator.inTeam(self.archive.owner)564 if (self.archive.is_ppa and creator.inTeam(self.archive.owner)
@@ -557,7 +570,7 @@
557 # Non-PPA notifications inform the creator regardless.570 # Non-PPA notifications inform the creator regardless.
558 recipients = recipients.union(571 recipients = recipients.union(
559 get_contact_email_addresses(creator))572 get_contact_email_addresses(creator))
560 dsc_key = self.sourcepackagerelease.dscsigningkey573 dsc_key = self.source_package_release.dscsigningkey
561 if dsc_key:574 if dsc_key:
562 recipients = recipients.union(575 recipients = recipients.union(
563 get_contact_email_addresses(dsc_key.owner))576 get_contact_email_addresses(dsc_key.owner))
@@ -596,13 +609,13 @@
596 # with the state in the build worflow, maybe by having an609 # with the state in the build worflow, maybe by having an
597 # IBuild.statusReport property, which could also be used in the610 # IBuild.statusReport property, which could also be used in the
598 # respective page template.611 # respective page template.
599 if self.buildstate in [612 if self.status in [
600 BuildStatus.NEEDSBUILD, BuildStatus.SUPERSEDED]:613 BuildStatus.NEEDSBUILD, BuildStatus.SUPERSEDED]:
601 # untouched builds614 # untouched builds
602 buildduration = 'not available'615 buildduration = 'not available'
603 buildlog_url = 'not available'616 buildlog_url = 'not available'
604 builder_url = 'not available'617 builder_url = 'not available'
605 elif self.buildstate == BuildStatus.BUILDING:618 elif self.status == BuildStatus.BUILDING:
606 # build in process619 # build in process
607 buildduration = 'not finished'620 buildduration = 'not finished'
608 buildlog_url = 'see builder page'621 buildlog_url = 'see builder page'
@@ -610,11 +623,11 @@
610 else:623 else:
611 # completed states (success and failure)624 # completed states (success and failure)
612 buildduration = DurationFormatterAPI(625 buildduration = DurationFormatterAPI(
613 self.buildduration).approximateduration()626 self.date_finished - self.date_started).approximateduration()
614 buildlog_url = self.build_log_url627 buildlog_url = self.log_url
615 builder_url = canonical_url(self.builder)628 builder_url = canonical_url(self.builder)
616629
617 if self.buildstate == BuildStatus.FAILEDTOUPLOAD:630 if self.status == BuildStatus.FAILEDTOUPLOAD:
618 assert extra_info is not None, (631 assert extra_info is not None, (
619 'Extra information is required for FAILEDTOUPLOAD '632 'Extra information is required for FAILEDTOUPLOAD '
620 'notifications.')633 'notifications.')
@@ -624,10 +637,10 @@
624637
625 template = get_email_template('build-notification.txt')638 template = get_email_template('build-notification.txt')
626 replacements = {639 replacements = {
627 'source_name': self.sourcepackagerelease.name,640 'source_name': self.source_package_release.name,
628 'source_version': self.sourcepackagerelease.version,641 'source_version': self.source_package_release.version,
629 'architecturetag': self.distroarchseries.architecturetag,642 'architecturetag': self.distro_arch_series.architecturetag,
630 'build_state': self.buildstate.title,643 'build_state': self.status.title,
631 'build_duration': buildduration,644 'build_duration': buildduration,
632 'buildlog_url': buildlog_url,645 'buildlog_url': buildlog_url,
633 'builder_url': builder_url,646 'builder_url': builder_url,
@@ -661,7 +674,7 @@
661 if filename.endswith('.changes'):674 if filename.endswith('.changes'):
662 file_object = self.upload_changesfile675 file_object = self.upload_changesfile
663 elif filename.endswith('.txt.gz'):676 elif filename.endswith('.txt.gz'):
664 file_object = self.buildlog677 file_object = self.log
665 elif filename.endswith('_log.txt'):678 elif filename.endswith('_log.txt'):
666 file_object = self.upload_log679 file_object = self.upload_log
667 elif filename.endswith('deb'):680 elif filename.endswith('deb'):
@@ -868,7 +881,7 @@
868 # and share it with ISourcePackage.getBuildRecords()881 # and share it with ISourcePackage.getBuildRecords()
869882
870 # exclude gina-generated and security (dak-made) builds883 # exclude gina-generated and security (dak-made) builds
871 # buildstate == FULLYBUILT && datebuilt == null884 # status == FULLYBUILT && datebuilt == null
872 if status == BuildStatus.FULLYBUILT:885 if status == BuildStatus.FULLYBUILT:
873 condition_clauses.append("BuildFarmJob.date_finished IS NOT NULL")886 condition_clauses.append("BuildFarmJob.date_finished IS NOT NULL")
874 else:887 else:
@@ -927,8 +940,8 @@
927940
928 # Get the MANUALDEPWAIT records for all archives.941 # Get the MANUALDEPWAIT records for all archives.
929 candidates = BinaryPackageBuild.selectBy(942 candidates = BinaryPackageBuild.selectBy(
930 buildstate=BuildStatus.MANUALDEPWAIT,943 status=BuildStatus.MANUALDEPWAIT,
931 distroarchseries=distroarchseries)944 distro_arch_series=distroarchseries)
932945
933 candidates_count = candidates.count()946 candidates_count = candidates.count()
934 if candidates_count == 0:947 if candidates_count == 0:
@@ -978,7 +991,7 @@
978 wanted = []991 wanted = []
979 for state in states:992 for state in states:
980 candidates = [build for build in builds993 candidates = [build for build in builds
981 if build.buildstate == state]994 if build.status == state]
982 wanted.extend(candidates)995 wanted.extend(candidates)
983 return wanted996 return wanted
984997
985998
=== modified file 'lib/lp/soyuz/model/binarypackagerelease.py'
--- lib/lp/soyuz/model/binarypackagerelease.py 2010-04-12 11:37:48 +0000
+++ lib/lp/soyuz/model/binarypackagerelease.py 2010-05-12 11:01:39 +0000
@@ -84,17 +84,17 @@
84 import DistributionSourcePackageRelease84 import DistributionSourcePackageRelease
85 return DistributionSourcePackageRelease(85 return DistributionSourcePackageRelease(
86 distribution=self.build.distribution,86 distribution=self.build.distribution,
87 sourcepackagerelease=self.build.sourcepackagerelease)87 sourcepackagerelease=self.build.source_package_release)
8888
89 @property89 @property
90 def sourcepackagename(self):90 def sourcepackagename(self):
91 """See `IBinaryPackageRelease`."""91 """See `IBinaryPackageRelease`."""
92 return self.build.sourcepackagerelease.sourcepackagename.name92 return self.build.source_package_release.sourcepackagename.name
9393
94 @property94 @property
95 def is_new(self):95 def is_new(self):
96 """See `IBinaryPackageRelease`."""96 """See `IBinaryPackageRelease`."""
97 distroarchseries = self.build.distroarchseries97 distroarchseries = self.build.distro_arch_series
98 distroarchseries_binary_package = distroarchseries.getBinaryPackage(98 distroarchseries_binary_package = distroarchseries.getBinaryPackage(
99 self.binarypackagename)99 self.binarypackagename)
100 return distroarchseries_binary_package.currentrelease is None100 return distroarchseries_binary_package.currentrelease is None
101101
=== modified file 'lib/lp/soyuz/model/distributionsourcepackagerelease.py'
--- lib/lp/soyuz/model/distributionsourcepackagerelease.py 2010-04-12 08:29:02 +0000
+++ lib/lp/soyuz/model/distributionsourcepackagerelease.py 2010-05-12 11:01:39 +0000
@@ -16,11 +16,13 @@
1616
17from storm.expr import Desc17from storm.expr import Desc
1818
19from canonical.database.sqlbase import sqlvalues
20
21from lp.buildmaster.model.buildfarmjob import BuildFarmJob
22from lp.buildmaster.model.packagebuild import PackageBuild
19from lp.soyuz.interfaces.distributionsourcepackagerelease import (23from lp.soyuz.interfaces.distributionsourcepackagerelease import (
20 IDistributionSourcePackageRelease)24 IDistributionSourcePackageRelease)
21from lp.soyuz.interfaces.sourcepackagerelease import ISourcePackageRelease25from lp.soyuz.interfaces.sourcepackagerelease import ISourcePackageRelease
22from canonical.database.sqlbase import sqlvalues
23
24from lp.soyuz.model.archive import Archive26from lp.soyuz.model.archive import Archive
25from lp.soyuz.model.binarypackagename import BinaryPackageName27from lp.soyuz.model.binarypackagename import BinaryPackageName
26from lp.soyuz.model.binarypackagerelease import (28from lp.soyuz.model.binarypackagerelease import (
@@ -100,11 +102,13 @@
100 # distribution that were built for a PPA but have been published102 # distribution that were built for a PPA but have been published
101 # in a main archive.103 # in a main archive.
102 builds_for_distro_exprs = (104 builds_for_distro_exprs = (
103 (BinaryPackageBuild.sourcepackagerelease ==105 (BinaryPackageBuild.source_package_release ==
104 self.sourcepackagerelease),106 self.sourcepackagerelease),
105 BinaryPackageBuild.distroarchseries == DistroArchSeries.id,107 BinaryPackageBuild.distro_arch_series == DistroArchSeries.id,
106 DistroArchSeries.distroseries == DistroSeries.id,108 DistroArchSeries.distroseries == DistroSeries.id,
107 DistroSeries.distribution == self.distribution,109 DistroSeries.distribution == self.distribution,
110 BinaryPackageBuild.package_build == PackageBuild.id,
111 PackageBuild.build_farm_job == BuildFarmJob.id
108 )112 )
109113
110 # First, get all the builds built in a main archive (this will114 # First, get all the builds built in a main archive (this will
@@ -112,7 +116,7 @@
112 builds_built_in_main_archives = store.find(116 builds_built_in_main_archives = store.find(
113 BinaryPackageBuild,117 BinaryPackageBuild,
114 builds_for_distro_exprs,118 builds_for_distro_exprs,
115 BinaryPackageBuild.archive == Archive.id,119 PackageBuild.archive == Archive.id,
116 Archive.purpose.is_in(MAIN_ARCHIVE_PURPOSES))120 Archive.purpose.is_in(MAIN_ARCHIVE_PURPOSES))
117121
118 # Next get all the builds that have a binary published in the122 # Next get all the builds that have a binary published in the
@@ -132,7 +136,7 @@
132 return builds_built_in_main_archives.union(136 return builds_built_in_main_archives.union(
133 builds_published_in_main_archives).order_by(137 builds_published_in_main_archives).order_by(
134 Desc(138 Desc(
135 BinaryPackageBuild.datecreated), Desc(BinaryPackageBuild.id))139 BuildFarmJob.date_created), Desc(BinaryPackageBuild.id))
136140
137 @property141 @property
138 def binary_package_names(self):142 def binary_package_names(self):
139143
=== modified file 'lib/lp/soyuz/model/publishing.py'
--- lib/lp/soyuz/model/publishing.py 2010-05-12 11:01:28 +0000
+++ lib/lp/soyuz/model/publishing.py 2010-05-12 11:01:39 +0000
@@ -439,15 +439,16 @@
439 BinaryPackageRelease.id AND439 BinaryPackageRelease.id AND
440 BinaryPackagePublishingHistory.distroarchseries=440 BinaryPackagePublishingHistory.distroarchseries=
441 DistroArchSeries.id AND441 DistroArchSeries.id AND
442 BinaryPackageRelease.build=Build.id AND442 BinaryPackageRelease.build=BinaryPackageBuild.id AND
443 Build.sourcepackagerelease=%s AND443 BinaryPackageBuild.source_package_release=%s AND
444 DistroArchSeries.distroseries=%s AND444 DistroArchSeries.distroseries=%s AND
445 BinaryPackagePublishingHistory.archive=%s AND445 BinaryPackagePublishingHistory.archive=%s AND
446 BinaryPackagePublishingHistory.pocket=%s446 BinaryPackagePublishingHistory.pocket=%s
447 """ % sqlvalues(self.sourcepackagerelease, self.distroseries,447 """ % sqlvalues(self.sourcepackagerelease, self.distroseries,
448 self.archive, self.pocket)448 self.archive, self.pocket)
449449
450 clauseTables = ['Build', 'BinaryPackageRelease', 'DistroArchSeries']450 clauseTables = [
451 'BinaryPackageBuild', 'BinaryPackageRelease', 'DistroArchSeries']
451 orderBy = ['-BinaryPackagePublishingHistory.id']452 orderBy = ['-BinaryPackagePublishingHistory.id']
452 preJoins = ['binarypackagerelease']453 preJoins = ['binarypackagerelease']
453454
@@ -565,7 +566,7 @@
565 # Check DistroArchSeries database IDs because the object belongs566 # Check DistroArchSeries database IDs because the object belongs
566 # to different transactions (architecture_available is cached).567 # to different transactions (architecture_available is cached).
567 if (build_candidate is not None and568 if (build_candidate is not None and
568 (build_candidate.distroarchseries.id == arch.id or569 (build_candidate.distro_arch_series.id == arch.id or
569 build_candidate.buildstate == BuildStatus.FULLYBUILT)):570 build_candidate.buildstate == BuildStatus.FULLYBUILT)):
570 return None571 return None
571572
@@ -869,7 +870,7 @@
869 def buildIndexStanzaFields(self):870 def buildIndexStanzaFields(self):
870 """See `IPublishing`."""871 """See `IPublishing`."""
871 bpr = self.binarypackagerelease872 bpr = self.binarypackagerelease
872 spr = bpr.build.sourcepackagerelease873 spr = bpr.build.source_package_release
873874
874 # binaries have only one file, the DEB875 # binaries have only one file, the DEB
875 bin_file = bpr.files[0]876 bin_file = bpr.files[0]
876877
=== modified file 'lib/lp/soyuz/model/queue.py'
--- lib/lp/soyuz/model/queue.py 2010-04-22 16:39:05 +0000
+++ lib/lp/soyuz/model/queue.py 2010-05-12 11:01:39 +0000
@@ -509,7 +509,7 @@
509 for queue_source in self.sources:509 for queue_source in self.sources:
510 names.append(queue_source.sourcepackagerelease.name)510 names.append(queue_source.sourcepackagerelease.name)
511 for queue_build in self.builds:511 for queue_build in self.builds:
512 names.append(queue_build.build.sourcepackagerelease.name)512 names.append(queue_build.build.source_package_release.name)
513 for queue_custom in self.customfiles:513 for queue_custom in self.customfiles:
514 names.append(queue_custom.libraryfilealias.filename)514 names.append(queue_custom.libraryfilealias.filename)
515 # Make sure the list items have a whitespace separator so515 # Make sure the list items have a whitespace separator so
@@ -1413,7 +1413,7 @@
1413 def publish(self, logger=None):1413 def publish(self, logger=None):
1414 """See `IPackageUploadBuild`."""1414 """See `IPackageUploadBuild`."""
1415 # Determine the build's architecturetag1415 # Determine the build's architecturetag
1416 build_archtag = self.build.distroarchseries.architecturetag1416 build_archtag = self.build.distro_arch_series.architecturetag
1417 # Determine the target arch series.1417 # Determine the target arch series.
1418 # This will raise NotFoundError if anything odd happens.1418 # This will raise NotFoundError if anything odd happens.
1419 target_dar = self.packageupload.distroseries[build_archtag]1419 target_dar = self.packageupload.distroseries[build_archtag]
14201420
=== modified file 'lib/lp/soyuz/model/sourcepackagerelease.py'
--- lib/lp/soyuz/model/sourcepackagerelease.py 2010-05-12 11:01:28 +0000
+++ lib/lp/soyuz/model/sourcepackagerelease.py 2010-05-12 11:01:39 +0000
@@ -146,12 +146,14 @@
146 # a build may well have a different archive to the corresponding146 # a build may well have a different archive to the corresponding
147 # sourcepackagerelease.147 # sourcepackagerelease.
148 return BinaryPackageBuild.select("""148 return BinaryPackageBuild.select("""
149 sourcepackagerelease = %s AND149 source_package_release = %s AND
150 archive.id = build.archive AND150 package_build = packagebuild.id AND
151 archive.id = packagebuild.archive AND
152 packagebuild.build_farm_job = buildfarmjob.id AND
151 archive.purpose IN %s153 archive.purpose IN %s
152 """ % sqlvalues(self.id, MAIN_ARCHIVE_PURPOSES),154 """ % sqlvalues(self.id, MAIN_ARCHIVE_PURPOSES),
153 orderBy=['-datecreated', 'id'],155 orderBy=['-buildfarmjob.date_created', 'id'],
154 clauseTables=['Archive'])156 clauseTables=['Archive', 'PackageBuild', 'BuildFarmJob'])
155157
156 @property158 @property
157 def age(self):159 def age(self):
@@ -173,7 +175,7 @@
173 @property175 @property
174 def needs_building(self):176 def needs_building(self):
175 for build in self._cached_builds:177 for build in self._cached_builds:
176 if build.buildstate in [BuildStatus.NEEDSBUILD,178 if build.status in [BuildStatus.NEEDSBUILD,
177 BuildStatus.MANUALDEPWAIT,179 BuildStatus.MANUALDEPWAIT,
178 BuildStatus.CHROOTWAIT]:180 BuildStatus.CHROOTWAIT]:
179 return True181 return True
180182
=== modified file 'lib/lp/soyuz/tests/test_binarypackagebuild.py'
--- lib/lp/soyuz/tests/test_binarypackagebuild.py 2010-05-12 11:01:28 +0000
+++ lib/lp/soyuz/tests/test_binarypackagebuild.py 2010-05-12 11:01:39 +0000
@@ -60,6 +60,34 @@
60 self.failIfEqual(None, bq.processor)60 self.failIfEqual(None, bq.processor)
61 self.failUnless(bq, self.build.buildqueue_record)61 self.failUnless(bq, self.build.buildqueue_record)
6262
63 def addFakeBuildLog(self):
64 lfa = self.factory.makeLibraryFileAlias('mybuildlog.txt')
65 removeSecurityProxy(self.build).log = lfa
66
67 def test_log_url(self):
68 # The log URL for a binary package build will use
69 # the distribution source package release when the context
70 # is not a PPA or a copy archive.
71 self.addFakeBuildLog()
72 self.failUnlessEqual(
73 'http://launchpad.dev/ubuntutest/+source/'
74 'gedit/666/+build/%d/+files/mybuildlog.txt' % (
75 self.build.package_build.build_farm_job.id),
76 self.build.log_url)
77
78 def test_log_url_ppa(self):
79 # On the other hand, ppa or copy builds will have a url in the
80 # context of the archive.
81 self.addFakeBuildLog()
82 ppa_owner = self.factory.makePerson(name="joe")
83 removeSecurityProxy(self.build).archive = self.factory.makeArchive(
84 owner=ppa_owner, name="myppa")
85 self.failUnlessEqual(
86 'http://launchpad.dev/~joe/'
87 '+archive/myppa/+build/%d/+files/mybuildlog.txt' % (
88 self.build.build_farm_job.id),
89 self.build.log_url)
90
6391
64class TestBuildUpdateDependencies(TestCaseWithFactory):92class TestBuildUpdateDependencies(TestCaseWithFactory):
6593
6694
=== modified file 'lib/lp/soyuz/tests/test_packageupload.py'
--- lib/lp/soyuz/tests/test_packageupload.py 2010-03-24 11:58:07 +0000
+++ lib/lp/soyuz/tests/test_packageupload.py 2010-05-12 11:01:39 +0000
@@ -273,7 +273,7 @@
273 'main/dist-upgrader-all')273 'main/dist-upgrader-all')
274 self.assertEquals(274 self.assertEquals(
275 ['20060302.0120', 'current'], sorted(os.listdir(custom_path)))275 ['20060302.0120', 'current'], sorted(os.listdir(custom_path)))
276 276
277 # The custom files were also copied to the public librarian277 # The custom files were also copied to the public librarian
278 for customfile in delayed_copy.customfiles:278 for customfile in delayed_copy.customfiles:
279 self.assertFalse(customfile.libraryfilealias.restricted)279 self.assertFalse(customfile.libraryfilealias.restricted)
@@ -300,7 +300,7 @@
300 [pub_record] = pub_records300 [pub_record] = pub_records
301 [build] = pub_record.getBuilds()301 [build] = pub_record.getBuilds()
302 self.assertEquals(302 self.assertEquals(
303 BuildStatus.NEEDSBUILD, build.buildstate)303 BuildStatus.NEEDSBUILD, build.status)
304304
305 def test_realiseUpload_for_overridden_component_archive(self):305 def test_realiseUpload_for_overridden_component_archive(self):
306 # If the component of an upload is overridden to 'Partner' for306 # If the component of an upload is overridden to 'Partner' for

Subscribers

People subscribed via source and target branches

to status/vote changes: