@@ -20,7 +20,8 @@ Usage: coreos-assembler build-with-buildah
20
20
--autolock=VERSION If no base lockfile used, create one from any arch build of `VERSION`.
21
21
Note this is automatically enabled when adding to an existing multi-arch
22
22
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.
24
25
--parent-build=VERSION This option does nothing and is provided for backwards compatibility.
25
26
--force This option does nothing and is provided for backwards compatibility.
26
27
EOF
@@ -31,8 +32,9 @@ VERSIONARY=
31
32
DIRECT=
32
33
AUTOLOCK_VERSION=
33
34
SKIP_PRUNE=
35
+ STRICT=
34
36
rc=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=$?
36
38
[ $rc -eq 0 ] || {
37
39
print_help
38
40
exit 1
@@ -61,6 +63,9 @@ while true; do
61
63
--skip-prune)
62
64
SKIP_PRUNE=1
63
65
;;
66
+ --strict)
67
+ STRICT=1
68
+ ;;
64
69
--parent-build)
65
70
shift
66
71
;;
@@ -161,6 +166,10 @@ build_with_buildah() {
161
166
-v /etc/pki/ca-trust:/etc/pki/ca-trust:ro
162
167
fi
163
168
169
+ if [ -n " ${STRICT} " ]; then
170
+ set -- " $@ " --build-arg STRICT_MODE=1
171
+ fi
172
+
164
173
if [ -d overrides ]; then
165
174
if [ -d overrides/rpm ]; then
166
175
# Clean up any previous repo metadata
0 commit comments