285
285
from lp.soyuz.interfaces.queue import IPackageUploadSet
286
286
from lp.soyuz.interfaces.section import ISectionSet
287
287
from lp.soyuz.model.component import ComponentSelection
288
from lp.soyuz.model.distributionsourcepackagecache import (
289
DistributionSourcePackageCache,
288
291
from lp.soyuz.model.files import (
289
292
BinaryPackageFile,
290
293
SourcePackageReleaseFile,
4044
4048
distribution, sourcepackagename, False)
4051
def makeDSPCache(self, distro_name, package_name, make_distro=True,
4052
official=True, binary_names=None, archive=None):
4054
distribution = self.makeDistribution(name=distro_name)
4056
distribution = getUtility(IDistributionSet).getByName(distro_name)
4057
dsp = self.makeDistributionSourcePackage(
4058
distribution=distribution, sourcepackagename=package_name,
4061
archive = dsp.distribution.main_archive
4063
archive = self.makeArchive(
4064
distribution=distribution, purpose=archive)
4066
self.makeSourcePackagePublishingHistory(
4067
distroseries=distribution.currentseries,
4068
sourcepackagename=dsp.sourcepackagename,
4070
with dbuser('statistician'):
4071
DistributionSourcePackageCache(
4072
distribution=dsp.distribution,
4073
sourcepackagename=dsp.sourcepackagename,
4076
binpkgnames=binary_names)
4077
return distribution, dsp
4047
4079
def makeEmailMessage(self, body=None, sender=None, to=None,
4048
4080
attachments=None, encode_attachments=False):
4049
4081
"""Make an email message with possible attachments.