Skip to contentSkip to conversation

wireguard-tools: Use PACKAGECONFIG to select wg-quick and bashcompletion

PATCH Superseded Daiane Angolini 2 participants 2 messages Oct 31, 2023 – Nov 1, 2023

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wireguard-tools: Use PACKAGECONFIG to select wg-quick and bashcompletion

Condition the creation of sub-packages and their consequences to a PACKAGECONFIG, which can be overriden outside the metalayer.

---
 .../wireguard/wireguard-tools_1.0.20210914.bb          | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
meta-networking/recipes-kernel/wireguard/wireguard-tools_1.0.20210914.bb +6 -4
index 20435338c..44b9eb2f7 100644
@@ -11,11 +11,15 @@ do_install () {
     oe_runmake DESTDIR="${D}" PREFIX="${prefix}" SYSCONFDIR="${sysconfdir}" \
         SYSTEMDUNITDIR="${systemd_system_unitdir}" \
         WITH_SYSTEMDUNITS=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', '', d)} \
-        WITH_BASHCOMPLETION=yes \
-        WITH_WGQUICK=yes \
+        ${PACKAGECONFIG_ARGS} \
         install
 }
 
+PACKAGECONFIG ??= "bashcompletion wgquick"
+
+PACKAGECONFIG[bashcompletion] = "WITH_BASHCOMPLETION=yes, , , , , "
+PACKAGECONFIG[wgquick] = "WITH_WGQUICK=yes, , ,${PN} bash,${PN}-wg-quick, "
+
 PACKAGES += "${PN}-wg-quick"
 
 FILES:${PN} = " \
@@ -27,8 +31,6 @@ FILES:${PN}-wg-quick = " \
     ${systemd_system_unitdir} \
 "
 
-RDEPENDS:${PN}-wg-quick = "${PN} bash"
 RRECOMMENDS:${PN} = " \
     kernel-module-wireguard \
-    ${PN}-wg-quick \
     "
Signature · 1 line
2.34.1
#1 lore raw

this fails see
https://errors.yoctoproject.org/Errors/Details/741221/

Quoted 52 lines · Daiane Angolini via lists.openembedded.org

Condition the creation of sub-packages and their consequences to a PACKAGECONFIG, which can be overriden outside the metalayer.

---
 .../wireguard/wireguard-tools_1.0.20210914.bb          | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
meta-networking/recipes-kernel/wireguard/wireguard-tools_1.0.20210914.bb +6 -5
index 20435338c..44b9eb2f7 100644
@@ -11,11 +11,15 @@ do_install () {
     oe_runmake DESTDIR="${D}" PREFIX="${prefix}" SYSCONFDIR="${sysconfdir}" \
         SYSTEMDUNITDIR="${systemd_system_unitdir}" \
         WITH_SYSTEMDUNITS=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'yes', '', d)} \
-        WITH_BASHCOMPLETION=yes \
-        WITH_WGQUICK=yes \
+        ${PACKAGECONFIG_ARGS} \
         install
 }
 
+PACKAGECONFIG ??= "bashcompletion wgquick"
+
+PACKAGECONFIG[bashcompletion] = "WITH_BASHCOMPLETION=yes, , , , , "
+PACKAGECONFIG[wgquick] = "WITH_WGQUICK=yes, , ,${PN} bash,${PN}-wg-quick, "
+
 PACKAGES += "${PN}-wg-quick"
 
 FILES:${PN} = " \
@@ -27,8 +31,6 @@ FILES:${PN}-wg-quick = " \
     ${systemd_system_unitdir} \
 "
 
-RDEPENDS:${PN}-wg-quick = "${PN} bash"
 RRECOMMENDS:${PN} = " \
     kernel-module-wireguard \
-    ${PN}-wg-quick \
     "
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#105808): https://lists.openembedded.org/g/openembedded-devel/message/105808
Mute This Topic: https://lists.openembedded.org/mt/102306255/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-