Skip to content

Commit f529f73

Browse files
committed
cmdlib.sh: drop runvm_with_cache_snapshot()
This is now no longer used. runvm_with_cache_snapshot was used by runvm-osbuild previously but it's not needed any longer and cosa supermin-run --snapshot was used by build-podman-os job in the pipeline, but that isn't being used either so we can drop it.
1 parent 5ab44b8 commit f529f73

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

src/cmd-supermin-run

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dn=$(dirname "$0")
66
. "${dn}"/cmdlib.sh
77

88
print_help() {
9-
echo "Usage: cosa supermin-run [--cache|--snapshot] COMMAND [ARG...]" >&2
9+
echo "Usage: cosa supermin-run [--cache] COMMAND [ARG...]" >&2
1010
}
1111

1212
if [ $# = 0 ]; then
@@ -21,11 +21,6 @@ case "$1" in
2121
set -- runvm_with_cache -- "$@"
2222
need_cache_dir=1
2323
;;
24-
--snapshot)
25-
shift
26-
set -- runvm_with_cache_snapshot on -- "$@"
27-
need_cache_dir=1
28-
;;
2924
--*)
3025
echo "unrecognized option: $1"
3126
print_help

src/cmdlib.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -574,10 +574,8 @@ runcompose_tree() {
574574
fi
575575
}
576576

577-
# Run with cache disk with optional snapshot=on, which means no changes get written back to
578-
# the cache disk. `runvm_with_cache_snapshot on` will set snapshotting to on.
579-
runvm_with_cache_snapshot() {
580-
local snapshot=$1; shift
577+
# Run with cache disk.
578+
runvm_with_cache() {
581579
local cache_size=${RUNVM_CACHE_SIZE:-30G}
582580
# "cache2" has an explicit label so we can find it in qemu easily
583581
if [ ! -f "${workdir}"/cache/cache2.qcow2 ]; then
@@ -590,16 +588,11 @@ runvm_with_cache_snapshot() {
590588
fi
591589
# And remove the old one
592590
rm -vf "${workdir}"/cache/cache.qcow2
593-
cache_args+=("-drive" "if=none,id=cache,discard=unmap,snapshot=${snapshot},file=${workdir}/cache/cache2.qcow2" \
591+
cache_args+=("-drive" "if=none,id=cache,discard=unmap,file=${workdir}/cache/cache2.qcow2" \
594592
"-device" "virtio-blk,drive=cache")
595593
runvm "${cache_args[@]}" "$@"
596594
}
597595

598-
runvm_with_cache() {
599-
local snapshot='off'
600-
runvm_with_cache_snapshot $snapshot "$@"
601-
}
602-
603596
# Strips out the digest field from lockfiles since they subtly conflict with
604597
# various workflows.
605598
strip_out_lockfile_digests() {

0 commit comments

Comments
 (0)