647
647
return getFeatureFlag("soyuz.derived_series_ui.enabled") is not None
650
def show_derivation_not_yet_available(self):
651
return not self.is_derived_series_feature_enabled
654
def show_derivation_form(self):
656
self.is_derived_series_feature_enabled and
657
not self.context.isInitializing() and
658
not self.context.isInitialized())
661
def show_already_initialized_message(self):
663
self.is_derived_series_feature_enabled and
664
self.context.isInitialized())
667
def show_already_initializing_message(self):
669
self.is_derived_series_feature_enabled and
670
self.context.isInitializing())
650
673
def rebuilding_allowed(self):
651
674
"""If the distribution has got any initialized series already,
652
675
rebuilding is not allowed.
817
840
destination_pocket = PackagePublishingPocket.RELEASE
842
# When syncing we *must* do it asynchronously so that a package
843
# copy job is created. This gives the job a chance to inspect
844
# the copy and create a PackageUpload if required.
820
846
'selected_differences', sources, self.context.main_archive,
821
847
self.context, destination_pocket, include_binaries=False,
822
848
dest_url=series_url, dest_display_name=series_title,
849
person=self.user, force_async=True):
824
850
# The copy worked so we can redirect back to the page to
825
851
# show the results.
826
852
self.next_url = self.request.URL
1070
1096
def requestUpgrades(self):
1071
1097
"""Request sync of packages that can be easily upgraded."""
1072
1098
target_distroseries = self.context
1073
target_archive = target_distroseries.main_archive
1074
job_source = getUtility(IPlainPackageCopyJobSource)
1076
for dsd in self.getUpgrades():
1078
1101
dsd.source_package_name.name,
1079
dsd.parent_series.main_archive, target_archive,
1080
target_distroseries, PackagePublishingPocket.UPDATES,
1081
package_version=dsd.parent_source_version,
1082
copy_policy=PackageCopyPolicy.MASS_SYNC)
1102
dsd.parent_source_version,
1103
dsd.parent_series.main_archive,
1104
target_distroseries.main_archive,
1105
PackagePublishingPocket.RELEASE,
1107
for dsd in self.getUpgrades()]
1108
getUtility(IPlainPackageCopyJobSource).createMultiple(
1109
target_distroseries, copies,
1110
copy_policy=PackageCopyPolicy.MASS_SYNC)
1084
1112
self.request.response.addInfoNotification(
1085
1113
(u"Upgrades of {context.displayname} packages have been "