Not sure what the proper protocol is here for patch submissions, so bear with me if I've done something out of turn. I've emailed the old maintainer for this script and he pointed me to the list as he doesn't maintain the upstream any more.
Problem occurs when promoting content from a base channel to a first phase channel. When the process hits a child channel that doesn't start with "rhel-", it fails with "ERROR: Invalid phase name:". Checking the script, there is a hard coded value that assumes all base channels start with "rhel-" when creating labels with phases. The change below uses the phase list to determine what needs to be stripped and replaced instead of a hard coded comparison. My testing shows it does the right thing with non-"rhel-" labeled sources and honors the phase list edges (no promotion past last phase, works with non-default phase lists, etc). @@ -202,16 +202,18 @@ if match: current_phase = match.group(1) - # check if this is a base channel - if current_phase == 'rhel': - destination = '%s-%s' % (phases[0], source) - else: + # Check to see if the source channel is in our phase list + # if so, select the next label in phase list + # otherwise, it's a base channel, use the first in list + if current_phase in phases: next_phase = get_next_phase(current_phase) # replace the name of the phase in the destination label destination = re.sub('^%s' % current_phase, '%s' % next_phase, source) + else: + destination = '%s-%s' % (phases[0], source) else: logging.error('Invalid channel label: %s' % source) sys.exit(1) Regards, Matt Matt Micene Engineering Team Lead RHCA #100-002-435 DLT Solutions Direct 703-773-1195 _______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel