90
90
def binary_builds(self):
91
91
"""See `ISourcePackageRecipeBuild`."""
92
92
return Store.of(self).find(BinaryPackageBuild,
93
BinaryPackageBuild.source_package_release==
93
BinaryPackageBuild.source_package_release ==
94
94
SourcePackageRelease.id,
95
SourcePackageRelease.source_package_recipe_build==self.id)
95
SourcePackageRelease.source_package_recipe_build == self.id)
98
98
def current_component(self):
347
347
raise NotFoundError(filename)
349
def _handleStatus_OK(self, librarian, slave_status, logger):
349
def _getAllowedStatusNotifications(self):
350
# The list of build status values for which email notifications are
351
# allowed to be sent. It is up to each callback as to whether it will
352
# consider sending a notification but it won't do so if vetoed by this
354
return ['OK', 'PACKAGEFAIL', 'DEPFAIL', 'CHROOTFAIL']
356
def _handleStatus_OK(self, librarian, slave_status, logger,
357
notification_allowed):
350
358
"""See `IPackageBuild`."""
351
359
d = super(SourcePackageRecipeBuild, self)._handleStatus_OK(
352
librarian, slave_status, logger)
360
librarian, slave_status, logger, notification_allowed)
354
362
def uploaded_build(ignored):
355
363
# Base implementation doesn't notify on success.
356
if self.status == BuildStatus.FULLYBUILT:
364
if self.status == BuildStatus.FULLYBUILT and notification_allowed:
358
366
return d.addCallback(uploaded_build)