From 6e4f0c0765f07696ed3b10be96a54a4a6810ac46 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Mon, 8 Mar 2021 14:35:45 -0500 Subject: tmpfiles.eclass: introduce TMPFILES_OPTIONAL variable This allows the automatic dependency on virtual/tmpfiles to be disabled. Bug: https://bugs.gentoo.org/774855 Signed-off-by: Mike Gilbert Acked-by: David Seifert --- eclass/tmpfiles.eclass | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'eclass/tmpfiles.eclass') diff --git a/eclass/tmpfiles.eclass b/eclass/tmpfiles.eclass index 360c5e3b816f..632343821648 100644 --- a/eclass/tmpfiles.eclass +++ b/eclass/tmpfiles.eclass @@ -60,7 +60,15 @@ case "${EAPI}" in *) die "API is undefined for EAPI ${EAPI}" ;; esac -RDEPEND="virtual/tmpfiles" +# @ECLASS-VARIABLE: TMPFILES_OPTIONAL +# @DEFAULT_UNSET +# @DESCRIPTION: +# When not empty, disables the dependency on virtual/tmpfiles. +# Ebuilds that call tmpfiles_process conditionally should declare a +# conditional dependency themselves. +if [[ -z ${TMPFILES_OPTIONAL} ]]; then + RDEPEND="virtual/tmpfiles" +fi # @FUNCTION: dotmpfiles # @USAGE: ... -- cgit v1.2.3-65-gdbad