Skip to content

Commit d394261

Browse files
committed
Fix "cname" creation from flavor if --arch is specified
Signed-off-by: Tobias Wolf <[email protected]>
1 parent ad5dcd6 commit d394261

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/gardenlinux/features/__main__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,13 @@ def main():
5858
if re_match.lastindex == 1:
5959
data_splitted = re_match[1].split("-", 1)
6060

61-
if len(data_splitted) > 1:
62-
arch = data_splitted[1]
63-
6461
cname_base = data_splitted[0]
62+
63+
if len(data_splitted) > 1:
64+
if args.arch is None:
65+
arch = data_splitted[1]
66+
else:
67+
cname_base += "-" + data_splitted[1]
6568
else:
6669
arch = re_match[4]
6770
cname_base = re_match[1]

src/gardenlinux/features/cname_main.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ def main():
3535
if re_match.lastindex == 1:
3636
data_splitted = re_match[1].split("-", 1)
3737

38-
if len(data_splitted) > 1:
39-
arch = data_splitted[1]
40-
4138
cname_base = data_splitted[0]
39+
40+
if len(data_splitted) > 1:
41+
if args.arch is None:
42+
arch = data_splitted[1]
43+
else:
44+
cname_base += "-" + data_splitted[1]
4245
else:
4346
arch = re_match[4]
4447
cname_base = re_match[1]

0 commit comments

Comments
 (0)