zbyszek / releng

Forked from releng 5 years ago
Clone

e9d0a6e Do not allow removing release branches from which builds have been made

Authored and Committed by zbyszek 3 years ago
    Do not allow removing release branches from which builds have been made
    
    Bodhi knows branches that go as far as 'f21':
    ['el5', 'el6', 'eln', 'epel7', 'epel8', 'epel8m', 'f21', 'f22', 'f23', 'f24', 'f25', 'f26', 'f27', 'f27m', 'f28', 'f28', 'f28m', 'f29', 'f29', 'f29', 'f29m', 'f30', 'f30', 'f30', 'f30m', 'f31', 'f31', 'f31', 'f31m', 'f32', 'f32', 'f32', 'f32m', 'f33', 'f33']
    So do the following:
    - look up the branch in bodhi, if found, do the check using any tags
      declared by bodhi
    - if bodhi doesn't know the branch, and the branch matches the pattern
      of 'f\d{1,2}|el\d|epel\d|epel1\d', refuse
      (this is forward-looking, to allow epel10)
    - otherwise allow
    
    We will refuse the removal of very old branches that look like release
    branches, but people wouldn't want that too often anyway, so I think
    that's OK.