@@ -20,7 +20,8 @@ Usage: coreos-assembler build-with-buildah
2020 --autolock=VERSION If no base lockfile used, create one from any arch build of `VERSION`.
2121 Note this is automatically enabled when adding to an existing multi-arch
2222 non-strict build.
23- --skip-prune Skip prunning previous builds
23+ --skip-prune Skip prunning previous builds.
24+ --strict Only allow installing locked packages when using lockfiles.
2425 --parent-build=VERSION This option does nothing and is provided for backwards compatibility.
2526 --force This option does nothing and is provided for backwards compatibility.
2627EOF
@@ -31,8 +32,9 @@ VERSIONARY=
3132DIRECT=
3233AUTOLOCK_VERSION=
3334SKIP_PRUNE=
35+ STRICT=
3436rc=0
35- options=$( getopt --options h,d --longoptions help,version:,versionary,direct,autolock:,skip-prune,parent-build:,force -- " $@ " ) || rc=$?
37+ options=$( getopt --options h,d --longoptions help,version:,versionary,direct,autolock:,skip-prune,parent-build:,force,strict -- " $@ " ) || rc=$?
3638[ $rc -eq 0 ] || {
3739 print_help
3840 exit 1
@@ -61,6 +63,9 @@ while true; do
6163 --skip-prune)
6264 SKIP_PRUNE=1
6365 ;;
66+ --strict)
67+ STRICT=1
68+ ;;
6469 --parent-build)
6570 shift
6671 ;;
@@ -161,6 +166,10 @@ build_with_buildah() {
161166 -v /etc/pki/ca-trust:/etc/pki/ca-trust:ro
162167 fi
163168
169+ if [ -n " ${STRICT} " ]; then
170+ set -- " $@ " --build-arg STRICT_MODE=1
171+ fi
172+
164173 if [ -d overrides ]; then
165174 if [ -d overrides/rpm ]; then
166175 # Clean up any previous repo metadata
0 commit comments