#348 Use package.cfg for epel8+ branches
Merged 4 years ago by onosek. Opened 4 years ago by mohanboddu.
mohanboddu/fedpkg epel8-fixes  into  master

file modified
+31 -5
@@ -350,11 +350,33 @@ 

      # Please remember to review the data regularly, there are only stream

      # branches, or some new replacement of PDC fixes the issue as well, it

      # should be ok to remove if from this list.

-     return [

-         item for item in branches

-         if not re.match(r'^(f|el|epel)\d+$', item['name']) and

-         item['name'] != 'master'

-     ]

+     stream_branches = []

+     for item in branches:

+         if item['name'] == 'master':

+             continue

+         elif re.match(r'^(f|el)\d+$', item['name']):

+             continue

+         # epel8 and above should be considered a stream branch to use

+         # package.cfg file in the branch.

+         elif re.match(r'^(epel)\d+$', item['name']):

+             epel_version = None

+             match = re.match(r'^epel(?P<epel_version>\d+)$', item['name'])

+             if match:

+                 epel_version = int(match.groupdict()["epel_version"])

+                 # If the branch is epel8, add it to stream branches

+                 if epel_version >= 8:

+                     stream_branches.append(item)

+                 else:

+                     continue

+         # epel8-playground and above playground branches should be considered

+         # as release branches so that it will use epelx-playground-candidate

+         # target to build.

+         elif bool(re.match(r'^epel\d+-playground$', item['name'])):

+             continue

+         else:

+             stream_branches.append(item)

+     return stream_branches

+ 

  

  

  def expand_release(rel, active_releases):
@@ -379,5 +401,9 @@ 

          return active_releases['epel']

      elif rel in active_releases['fedora'] or rel in active_releases['epel']:

          return [rel]

+     # if epelx-playground branch then return the release to use

+     # epelx-playground-candidate target

+     elif re.match(r'^(epel)\d+-playground$', rel):

+         return [rel]

      else:

          return None

rebased onto f5ae834

4 years ago

Commit 702d685 fixes this pull-request

Pull-Request has been merged by onosek

4 years ago

I did some changes upon your code. Thank you.

Thanks @onosek , when could you build it? We might need it by the end of the week.