@@ -50,12 +50,11 @@ def get_version_distro_mapping(
50
50
51
51
[{"distro": "rhel-8-x86_64.yaml", "version": "3.9"},
52
52
{"distro": "rhel-8-x86_64.yaml", "version": "3.8"},
53
- {"distro": "centos-7-x86_64.yaml", "version": "3.8"},
54
53
{"distro": "centos-stream-9-x86_64.yaml", "version": "3.9"}]
55
54
56
55
and transfer them to:
57
56
58
- {"3.8": ["rhel-8-x86_64.yaml", "centos-7 -x86_64.yaml"],
57
+ {"3.8": ["rhel-8-x86_64.yaml", "centos-stream-10 -x86_64.yaml"],
59
58
"3.9": ["rhel-8-x86_64.yaml", "centos-stream-9-x86_64.yaml"]}
60
59
"""
61
60
multispec_yaml = yaml .load (multispec_file .read (), Loader = yaml .SafeLoader )
@@ -74,7 +73,6 @@ def filename_to_distro_config(
74
73
This is usually needed only for dockerfiles.
75
74
- Dockerfile.rhelXX → rhel-XX-x86_64.yaml
76
75
- Dockerfile.cXXs → centos-stream-XX-x86_64.yaml
77
- - Dockerfile.centosX → centos-X-x86_64.yaml
78
76
- Dockerfile.fedora → the newest fedora-XX-x86_64.yaml
79
77
80
78
If not found, empty string is returned indicating that the
@@ -83,14 +81,11 @@ def filename_to_distro_config(
83
81
"""
84
82
rhel_match = re .match (r".*\.rhel(\d+)$" , filename )
85
83
centos_stream_match = re .match (r".*\.c(\d+)s$" , filename )
86
- centos_match = re .match (r".*\.centos(\d+)$" , filename )
87
84
88
85
if rhel_match :
89
86
config = f"rhel-{ rhel_match .group (1 )} -x86_64.yaml"
90
87
elif centos_stream_match :
91
88
config = f"centos-stream-{ centos_stream_match .group (1 )} -x86_64.yaml"
92
- elif centos_match :
93
- config = f"centos-{ centos_match .group (1 )} -x86_64.yaml"
94
89
elif filename .endswith (".fedora" ):
95
90
sorted_configs = sorted (c for c in mapping [version ] if c .startswith ("fedora" ))
96
91
if len (sorted_configs ) > 1 :
@@ -103,7 +98,7 @@ def filename_to_distro_config(
103
98
config = ""
104
99
else :
105
100
raise RuntimeError (
106
- f"File { filename } does not match any of the known suffixes: .rhelXX, .cXs, .centosX or .fedora"
101
+ f"File { filename } does not match any of the known suffixes: .rhelXX, .cXs, or .fedora"
107
102
)
108
103
109
104
return config
@@ -163,10 +158,6 @@ def main() -> None:
163
158
elif section == "SYMLINK_RULES" :
164
159
print (f"LN\t { spec ['src' ]} → { spec ['dest' ]} " )
165
160
symlink (spec ["src" ], spec ["dest" ])
166
- # Remove dead symlinks
167
- # This is needed for backward-compatible symlink Dockerfile → Dockerfile.centos7
168
- # because we want to delete it when Dockerfile.centos7 does not exist.
169
- # When we drop Centos 7, we can stop doing this.
170
161
# In the meantime, if you need to create a dead symlink on purpose,
171
162
# use check_symlink: false in manifest.yml config file.
172
163
# It's easier to remove dead symlinks than checking
0 commit comments