]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: Don't look for --make-ddi= definitions inside --root=
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 7 Dec 2023 13:26:10 +0000 (14:26 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 8 Dec 2023 08:33:24 +0000 (09:33 +0100)
It doesn't really make sense to go looking for these inside the
given root directory. While we should resolve specifiers and such
based on the given root directory, let's look up the image definitions
on the host system as there's a good chance they're coupled to the
repart version we're using so there's all kinds of chances for problems
if we use the definitions from the image we're building instead of those
from the host.

src/partition/repart.c

index aa0269e7309e63bf386ceb9ffe295609558ebbd7..3a92d1be1c1d5ad4f7a78a6d5b604a51d4337bce 100644 (file)
@@ -7578,7 +7578,7 @@ static int run(int argc, char *argv[]) {
                 if (!d)
                         return log_oom();
 
-                r = search_and_access(d, F_OK, arg_root, CONF_PATHS_USR_STRV("systemd/repart/definitions"), &dp);
+                r = search_and_access(d, F_OK, NULL, CONF_PATHS_USR_STRV("systemd/repart/definitions"), &dp);
                 if (r < 0)
                         return log_error_errno(r, "DDI type '%s' is not defined: %m", arg_make_ddi);