Skip to content

Commit e2ec286

Browse files
committed
run.py: allow selection of container platform
Necessary with podman < v5.5.1 to workaround a bug. Signed-off-by: Yann Dirson <[email protected]>
1 parent 6642603 commit e2ec286

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

run.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ def main():
8080
parser.add_argument('--disablerepo',
8181
help='disable repositories. Same syntax as yum\'s --disablerepo parameter. '
8282
'If both --enablerepo and --disablerepo are set, --disablerepo will be applied first')
83+
parser.add_argument('--platform', action='store',
84+
help="Override the default platform for the build container. "
85+
"Can notably be used to workaround podman bug #6185 fixed in v5.5.1.")
8386
parser.add_argument('--fail-on-error', action='store_true',
8487
help='If container initialisation fails, exit rather than dropping the user '
8588
'into a command shell')
@@ -89,7 +92,7 @@ def main():
8992
args = parser.parse_args(sys.argv[1:])
9093

9194
branch = args.branch or DEFAULT_BRANCH
92-
docker_arch = "linux/amd64/v2" if branch == "9.0" else "linux/amd64"
95+
docker_arch = args.platform or ("linux/amd64/v2" if branch == "9.0" else "linux/amd64")
9396

9497
docker_args = [RUNNER, "run", "-i", "-t",
9598
"-u", "builder",

0 commit comments

Comments
 (0)