tests: Use ostree commit --consume

Just noticed this while working on something else; we should use it where
possible.

Closes: #1117
Approved by: jlebon
This commit is contained in:
Colin Walters 2017-11-28 21:37:06 -05:00 committed by Atomic Bot
parent 1c5c4a457e
commit b68fe099ea

View File

@ -65,6 +65,14 @@ fi
rm -vrf vmcheck/usr/etc/selinux/targeted/semanage.*.LOCK
# ✀✀✀ END tmp hack
ostree commit --parent=none -b vmcheck --add-metadata-string=ostree.source-title="Dev overlay on ${origin}" --add-metadata-string=rpmostree.original-origin=${origin} --link-checkout-speedup \
--selinux-policy=vmcheck --tree=dir=vmcheck
consume_opt=
if ostree commit --help | grep -q -e --consume; then
consume_opt=--consume
fi
ostree commit --parent=none -b vmcheck \
--add-metadata-string=ostree.source-title="Dev overlay on ${origin}" \
--add-metadata-string=rpmostree.original-origin=${origin} \
--link-checkout-speedup ${consume_opt} \
--selinux-policy=vmcheck --tree=dir=vmcheck
ostree admin deploy vmcheck