diff mbox series

[meta-selinux,2/3] policycoretuils: allow an empty main package which pull in other packages

Message ID 20260910024301.2228292-2-chenqi_hycx@cetc.com.cn
State New
Headers show
Series [meta-selinux,1/3] policycoreutils: split unsetfiles like other utilities | expand

Commit Message

Chen Qi Sept. 10, 2026, 2:43 a.m. UTC
From: Chen Qi <chenqi_hycx@cetc.com.cn>

It's more reasonable to allow and empty main package just like util-linux.
In this way, people can just install policycoreutils and it will pull
in other splitted packages.

Signed-off-by: Chen Qi <chenqi_hycx@cetc.com.cn>
---
 recipes-security/selinux/policycoreutils_3.10.bb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/recipes-security/selinux/policycoreutils_3.10.bb b/recipes-security/selinux/policycoreutils_3.10.bb
index 159a77e..42b4666 100644
--- a/recipes-security/selinux/policycoreutils_3.10.bb
+++ b/recipes-security/selinux/policycoreutils_3.10.bb
@@ -58,7 +58,10 @@  RDEPENDS:${PN}-setsebool = "\
 "
 RDEPENDS:${PN}:class-target = "selinux-python"
 
-PACKAGES =+ "\
+# The purpose of the following settings is to split out each utility
+# into its own package and make the main package, policycoreutils, an
+# empty package that could be used to introuduce all these utilities.
+POLICYCOREUTILS_PACKAGES = "\
     ${PN}-fixfiles \
     ${PN}-genhomedircon \
     ${PN}-hll \
@@ -72,6 +75,10 @@  PACKAGES =+ "\
     ${PN}-setsebool \
     ${PN}-unsetfiles \
 "
+PACKAGES =+ "${POLICYCOREUTILS_PACKAGES}"
+ALLOW_EMPTY:${PN} = "1"
+RDEPENDS:${PN} += "${POLICYCOREUTILS_PACKAGES}"
+
 FILES:${PN}-fixfiles = "${base_sbindir}/fixfiles"
 FILES:${PN}-genhomedircon = "${base_sbindir}/genhomedircon"
 FILES:${PN}-loadpolicy = "\