213
211
description=_("The version string for this series.")))
214
212
distribution = exported(
216
Interface, # Really IDistribution, see circular import fix below.
214
Interface, # Really IDistribution, see circular import fix below.
217
215
title=_("Distribution"), required=True,
218
216
description=_("The distribution for which this is a series.")))
219
217
distributionID = Attribute('The distribution ID.')
220
218
named_version = Attribute('The combined display name and version.')
221
219
parent = Attribute('The structural parent of this series - the distro')
222
220
components = Attribute("The series components.")
223
# IComponent is not exported on the api.
224
component_names = exported(List(
225
value_type=TextLine(),
226
title=_(u'The series component names'),
228
221
upload_components = Attribute("The series components that can be "
230
suite_names = exported(List(
231
value_type=TextLine(),
232
title=_(u'The series pocket names'),
234
223
sections = Attribute("The series sections.")
235
224
status = exported(
239
228
is_derived_series = Bool(
240
229
title=u'Is this series a derived series?', readonly=True,
241
230
description=(u"Whether or not this series is a derived series."))
231
is_initialising = Bool(
232
title=u'Is this series initialising?', readonly=True,
233
description=(u"Whether or not this series is initialising."))
242
234
datereleased = exported(
243
235
Datetime(title=_("Date released")))
244
236
previous_series = exported(
246
238
title=_("Parent series"),
247
239
description=_("The series from which this one was branched."),
248
required=True, schema=Interface, # Really IDistroSeries
240
required=True, schema=Interface, # Really IDistroSeries, see below
249
241
vocabulary='DistroSeries'),
250
242
("devel", dict(exported_as="previous_series")),
251
243
("1.0", dict(exported_as="parent_series")),
779
771
DistroSeriesBinaryPackage objects that match the given text.
782
def createQueueEntry(pocket, archive, changesfilename, changesfilecontent,
783
signingkey=None, package_copy_job=None):
774
def createQueueEntry(pocket, changesfilename, changesfilecontent,
775
archive, signingkey=None):
784
776
"""Create a queue item attached to this distroseries.
786
778
Create a new records respecting the given pocket and archive.
838
830
def getDerivedSeries():
839
831
"""Get all `DistroSeries` derived from this one."""
841
@operation_returns_collection_of(Interface)
842
@export_read_operation()
843
def getParentSeries():
844
"""Get all parent `DistroSeries`."""
846
@operation_parameters(
847
parent_series=Reference(
848
schema=Interface, # IDistroSeries
849
title=_("The parent series to consider."),
851
difference_type=Choice(
852
vocabulary=DBEnumeratedType, # DistroSeriesDifferenceType
853
title=_("Only return differences of this type."), required=False),
854
source_package_name_filter=TextLine(
855
title=_("Only return differences for packages matching this "
859
vocabulary=DBEnumeratedType, # DistroSeriesDifferenceStatus
860
title=_("Only return differences of this status."),
862
child_version_higher=Bool(
863
title=_("Only return differences for which the child's version "
864
"is higher than the parent's."),
867
@operation_returns_collection_of(Interface)
868
@export_read_operation()
869
@operation_for_version('devel')
870
def getDifferencesTo(parent_series, difference_type,
871
source_package_name_filter, status,
872
child_version_higher):
873
"""Return the differences between this series and the specified
874
parent_series (or all the parent series if parent_series is None).
876
:param parent_series: The parent series for which the differences
877
should be returned. All parents are considered if this is None.
878
:param difference_type: The type of the differences to return.
879
:param source_package_name_filter: A package name to use as a filter
881
:param status: The status of the differences to return.
882
:param child_version_higher: Only return differences for which the
883
child's version is higher than the parent's version.
886
def isInitializing():
887
"""Is this series initializing?"""
890
"""Has this series been initialized?"""
893
834
class IDistroSeriesEditRestricted(Interface):
894
835
"""IDistroSeries properties which require launchpad.Edit."""
900
841
"""Create a new milestone for this DistroSeries."""
902
843
@operation_parameters(
904
title=_("The list of parents to derive from."),
905
value_type=TextLine(),
844
name=copy_field(IDistroSeriesPublic['name'], required=True),
845
displayname=copy_field(
846
IDistroSeriesPublic['displayname'], required=False),
847
title=copy_field(IDistroSeriesPublic['title'], required=False),
849
title=_("The summary of the distroseries to derive."),
851
description=copy_field(
852
IDistroSeriesPublic['description'], required=False),
854
IDistroSeriesPublic['version'], required=False),
855
distribution=copy_field(
856
IDistroSeriesPublic['distribution'], required=False),
907
857
architectures=List(
908
858
title=_("The list of architectures to copy to the derived "
909
859
"distroseries."), value_type=TextLine(),
916
866
title=_("If binaries will be copied to the derived "
917
867
"distroseries."),
920
title=_("The list of booleans indicating, for each parent, if "
921
"the parent/child relationship should be an overlay."),
924
overlay_pockets=List(
925
title=_("The list of overlay pockets."),
926
value_type=TextLine(),
928
overlay_components=List(
929
title=_("The list of overlay components."),
930
value_type=TextLine(),
933
870
@call_with(user=REQUEST_USER)
934
871
@export_write_operation()
935
def initDerivedDistroSeries(user, parents, architectures,
936
packagesets, rebuild, overlays,
937
overlay_pockets, overlay_components):
938
"""Initialize this series from parents.
940
This method performs checks and then creates a job to populate
941
the new distroseries.
943
:param parents: The list of parent ids this series will derive
872
def deriveDistroSeries(user, name, displayname, title, summary,
873
description, version, distribution,
874
architectures, packagesets, rebuild):
875
"""Derive a distroseries from this one.
877
This method performs checks, can create the new distroseries if
878
necessary, and then creates a job to populate the new
881
:param name: The name of the new distroseries we will create if it
882
doesn't exist, or the name of the distroseries we will look
883
up, and then initialise.
884
:param displayname: The Display Name for the new distroseries.
885
If the distroseries already exists this parameter is ignored.
886
:param title: The Title for the new distroseries. If the
887
distroseries already exists this parameter is ignored.
888
:param summary: The Summary for the new distroseries. If the
889
distroseries already exists this parameter is ignored.
890
:param description: The Description for the new distroseries. If the
891
distroseries already exists this parameter is ignored.
892
:param version: The version for the new distroseries. If the
893
distroseries already exists this parameter is ignored.
894
:param distribution: The distribution the derived series will
895
belong to. If it isn't specified this distroseries'
896
distribution is used.
945
897
:param architectures: The architectures to copy to the derived
946
898
series. If not specified, all of the architectures are copied.
947
899
:param packagesets: The packagesets to copy to the derived series.
949
901
:param rebuild: Whether binaries will be copied to the derived
950
902
series. If it's true, they will not be, and if it's false, they
952
:param overlays: A list of booleans indicating, for each parent, if
953
the parent/child relationship should be an overlay.
954
:param overlay_pockets: The list of pockets names to use for overlay
956
:param overlay_components: The list of components names to use for
957
overlay relationships.
961
908
class IDistroSeries(IDistroSeriesEditRestricted, IDistroSeriesPublic,
962
909
IStructuralSubscriptionTarget):
963
910
"""A series of an operating system distribution."""