lvm2: allow lvm2-scripts sort rdep to be configurable
PATCH 1/1 lvm2: allow lvm2-scripts sort rdep to be configurable
By default lvm2-scripts has a runtime dependency on coreutils to provide the "sort" binary. There are alternative providers for "sort" such as busybox. It isn't desirabled in some cases to pull in a large package such as coreutils when busybox can provide the sort binary. This patch allows the dependency to be changed to something other than coreutils.
--- meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb +5 -1
@@ -69,11 +69,15 @@ RDEPENDS_${PN}-udevrules = "libdevmapper" RDEPENDS_${PN}_append_class-target = " libdevmapper" RDEPENDS_${PN}_append_class-nativesdk = " libdevmapper" +# Select the runtime dependency for lvm2-scripts which provides the "sort" +# binary. +VIRTUAL-RUNTIME_sort ?= "coreutils" + RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) \ bash \ util-linux-lsblk \ util-linux-findmnt \ - coreutils \ + ${VIRTUAL-RUNTIME_sort} \ " RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})"
Signature · 1 line
2.20.1
Quoted 17 lines · Peter Morrow
By default lvm2-scripts has a runtime dependency on coreutils to provide the "sort" binary. There are alternative providers for "sort" such as busybox. It isn't desirabled in some cases to pull in a large package such as coreutils when busybox can provide the sort binary. This patch allows the dependency to be changed to something other than coreutils.
Signed-off-by Peter Morrow <[email protected]>--- meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb +0
-0
meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb RDEPENDS_${PN}-udevrules = "libdevmapper" · line 75
Quoted 7 lines
meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb +4
-0@@ -69,11 +69,15 @@ RDEPENDS_${PN}-udevrules = "libdevmapper" RDEPENDS_${PN}_append_class-target = " libdevmapper" RDEPENDS_${PN}_append_class-nativesdk = " libdevmapper" +# Select the runtime dependency for lvm2-scripts which provides the "sort" +# binary. +VIRTUAL-RUNTIME_sort ?= "coreutils" +
if coreutils is pulled in via other rdeps then this will be ineffective. Secondly, it seems more like a global setting instead of per recipe setting. Maybe turn it into packageconfig
PACKAGECONFIG[busybox-sort] = ",,,busybox"
PACKAGECONFIG[coreutils-sort] = ",,,coreutils"
and then default to coreutils
Quoted 14 lines
meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb +1
-1RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) \ bash \ util-linux-lsblk \ util-linux-findmnt \ - coreutils \ + ${VIRTUAL-RUNTIME_sort} \ " RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})"