]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pull: there's no need to keep the downloaded image in memory, except for the sha256su...
authorLennart Poettering <lennart@poettering.net>
Wed, 5 Nov 2025 21:28:08 +0000 (22:28 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 8 Nov 2025 08:28:50 +0000 (09:28 +0100)
This seems to be a mistake, in place since the first commit: we only
want the downloaded data in memory if this is a sha256sums or gpg file,
which we need to prorcess ourselves.

src/import/pull-raw.c

index ef10745ba85c71e4469bb3da861453136e2019a9..80ef38f50a6f4763bc403346fa8a40210e4b3cf9 100644 (file)
@@ -872,8 +872,8 @@ int raw_pull_start(
                         return r;
 
                 i->raw_job->calc_checksum = r;
-                i->raw_job->force_memory = true; /* make sure this is both written to disk if that's
-                                                  * requested and into memory, since we need to verify it */
+                i->raw_job->force_memory = !r; /* make sure this is both written to disk if that's
+                                                * requested and into memory, since we need to verify it */
         }
 
         if (size_max != UINT64_MAX)