]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(resolve-deps): check the existing file—not the source
authorFrederick Grose <fgrose@sugarlabs.org>
Sun, 21 May 2023 22:05:12 +0000 (18:05 -0400)
committerAntonio Álvarez Feijoo <antonio.feijoo@suse.com>
Tue, 6 Jun 2023 06:51:58 +0000 (08:51 +0200)
Check for dependencies on the file actually installed, otherwise,
such as when the shebang is a link not equal to the initramfs link,
the wrong file may be tested.

src/install/dracut-install.c

index 6bf5ce1fd70a1300fcb4a5f5562a0d7c6e5e0360..a945e3fd5985d3b95e9e1ff2c9c3f32431440f12 100644 (file)
@@ -823,7 +823,7 @@ static int dracut_install(const char *orig_src, const char *orig_dst, bool isdir
         if (ret == 0) {
                 if (resolvedeps && S_ISREG(sb.st_mode) && (sb.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) {
                         log_debug("'%s' already exists, but checking for any deps", fulldstpath);
-                        ret = resolve_deps(fullsrcpath + sysrootdirlen);
+                        ret = resolve_deps(fulldstpath + sysrootdirlen);
                 } else
                         log_debug("'%s' already exists", fulldstpath);