| |
@@ -904,10 +904,23 @@
|
| |
'a git repository')
|
| |
|
| |
pdc_url = config.get('{0}.pdc'.format(name), 'url')
|
| |
+ # When a 'epel\d' branch is requested, it should automatically request
|
| |
+ # 'epel\d+-playground' branch.
|
| |
+ epel_playground = False
|
| |
if branch:
|
| |
+ # Check if the requested branch is an epel branch
|
| |
+ if bool(re.match(r'^(?:epel)\d+$', branch)):
|
| |
+ epel_playground = True
|
| |
+
|
| |
if is_epel(branch):
|
| |
assert_valid_epel_package(repo_name, branch)
|
| |
|
| |
+ # Requesting epel\d-playground branches is not allowed
|
| |
+ if bool(re.match(r'^(?:epel)\d+-playground$', branch)):
|
| |
+ raise rpkgError(
|
| |
+ 'You cannot request {0} branch, as they are '
|
| |
+ 'created as part of epel branch requests'.format(branch))
|
| |
+
|
| |
if ns in ['modules', 'test-modules', 'flatpaks']:
|
| |
branch_valid = bool(re.match(r'^[a-zA-Z0-9.\-_+]+$', branch))
|
| |
if not branch_valid:
|
| |
@@ -942,7 +955,13 @@
|
| |
branches = [b for b in release_branches
|
| |
if re.match(r'^(f\d+)$', b)]
|
| |
else:
|
| |
- branches = [branch]
|
| |
+ # If the requested branch is epel branch then also add epel\d+-playground
|
| |
+ # branch to the request list.
|
| |
+ # Remove the check for epel version >= 7 when we enable playground for epel7
|
| |
+ if epel_playground and int(''.join([i for i in branch if re.match(r'\d', i)])) >= 7:
|
| |
+ branches = [branch, branch+"-playground"]
|
| |
+ else:
|
| |
+ branches = [branch]
|
| |
|
| |
for b in sorted(list(branches), reverse=True):
|
| |
ticket_body = {
|
| |
@@ -965,11 +984,14 @@
|
| |
|
| |
# For non-standard rpm branch requests, also request a matching new
|
| |
# module repo with a matching branch.
|
| |
- auto_module = (
|
| |
- ns == 'rpms'
|
| |
- and not re.match(RELEASE_BRANCH_REGEX, b)
|
| |
- and not no_auto_module
|
| |
- )
|
| |
+ auto_module = None
|
| |
+ # Dont run auto_module on epel requests
|
| |
+ if not epel_playground:
|
| |
+ auto_module = (
|
| |
+ ns == 'rpms'
|
| |
+ and not re.match(RELEASE_BRANCH_REGEX, b)
|
| |
+ and not no_auto_module
|
| |
+ )
|
| |
if auto_module:
|
| |
summary = ('Automatically requested module for '
|
| |
'rpms/%s:%s.' % (repo_name, b))
|
| |
Signed-off-by: Mohan Boddu mboddu@bhujji.com