Openembedded Core Discussions
 help / color / mirror / Atom feed
* [meta-oe][PATCH v2] iproute2: add devlink support to iproute2
@ 2020-02-18 22:44 Scott Branden
  2020-02-18 23:18 ` Peter Kjellerstedt
  0 siblings, 1 reply; 7+ messages in thread
From: Scott Branden @ 2020-02-18 22:44 UTC (permalink / raw)
  To: openembedded-core

Add devlink support to iproute2 recipe.

Signed-off-by: Scott Branden <scott.branden@broadcom.com>
---
 meta/recipes-connectivity/iproute2/iproute2.inc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc
index fc31b8444e..98793af88e 100644
--- a/meta/recipes-connectivity/iproute2/iproute2.inc
+++ b/meta/recipes-connectivity/iproute2/iproute2.inc
@@ -15,11 +15,13 @@ inherit update-alternatives bash-completion pkgconfig
 
 CLEANBROKEN = "1"
 
-PACKAGECONFIG ??= "tipc elf"
+PACKAGECONFIG ??= "tipc elf devlink"
 PACKAGECONFIG[tipc] = ",,libmnl,"
 PACKAGECONFIG[elf] = ",,elfutils,"
+PACKAGECONFIG[devlink] = ",,libmnl,"
 
 EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
+                ${@bb.utils.contains('PACKAGECONFIG', 'devlink', 'devlink', '', d)}                                               \
                 ${@bb.utils.contains('PACKAGECONFIG', 'tipc', 'tipc', '', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
 
 do_configure_append () {
@@ -46,7 +48,8 @@ PACKAGES =+ "${PN}-tc \
              ${PN}-rtacct \
              ${PN}-nstat \
              ${PN}-ss \
-             ${@bb.utils.contains('PACKAGECONFIG', 'tipc', '${PN}-tipc', '', d)}"
+             ${@bb.utils.contains('PACKAGECONFIG', 'tipc', '${PN}-tipc', '', d)} \
+             ${@bb.utils.contains('PACKAGECONFIG', 'devlink', '${PN}-devlink', '', d)}"
 FILES_${PN}-tc = "${base_sbindir}/tc* \
                   ${libdir}/tc/*.so"
 FILES_${PN}-lnstat = "${base_sbindir}/lnstat \
@@ -58,6 +61,7 @@ FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
 FILES_${PN}-nstat = "${base_sbindir}/nstat"
 FILES_${PN}-ss = "${base_sbindir}/ss"
 FILES_${PN}-tipc = "${base_sbindir}/tipc"
+FILES_${PN}-devlink = "${base_sbindir}/devlink"
 
 ALTERNATIVE_${PN} = "ip"
 ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
-- 
2.17.1



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

* Re: [meta-oe][PATCH v2] iproute2: add devlink support to iproute2
  2020-02-18 22:44 [meta-oe][PATCH v2] iproute2: add devlink support to iproute2 Scott Branden
@ 2020-02-18 23:18 ` Peter Kjellerstedt
  2020-02-18 23:36   ` Andre McCurdy
  2020-02-19  0:26   ` Scott Branden
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Kjellerstedt @ 2020-02-18 23:18 UTC (permalink / raw)
  To: Scott Branden; +Cc: OE Core (openembedded-core@lists.openembedded.org)

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org <openembedded-core-
> bounces@lists.openembedded.org> On Behalf Of Scott Branden via
> Openembedded-core
> Sent: den 18 februari 2020 23:45
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [meta-oe][PATCH v2] iproute2: add devlink support to
> iproute2
> 
> Add devlink support to iproute2 recipe.
> 
> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
> ---
>  meta/recipes-connectivity/iproute2/iproute2.inc | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc
> b/meta/recipes-connectivity/iproute2/iproute2.inc
> index fc31b8444e..98793af88e 100644
> --- a/meta/recipes-connectivity/iproute2/iproute2.inc
> +++ b/meta/recipes-connectivity/iproute2/iproute2.inc
> @@ -15,11 +15,13 @@ inherit update-alternatives bash-completion pkgconfig
> 
>  CLEANBROKEN = "1"
> 
> -PACKAGECONFIG ??= "tipc elf"
> +PACKAGECONFIG ??= "tipc elf devlink"
>  PACKAGECONFIG[tipc] = ",,libmnl,"
>  PACKAGECONFIG[elf] = ",,elfutils,"
> +PACKAGECONFIG[devlink] = ",,libmnl,"
> 
>  EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
> +                ${@bb.utils.contains('PACKAGECONFIG', 'devlink', 'devlink', '', d)}                                               \
>                  ${@bb.utils.contains('PACKAGECONFIG', 'tipc', 'tipc', '', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"

You can simplify the above to:

EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
                ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"

but I also recommend to reformat it to make it more readable:

EXTRA_OEMAKE = "\
    CC='${CC}' \
    KERNEL_INCLUDE=${STAGING_INCDIR} \
    DOCDIR=${docdir}/iproute2 \
    SUBDIRS='lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc', d)}' \
    SBINDIR='${base_sbindir}' \
    LIBDIR='${libdir}' \
"

> 
>  do_configure_append () {
> @@ -46,7 +48,8 @@ PACKAGES =+ "${PN}-tc \
>               ${PN}-rtacct \
>               ${PN}-nstat \
>               ${PN}-ss \
> -             ${@bb.utils.contains('PACKAGECONFIG', 'tipc', '${PN}-tipc', '', d)}"
> +             ${@bb.utils.contains('PACKAGECONFIG', 'tipc', '${PN}-tipc', '', d)} \
> +             ${@bb.utils.contains('PACKAGECONFIG', 'devlink', '${PN}-devlink', '', d)}"

Assuming that the tipc and devlink binaries are only created when tipc 
and devlink are included in SUBDIRS above, which seems reasonable, you 
can simplify the above and remove the PACKAGECONFIG checks since the 
packages will only be created if there actually are files to put in 
them, e.g.:

PACKAGES =+ "\
    ${PN}-tc \
    ${PN}-lnstat \
    ${PN}-ifstat \
    ${PN}-genl \
    ${PN}-rtacct \
    ${PN}-nstat \
    ${PN}-ss \
    ${PN}-tipc \
    ${PN}-devlink \
"

>  FILES_${PN}-tc = "${base_sbindir}/tc* \
>                    ${libdir}/tc/*.so"
>  FILES_${PN}-lnstat = "${base_sbindir}/lnstat \
> @@ -58,6 +61,7 @@ FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
>  FILES_${PN}-nstat = "${base_sbindir}/nstat"
>  FILES_${PN}-ss = "${base_sbindir}/ss"
>  FILES_${PN}-tipc = "${base_sbindir}/tipc"
> +FILES_${PN}-devlink = "${base_sbindir}/devlink"
> 
>  ALTERNATIVE_${PN} = "ip"
>  ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
> --
> 2.17.1

//Peter


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

* Re: [meta-oe][PATCH v2] iproute2: add devlink support to iproute2
  2020-02-18 23:18 ` Peter Kjellerstedt
@ 2020-02-18 23:36   ` Andre McCurdy
  2020-02-19  0:26     ` Scott Branden
  2020-02-19  0:26   ` Scott Branden
  1 sibling, 1 reply; 7+ messages in thread
From: Andre McCurdy @ 2020-02-18 23:36 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: OE Core (openembedded-core@lists.openembedded.org)

On Tue, Feb 18, 2020 at 3:19 PM Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
>
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org <openembedded-core-
> > bounces@lists.openembedded.org> On Behalf Of Scott Branden via
> > Openembedded-core
> > Sent: den 18 februari 2020 23:45
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [meta-oe][PATCH v2] iproute2: add devlink support to
> > iproute2
> >
> > Add devlink support to iproute2 recipe.
> >
> > Signed-off-by: Scott Branden <scott.branden@broadcom.com>
> > ---
> >  meta/recipes-connectivity/iproute2/iproute2.inc | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc
> > b/meta/recipes-connectivity/iproute2/iproute2.inc
> > index fc31b8444e..98793af88e 100644
> > --- a/meta/recipes-connectivity/iproute2/iproute2.inc
> > +++ b/meta/recipes-connectivity/iproute2/iproute2.inc
> > @@ -15,11 +15,13 @@ inherit update-alternatives bash-completion pkgconfig
> >
> >  CLEANBROKEN = "1"
> >
> > -PACKAGECONFIG ??= "tipc elf"
> > +PACKAGECONFIG ??= "tipc elf devlink"
> >  PACKAGECONFIG[tipc] = ",,libmnl,"
> >  PACKAGECONFIG[elf] = ",,elfutils,"
> > +PACKAGECONFIG[devlink] = ",,libmnl,"
> >
> >  EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
> > +                ${@bb.utils.contains('PACKAGECONFIG', 'devlink', 'devlink', '', d)}                                               \
> >                  ${@bb.utils.contains('PACKAGECONFIG', 'tipc', 'tipc', '', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
>
> You can simplify the above to:
>
> EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
>                 ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
>
> but I also recommend to reformat it to make it more readable:
>
> EXTRA_OEMAKE = "\
>     CC='${CC}' \
>     KERNEL_INCLUDE=${STAGING_INCDIR} \
>     DOCDIR=${docdir}/iproute2 \
>     SUBDIRS='lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc', d)}' \
>     SBINDIR='${base_sbindir}' \
>     LIBDIR='${libdir}' \
> "

You could take the cleanup one step further by merging the recipe and
the .inc file (and then including CCOPTS='${CFLAGS}' directly in the
definition of EXTRA_OEMAKE).

> >
> >  do_configure_append () {
> > @@ -46,7 +48,8 @@ PACKAGES =+ "${PN}-tc \
> >               ${PN}-rtacct \
> >               ${PN}-nstat \
> >               ${PN}-ss \
> > -             ${@bb.utils.contains('PACKAGECONFIG', 'tipc', '${PN}-tipc', '', d)}"
> > +             ${@bb.utils.contains('PACKAGECONFIG', 'tipc', '${PN}-tipc', '', d)} \
> > +             ${@bb.utils.contains('PACKAGECONFIG', 'devlink', '${PN}-devlink', '', d)}"
>
> Assuming that the tipc and devlink binaries are only created when tipc
> and devlink are included in SUBDIRS above, which seems reasonable, you
> can simplify the above and remove the PACKAGECONFIG checks since the
> packages will only be created if there actually are files to put in
> them, e.g.:
>
> PACKAGES =+ "\
>     ${PN}-tc \
>     ${PN}-lnstat \
>     ${PN}-ifstat \
>     ${PN}-genl \
>     ${PN}-rtacct \
>     ${PN}-nstat \
>     ${PN}-ss \
>     ${PN}-tipc \
>     ${PN}-devlink \
> "
>
> >  FILES_${PN}-tc = "${base_sbindir}/tc* \
> >                    ${libdir}/tc/*.so"
> >  FILES_${PN}-lnstat = "${base_sbindir}/lnstat \
> > @@ -58,6 +61,7 @@ FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
> >  FILES_${PN}-nstat = "${base_sbindir}/nstat"
> >  FILES_${PN}-ss = "${base_sbindir}/ss"
> >  FILES_${PN}-tipc = "${base_sbindir}/tipc"
> > +FILES_${PN}-devlink = "${base_sbindir}/devlink"
> >
> >  ALTERNATIVE_${PN} = "ip"
> >  ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
> > --
> > 2.17.1
>
> //Peter
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [meta-oe][PATCH v2] iproute2: add devlink support to iproute2
  2020-02-18 23:36   ` Andre McCurdy
@ 2020-02-19  0:26     ` Scott Branden
  2020-02-19  1:08       ` Scott Branden
  0 siblings, 1 reply; 7+ messages in thread
From: Scott Branden @ 2020-02-19  0:26 UTC (permalink / raw)
  To: Andre McCurdy, Peter Kjellerstedt
  Cc: OE Core (openembedded-core@lists.openembedded.org)

Hi Andre,

On 2020-02-18 3:36 p.m., Andre McCurdy wrote:
> On Tue, Feb 18, 2020 at 3:19 PM Peter Kjellerstedt
> <peter.kjellerstedt@axis.com> wrote:
>>> -----Original Message-----
>>> From: openembedded-core-bounces@lists.openembedded.org <openembedded-core-
>>> bounces@lists.openembedded.org> On Behalf Of Scott Branden via
>>> Openembedded-core
>>> Sent: den 18 februari 2020 23:45
>>> To: openembedded-core@lists.openembedded.org
>>> Subject: [OE-core] [meta-oe][PATCH v2] iproute2: add devlink support to
>>> iproute2
>>>
>>> Add devlink support to iproute2 recipe.
>>>
>>> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
>>> ---
>>>   meta/recipes-connectivity/iproute2/iproute2.inc | 8 ++++++--
>>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc
>>> b/meta/recipes-connectivity/iproute2/iproute2.inc
>>> index fc31b8444e..98793af88e 100644
>>> --- a/meta/recipes-connectivity/iproute2/iproute2.inc
>>> +++ b/meta/recipes-connectivity/iproute2/iproute2.inc
>>> @@ -15,11 +15,13 @@ inherit update-alternatives bash-completion pkgconfig
>>>
>>>   CLEANBROKEN = "1"
>>>
>>> -PACKAGECONFIG ??= "tipc elf"
>>> +PACKAGECONFIG ??= "tipc elf devlink"
>>>   PACKAGECONFIG[tipc] = ",,libmnl,"
>>>   PACKAGECONFIG[elf] = ",,elfutils,"
>>> +PACKAGECONFIG[devlink] = ",,libmnl,"
>>>
>>>   EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
>>> +                ${@bb.utils.contains('PACKAGECONFIG', 'devlink', 'devlink', '', d)}                                               \
>>>                   ${@bb.utils.contains('PACKAGECONFIG', 'tipc', 'tipc', '', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
>> You can simplify the above to:
>>
>> EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
>>                  ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
>>
>> but I also recommend to reformat it to make it more readable:
>>
>> EXTRA_OEMAKE = "\
>>      CC='${CC}' \
>>      KERNEL_INCLUDE=${STAGING_INCDIR} \
>>      DOCDIR=${docdir}/iproute2 \
>>      SUBDIRS='lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc', d)}' \
>>      SBINDIR='${base_sbindir}' \
>>      LIBDIR='${libdir}' \
>> "
> You could take the cleanup one step further by merging the recipe and
> the .inc file (and then including CCOPTS='${CFLAGS}' directly in the
> definition of EXTRA_OEMAKE).
Sounds like a more involved change that should be taken up in an 
unrelated cleanup exercise?
>
>>>   do_configure_append () {
>>> @@ -46,7 +48,8 @@ PACKAGES =+ "${PN}-tc \
>>>                ${PN}-rtacct \
>>>                ${PN}-nstat \
>>>                ${PN}-ss \
>>> -             ${@bb.utils.contains('PACKAGECONFIG', 'tipc', '${PN}-tipc', '', d)}"
>>> +             ${@bb.utils.contains('PACKAGECONFIG', 'tipc', '${PN}-tipc', '', d)} \
>>> +             ${@bb.utils.contains('PACKAGECONFIG', 'devlink', '${PN}-devlink', '', d)}"
>> Assuming that the tipc and devlink binaries are only created when tipc
>> and devlink are included in SUBDIRS above, which seems reasonable, you
>> can simplify the above and remove the PACKAGECONFIG checks since the
>> packages will only be created if there actually are files to put in
>> them, e.g.:
>>
>> PACKAGES =+ "\
>>      ${PN}-tc \
>>      ${PN}-lnstat \
>>      ${PN}-ifstat \
>>      ${PN}-genl \
>>      ${PN}-rtacct \
>>      ${PN}-nstat \
>>      ${PN}-ss \
>>      ${PN}-tipc \
>>      ${PN}-devlink \
>> "
>>
>>>   FILES_${PN}-tc = "${base_sbindir}/tc* \
>>>                     ${libdir}/tc/*.so"
>>>   FILES_${PN}-lnstat = "${base_sbindir}/lnstat \
>>> @@ -58,6 +61,7 @@ FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
>>>   FILES_${PN}-nstat = "${base_sbindir}/nstat"
>>>   FILES_${PN}-ss = "${base_sbindir}/ss"
>>>   FILES_${PN}-tipc = "${base_sbindir}/tipc"
>>> +FILES_${PN}-devlink = "${base_sbindir}/devlink"
>>>
>>>   ALTERNATIVE_${PN} = "ip"
>>>   ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
>>> --
>>> 2.17.1
>> //Peter
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core



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

* Re: [meta-oe][PATCH v2] iproute2: add devlink support to iproute2
  2020-02-18 23:18 ` Peter Kjellerstedt
  2020-02-18 23:36   ` Andre McCurdy
@ 2020-02-19  0:26   ` Scott Branden
  1 sibling, 0 replies; 7+ messages in thread
From: Scott Branden @ 2020-02-19  0:26 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: OE Core (openembedded-core@lists.openembedded.org)

Hi Peter,

On 2020-02-18 3:18 p.m., Peter Kjellerstedt wrote:
>> -----Original Message-----
>> From: openembedded-core-bounces@lists.openembedded.org <openembedded-core-
>> bounces@lists.openembedded.org> On Behalf Of Scott Branden via
>> Openembedded-core
>> Sent: den 18 februari 2020 23:45
>> To: openembedded-core@lists.openembedded.org
>> Subject: [OE-core] [meta-oe][PATCH v2] iproute2: add devlink support to
>> iproute2
>>
>> Add devlink support to iproute2 recipe.
>>
>> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
>> ---
>>   meta/recipes-connectivity/iproute2/iproute2.inc | 8 ++++++--
>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc
>> b/meta/recipes-connectivity/iproute2/iproute2.inc
>> index fc31b8444e..98793af88e 100644
>> --- a/meta/recipes-connectivity/iproute2/iproute2.inc
>> +++ b/meta/recipes-connectivity/iproute2/iproute2.inc
>> @@ -15,11 +15,13 @@ inherit update-alternatives bash-completion pkgconfig
>>
>>   CLEANBROKEN = "1"
>>
>> -PACKAGECONFIG ??= "tipc elf"
>> +PACKAGECONFIG ??= "tipc elf devlink"
>>   PACKAGECONFIG[tipc] = ",,libmnl,"
>>   PACKAGECONFIG[elf] = ",,elfutils,"
>> +PACKAGECONFIG[devlink] = ",,libmnl,"
>>
>>   EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
>> +                ${@bb.utils.contains('PACKAGECONFIG', 'devlink', 'devlink', '', d)}                                               \
>>                   ${@bb.utils.contains('PACKAGECONFIG', 'tipc', 'tipc', '', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
> You can simplify the above to:
>
> EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
>                  ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
>
> but I also recommend to reformat it to make it more readable:
>
> EXTRA_OEMAKE = "\
>      CC='${CC}' \
>      KERNEL_INCLUDE=${STAGING_INCDIR} \
>      DOCDIR=${docdir}/iproute2 \
>      SUBDIRS='lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc', d)}' \
>      SBINDIR='${base_sbindir}' \
>      LIBDIR='${libdir}' \
> "
>
>>   do_configure_append () {
>> @@ -46,7 +48,8 @@ PACKAGES =+ "${PN}-tc \
>>                ${PN}-rtacct \
>>                ${PN}-nstat \
>>                ${PN}-ss \
>> -             ${@bb.utils.contains('PACKAGECONFIG', 'tipc', '${PN}-tipc', '', d)}"
>> +             ${@bb.utils.contains('PACKAGECONFIG', 'tipc', '${PN}-tipc', '', d)} \
>> +             ${@bb.utils.contains('PACKAGECONFIG', 'devlink', '${PN}-devlink', '', d)}"
> Assuming that the tipc and devlink binaries are only created when tipc
> and devlink are included in SUBDIRS above, which seems reasonable, you
> can simplify the above and remove the PACKAGECONFIG checks since the
> packages will only be created if there actually are files to put in
> them, e.g.:
>
> PACKAGES =+ "\
>      ${PN}-tc \
>      ${PN}-lnstat \
>      ${PN}-ifstat \
>      ${PN}-genl \
>      ${PN}-rtacct \
>      ${PN}-nstat \
>      ${PN}-ss \
>      ${PN}-tipc \
>      ${PN}-devlink \
> "
OK, all of this can be put in with this commit change - thanks.
>>   FILES_${PN}-tc = "${base_sbindir}/tc* \
>>                     ${libdir}/tc/*.so"
>>   FILES_${PN}-lnstat = "${base_sbindir}/lnstat \
>> @@ -58,6 +61,7 @@ FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
>>   FILES_${PN}-nstat = "${base_sbindir}/nstat"
>>   FILES_${PN}-ss = "${base_sbindir}/ss"
>>   FILES_${PN}-tipc = "${base_sbindir}/tipc"
>> +FILES_${PN}-devlink = "${base_sbindir}/devlink"
>>
>>   ALTERNATIVE_${PN} = "ip"
>>   ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
>> --
>> 2.17.1
> //Peter



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

* Re: [meta-oe][PATCH v2] iproute2: add devlink support to iproute2
  2020-02-19  0:26     ` Scott Branden
@ 2020-02-19  1:08       ` Scott Branden
  2020-02-19  2:17         ` Andre McCurdy
  0 siblings, 1 reply; 7+ messages in thread
From: Scott Branden @ 2020-02-19  1:08 UTC (permalink / raw)
  To: Andre McCurdy, Peter Kjellerstedt
  Cc: OE Core (openembedded-core@lists.openembedded.org)



On 2020-02-18 4:26 p.m., Scott Branden wrote:
> Hi Andre,
>
> On 2020-02-18 3:36 p.m., Andre McCurdy wrote:
>> On Tue, Feb 18, 2020 at 3:19 PM Peter Kjellerstedt
>> <peter.kjellerstedt@axis.com> wrote:
>>>> -----Original Message-----
>>>> From: openembedded-core-bounces@lists.openembedded.org 
>>>> <openembedded-core-
>>>> bounces@lists.openembedded.org> On Behalf Of Scott Branden via
>>>> Openembedded-core
>>>> Sent: den 18 februari 2020 23:45
>>>> To: openembedded-core@lists.openembedded.org
>>>> Subject: [OE-core] [meta-oe][PATCH v2] iproute2: add devlink 
>>>> support to
>>>> iproute2
>>>>
>>>> Add devlink support to iproute2 recipe.
>>>>
>>>> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
>>>> ---
>>>>   meta/recipes-connectivity/iproute2/iproute2.inc | 8 ++++++--
>>>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc
>>>> b/meta/recipes-connectivity/iproute2/iproute2.inc
>>>> index fc31b8444e..98793af88e 100644
>>>> --- a/meta/recipes-connectivity/iproute2/iproute2.inc
>>>> +++ b/meta/recipes-connectivity/iproute2/iproute2.inc
>>>> @@ -15,11 +15,13 @@ inherit update-alternatives bash-completion 
>>>> pkgconfig
>>>>
>>>>   CLEANBROKEN = "1"
>>>>
>>>> -PACKAGECONFIG ??= "tipc elf"
>>>> +PACKAGECONFIG ??= "tipc elf devlink"
>>>>   PACKAGECONFIG[tipc] = ",,libmnl,"
>>>>   PACKAGECONFIG[elf] = ",,elfutils,"
>>>> +PACKAGECONFIG[devlink] = ",,libmnl,"
>>>>
>>>>   EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} 
>>>> DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
>>>> +                ${@bb.utils.contains('PACKAGECONFIG', 'devlink', 
>>>> 'devlink', '', d)}                                               \
>>>>                   ${@bb.utils.contains('PACKAGECONFIG', 'tipc', 
>>>> 'tipc', '', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
>>> You can simplify the above to:
>>>
>>> EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} 
>>> DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
>>>                  ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc', 
>>> d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
>>>
>>> but I also recommend to reformat it to make it more readable:
>>>
>>> EXTRA_OEMAKE = "\
>>>      CC='${CC}' \
>>>      KERNEL_INCLUDE=${STAGING_INCDIR} \
>>>      DOCDIR=${docdir}/iproute2 \
>>>      SUBDIRS='lib tc ip bridge misc genl 
>>> ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc', d)}' \
>>>      SBINDIR='${base_sbindir}' \
>>>      LIBDIR='${libdir}' \
>>> "
>> You could take the cleanup one step further by merging the recipe and
>> the .inc file (and then including CCOPTS='${CFLAGS}' directly in the
>> definition of EXTRA_OEMAKE).
> Sounds like a more involved change that should be taken up in an 
> unrelated cleanup exercise?
Actually, I see the reason to keep the inc file is so that you can 
support different versions of iproute2 if needed.
Each recipe version would just require the inc file.



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

* Re: [meta-oe][PATCH v2] iproute2: add devlink support to iproute2
  2020-02-19  1:08       ` Scott Branden
@ 2020-02-19  2:17         ` Andre McCurdy
  0 siblings, 0 replies; 7+ messages in thread
From: Andre McCurdy @ 2020-02-19  2:17 UTC (permalink / raw)
  To: Scott Branden
  Cc: Peter Kjellerstedt,
	OE Core (openembedded-core@lists.openembedded.org)

On Tue, Feb 18, 2020 at 5:08 PM Scott Branden
<scott.branden@broadcom.com> wrote:
>
> On 2020-02-18 4:26 p.m., Scott Branden wrote:
> > Hi Andre,
> >
> > On 2020-02-18 3:36 p.m., Andre McCurdy wrote:
> >> On Tue, Feb 18, 2020 at 3:19 PM Peter Kjellerstedt
> >> <peter.kjellerstedt@axis.com> wrote:
> >>>> -----Original Message-----
> >>>> From: openembedded-core-bounces@lists.openembedded.org
> >>>> <openembedded-core-
> >>>> bounces@lists.openembedded.org> On Behalf Of Scott Branden via
> >>>> Openembedded-core
> >>>> Sent: den 18 februari 2020 23:45
> >>>> To: openembedded-core@lists.openembedded.org
> >>>> Subject: [OE-core] [meta-oe][PATCH v2] iproute2: add devlink
> >>>> support to
> >>>> iproute2
> >>>>
> >>>> Add devlink support to iproute2 recipe.
> >>>>
> >>>> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
> >>>> ---
> >>>>   meta/recipes-connectivity/iproute2/iproute2.inc | 8 ++++++--
> >>>>   1 file changed, 6 insertions(+), 2 deletions(-)
> >>>>
> >>>> diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc
> >>>> b/meta/recipes-connectivity/iproute2/iproute2.inc
> >>>> index fc31b8444e..98793af88e 100644
> >>>> --- a/meta/recipes-connectivity/iproute2/iproute2.inc
> >>>> +++ b/meta/recipes-connectivity/iproute2/iproute2.inc
> >>>> @@ -15,11 +15,13 @@ inherit update-alternatives bash-completion
> >>>> pkgconfig
> >>>>
> >>>>   CLEANBROKEN = "1"
> >>>>
> >>>> -PACKAGECONFIG ??= "tipc elf"
> >>>> +PACKAGECONFIG ??= "tipc elf devlink"
> >>>>   PACKAGECONFIG[tipc] = ",,libmnl,"
> >>>>   PACKAGECONFIG[elf] = ",,elfutils,"
> >>>> +PACKAGECONFIG[devlink] = ",,libmnl,"
> >>>>
> >>>>   EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR}
> >>>> DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
> >>>> +                ${@bb.utils.contains('PACKAGECONFIG', 'devlink',
> >>>> 'devlink', '', d)}                                               \
> >>>>                   ${@bb.utils.contains('PACKAGECONFIG', 'tipc',
> >>>> 'tipc', '', d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
> >>> You can simplify the above to:
> >>>
> >>> EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR}
> >>> DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl \
> >>>                  ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc',
> >>> d)}' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
> >>>
> >>> but I also recommend to reformat it to make it more readable:
> >>>
> >>> EXTRA_OEMAKE = "\
> >>>      CC='${CC}' \
> >>>      KERNEL_INCLUDE=${STAGING_INCDIR} \
> >>>      DOCDIR=${docdir}/iproute2 \
> >>>      SUBDIRS='lib tc ip bridge misc genl
> >>> ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc', d)}' \
> >>>      SBINDIR='${base_sbindir}' \
> >>>      LIBDIR='${libdir}' \
> >>> "
> >> You could take the cleanup one step further by merging the recipe and
> >> the .inc file (and then including CCOPTS='${CFLAGS}' directly in the
> >> definition of EXTRA_OEMAKE).
> > Sounds like a more involved change that should be taken up in an
> > unrelated cleanup exercise?
> Actually, I see the reason to keep the inc file is so that you can
> support different versions of iproute2 if needed.
> Each recipe version would just require the inc file.

Yes, that's been the historical argument. However we don't typically
support multiple versions of a recipe at the same time in oe-core any
more and the maintenance effort and potential for bugs (e.g. in this
case, casual readers may not realise that the definition of
EXTRA_OEMAKE is split between the two files) means we've been
gradually cleaning up and merging .inc files into recipes.


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

end of thread, other threads:[~2020-02-19  2:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-18 22:44 [meta-oe][PATCH v2] iproute2: add devlink support to iproute2 Scott Branden
2020-02-18 23:18 ` Peter Kjellerstedt
2020-02-18 23:36   ` Andre McCurdy
2020-02-19  0:26     ` Scott Branden
2020-02-19  1:08       ` Scott Branden
2020-02-19  2:17         ` Andre McCurdy
2020-02-19  0:26   ` Scott Branden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox