From 45f95b6464277c4cba75b8de330a4a2258f55e38 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: May 03 2020 23:35:01 +0000 Subject: Allow retirement on epel branches Fixes: #395 Merges: https://pagure.io/fedpkg/pull-request/397 JIRA: RHELCMP-444 Signed-off-by: Mohan Boddu --- diff --git a/fedpkg/cli.py b/fedpkg/cli.py index 452026b..0817306 100644 --- a/fedpkg/cli.py +++ b/fedpkg/cli.py @@ -1260,10 +1260,15 @@ class fedpkgClient(cliClient): Runs the rpkg retire command after check. Check includes reading the state of Fedora release. """ - state = get_fedora_release_state(self.config, self.name, self.cmd.branch_merge) - - if state is None or state == 'pending': + # Allow retiring in epel + if is_epel(self.cmd.branch_merge): super(fedpkgClient, self).retire() else: - self.log.error("Fedora release (%s) is in state '%s' - retire operation " - "is not allowed." % (self.cmd.branch_merge, state)) + state = get_fedora_release_state(self.config, self.name, self.cmd.branch_merge) + + # Allow retiring in Rawhide and Branched until Final Freeze + if state is None or state == 'pending': + super(fedpkgClient, self).retire() + else: + self.log.error("Fedora release (%s) is in state '%s' - retire operation " + "is not allowed." % (self.cmd.branch_merge, state))