コード例 #1
0
 def run(self):
     """See `IRunnableJob`."""
     ids = InitializeDistroSeries(
         self.distroseries, self.parents, self.arches,
         self.archindep_archtag, self.packagesets, self.rebuild,
         self.overlays, self.overlay_pockets, self.overlay_components)
     ids.check()
     ids.initialize()
コード例 #2
0
def create_series(parent, full_name, version, status):
    """Set up a `DistroSeries`."""
    distribution = parent.distribution
    registrant = parent.owner
    name = full_name.split()[0].lower()
    title = "The " + full_name
    display_name = full_name.split()[0]
    new_series = distribution.newSeries(name=name, title=title,
        display_name=display_name, summary='Ubuntu %s is good.' % version,
        description='%s is awesome.' % version, version=version,
        previous_series=None, registrant=registrant)
    new_series.status = status
    notify(ObjectCreatedEvent(new_series))

    new_series.previous_series = parent
    ids = InitializeDistroSeries(new_series, [parent.id])
    ids.initialize()
    return new_series