]> git.ipfire.org Git - thirdparty/systemd.git/commit
importd: make keeping pristine copy of downloaded images optional
authorLennart Poettering <lennart@poettering.net>
Thu, 22 Feb 2024 17:50:32 +0000 (18:50 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 1 Mar 2024 21:25:42 +0000 (22:25 +0100)
commitb146afc4492e083e8f08301285b88f7202e93052
treedd6b6785dd72fb19ed9007f396f32ed2867ed3ea
parent8f20b498bd072bc9a0e9640b8560685ed11262f8
importd: make keeping pristine copy of downloaded images optional

Previously, when downloading an image, importd would first download them
into one image which it would then consider immutable (named after the
originating URL/etag), and then immediately make a copy of it (named
after the client chosen name).

This makes some sense in VM/container cases where the images are
typically mutable, and thus the original downloaded copy is of some
value.

For sysexts/confexts/portable this doesn't make much sense though, as
they are typically immutable. Hence make the concept optional.

This adds --keep-download=yes/no as a new option that controls the
above. Moreover it disables the behaviour for all image classes but
"machine". The behaviour remains enabled for "machine", for compat.
src/import/import-common.h
src/import/importctl.c
src/import/importd.c
src/import/pull-raw.c
src/import/pull-tar.c
src/import/pull.c