@@ -36,10 +36,6 @@ class PromoteToRelease(Promoter):
if not s._testing_completed():
break
- if s._block_proposed():
- cinfo(' A block-proposed tag exists on this tracking bug', 'yellow')
- break
-
if s._kernel_block():
cinfo(' A kernel-block tag exists on this tracking bug', 'yellow')
break
@@ -61,6 +57,10 @@ class PromoteToRelease(Promoter):
while True:
+ if s._block_proposed():
+ s._remove_block_proposed()
+ cinfo(' Removing block-proposed tag on this tracking bug', 'yellow')
+
# Check if packages were copied to the right pocket->component
#
if not s.bug.packages_released:
@@ -58,10 +58,6 @@ class PromoteToSecurity(Promoter):
if not s._testing_completed():
break
- if s._block_proposed():
- cinfo(' A block-proposed tag exists on this tracking bug', 'yellow')
- break
-
if s._kernel_block():
cinfo(' A kernel-block tag exists on this tracking bug', 'yellow')
break
@@ -81,6 +77,10 @@ class PromoteToSecurity(Promoter):
while True:
+ if s._block_proposed():
+ s._remove_block_proposed()
+ cinfo(' Removing block-proposed tag on this tracking bug', 'yellow')
+
# Check if packages were copied to the right pocket->component
#
if not s.bug.packages_released_to_security:
@@ -50,10 +50,6 @@ class PromoteToUpdates(Promoter):
if not s._testing_completed():
break
- if s._block_proposed():
- cinfo(' A block-proposed tag exists on this tracking bug', 'yellow')
- break
-
if s._kernel_block():
cinfo(' A kernel-block tag exists on this tracking bug', 'yellow')
break
@@ -75,6 +71,10 @@ class PromoteToUpdates(Promoter):
# Check if packages were copied to the right pocket->component
#
+ if s._block_proposed():
+ s._remove_block_proposed()
+ cinfo(' Removing block-proposed tag on this tracking bug', 'yellow')
+
if not s.bug.packages_released:
cinfo(' packages have not been released', 'yellow')
break
@@ -36,6 +36,23 @@ class Promoter(TaskHandler):
cleave(s.__class__.__name__ + '.block_proposed (%s)' % retval)
return retval
+ def _remove_block_proposed(s):
+ '''
+ Remove 'block-proposed' tags in order to signal britney.
+ '''
+ center(s.__class__.__name__ + '.remove_block_proposed')
+
+ try:
+ series_tag = 'block-proposed-%s' % s.bug.series
+ if series_tag in s.bug.lpbug.tags:
+ s.bug.lpbug.tags.remove(series_tag)
+ if 'block-proposed' in s.bug.lpbug.tags:
+ s.bug.lpbug.tags.remove('block-proposed')
+ except:
+ pass
+
+ cleave(s.__class__.__name__ + '.remove_block_proposed')
+
def _security_signoff_verified(s):
'''
Check if the security-signoff task has been set to 'Fix Released'. Development
britney only checks for the tags, not the tasks, and block-proposed will block it. So, block-proposed tags need to be removed whenever we are ready to promote the packages. We have the kernel-block tag as a tool to stop the promotions. Remove the tags whenever we set any of the release, security or updates promotion to Confirmed or further. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> --- stable/wfl/wft/promote_to_release.py | 8 ++++---- stable/wfl/wft/promote_to_security.py | 8 ++++---- stable/wfl/wft/promote_to_updates.py | 8 ++++---- stable/wfl/wft/promoter.py | 17 +++++++++++++++++ 4 files changed, 29 insertions(+), 12 deletions(-)