All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] lvm2: allow lvm2-scripts sort rdep to be configurable
@ 2021-07-20 13:04 Peter Morrow
  2021-07-20 16:45 ` [oe] " Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Morrow @ 2021-07-20 13:04 UTC (permalink / raw)
  To: openembedded-devel

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 <pemorrow@linux.microsoft.com>
---
 meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb b/meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb
index 7f3f000e0..fbf424f44 100644
--- a/meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb
+++ b/meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb
@@ -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})"
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [oe] [meta-oe][PATCH] lvm2: allow lvm2-scripts sort rdep to be configurable
  2021-07-20 13:04 [meta-oe][PATCH] lvm2: allow lvm2-scripts sort rdep to be configurable Peter Morrow
@ 2021-07-20 16:45 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2021-07-20 16:45 UTC (permalink / raw)
  To: Peter Morrow, openembedded-devel



On 7/20/21 6:04 AM, Peter Morrow wrote:
> 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 <pemorrow@linux.microsoft.com>
> ---
>   meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb b/meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb
> index 7f3f000e0..fbf424f44 100644
> --- a/meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb
> +++ b/meta-oe/recipes-support/lvm2/lvm2_2.03.11.bb
> @@ -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


>   RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) \
>                             bash \
>                             util-linux-lsblk \
>                             util-linux-findmnt \
> -                          coreutils \
> +                          ${VIRTUAL-RUNTIME_sort} \
>   "
>   RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})"
>   
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-20 16:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-20 13:04 [meta-oe][PATCH] lvm2: allow lvm2-scripts sort rdep to be configurable Peter Morrow
2021-07-20 16:45 ` [oe] " Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.