]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: Don't fail install script if file doesn't exist
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 5 Jun 2025 10:14:45 +0000 (12:14 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 25 Jun 2025 12:36:10 +0000 (13:36 +0100)
Depending on which optional features are enabled, the NSS module
might not have been built, which means the custom install script
will fail to remove the file. Let's pass -f so it succeeds regardless
of whether the file exists or not.

(cherry picked from commit a292b55980d6ff2afd98deb9bcc3118cfcac4c67)

meson.build

index 1fb34b06e6289a6e44e025840fc6a84772d8a6b9..7ede6f7a96ac6bead4a379b10ddffa7e2ad68ad8 100644 (file)
@@ -2659,7 +2659,7 @@ foreach dict : modules
         if is_nss
                 # We cannot use shared_module because it does not support version suffix.
                 # Unfortunately shared_library insists on creating the symlink…
-                meson.add_install_script(sh, '-c', 'rm $DESTDIR@0@/lib@1@.so'.format(libdir, name),
+                meson.add_install_script(sh, '-c', 'rm -f $DESTDIR@0@/lib@1@.so'.format(libdir, name),
                                          install_tag : 'nss')
                 nss_targets += lib
         endif