Skip to content

Commit 6e863df

Browse files
committed
cmd-import: make pre-existing build ID check arch-aware
This is basically the same as 2de6b0d ("cmd-build-with-buildah: make build existence check arch-aware") but for the import command.
1 parent f6371b6 commit 6e863df

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cmd-import

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ def main():
3737
buildid = metadata['Labels']['org.opencontainers.image.version']
3838

3939
builds = Builds()
40-
if builds.has(buildid):
41-
print(f"ERROR: Build ID {buildid} already exists!")
40+
arch = get_basearch()
41+
if builds.has(buildid) and arch in builds.get_build_arches(buildid):
42+
print(f"ERROR: Build ID {buildid} ({arch}) already exists!")
4243
sys.exit(1)
4344

4445
with tempfile.TemporaryDirectory(prefix='cosa-import-', dir='tmp') as tmpd:

0 commit comments

Comments
 (0)