Fixes #310. Add '-f' to 'rm' command in uninstall hooks to avoid error messages if files do not exist. - #311
Fixes #310. Add '-f' to 'rm' command in uninstall hooks to avoid error messages if files do not exist.#311spuck wants to merge 1 commit into
Conversation
…avoid error messages if file does not exist.
|
Thank you for the Please leave out your changes to the When in your You can then remove your changes to the At this point you might fix the indentation in the You can give the commit message from a file by using the The You can then commit these changes with If you don't want to bother with updating this PR, then would you consider giving your approval for this commit: [PATCH] ksmbd-tools: add PKG_CHECK_VAR macro for pre-0.28 pkg-config (click the arrow to expand)From 782d583e1dad8e17bf7993df0f7aba369ae00d1d Mon Sep 17 00:00:00 2001
From: Travis Hayes <travis.hayes@sdl.usu.edu>
Date: Fri, 17 Nov 2023 02:29:23 +0200
Subject: [PATCH] ksmbd-tools: add PKG_CHECK_VAR macro for pre-0.28 pkg-config
The PKG_CHECK_VAR macro was added in pkg-config 0.28, which is too new
for some still-supported distros. Vendor it from pkg-config and use it
if left undefined.
Signed-off-by: Travis Hayes <travis.hayes@sdl.usu.edu>
---
configure.ac | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/configure.ac b/configure.ac
index de5158b..76935e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,23 @@ AC_PROG_SED
AC_PROG_MKDIR_P
AC_PROG_LN_S
+# Check if PKG_CHECK_VAR exists for compatibility with older (pre-version 0.28) pkg-config
+m4_ifndef([PKG_CHECK_VAR], [
+ # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+ # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+ # -------------------------------------------
+ # Retrieves the value of the pkg-config variable for the given module.
+ AC_DEFUN([PKG_CHECK_VAR],
+ [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+ AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+ _PKG_CONFIG([$1], [variable="][$3]["], [$2])
+ AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+ AS_VAR_IF([$1], [""], [$5], [$4])dnl
+ ])# PKG_CHECK_VAR
+])
+
AC_SUBST([in_script], [[\
'$(SED) -e "s,[@]sbindir[@],$(sbindir),g" \
-e "s,[@]sysconfdir[@],$(sysconfdir),g" \
--
2.42.1
I have not extensively tested this but I trust you have. |
Also, quoting directory names in calls to "rm".