Skip to content

Commit 1700819

Browse files
committed
cmd-build-with-buildah: simplify build existence check
This drops a cmdlib.sh Python-baked function.
1 parent eeafb93 commit 1700819

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

src/cmd-build-with-buildah

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ build_with_buildah() {
7575
argsfile=build-args-${variant}.conf
7676
fi
7777

78-
if [ "$(check_build_exists "${VERSION}")" == "True" ]; then
78+
if [ -e "builds/$VERSION" ]; then
7979
echo "Build ${VERSION} already exists"
8080
exit 0
8181
fi

src/cmdlib.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,17 +1105,6 @@ cmdlib.import_ostree_commit(workdir, builddir, buildmeta, extract_json=('${extra
11051105
")
11061106
}
11071107

1108-
check_build_exists() {
1109-
local buildid=$1; shift
1110-
(python3 -c "
1111-
import sys
1112-
sys.path.insert(0, '${DIR}')
1113-
from cosalib.builds import Builds
1114-
builds = Builds('${workdir:-$(pwd)}')
1115-
print(builds.has('${buildid}'))
1116-
")
1117-
}
1118-
11191108
# Extract the value of NAME from os-release
11201109
extract_osrelease_name() {
11211110
local buildid=$1; shift

0 commit comments

Comments
 (0)