Skip to content

Commit 617ba50

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 532ad84 commit 617ba50

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
@@ -572,10 +572,8 @@ runcompose_tree() {
572572
fi
573573
}
574574

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

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

0 commit comments

Comments
 (0)