On Tue, Feb 18, 2020 at 5:08 PM Scott Branden <[email protected]> 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 > >> <[email protected]> wrote: > >>>> -----Original Message----- > >>>> From: [email protected] > >>>> <openembedded-core- > >>>> [email protected]> On Behalf Of Scott Branden via > >>>> Openembedded-core > >>>> Sent: den 18 februari 2020 23:45 > >>>> To: [email protected] > >>>> Subject: [OE-core] [meta-oe][PATCH v2] iproute2: add devlink > >>>> support to > >>>> iproute2 > >>>> > >>>> Add devlink support to iproute2 recipe. > >>>> > >>>> Signed-off-by: Scott Branden <[email protected]> > >>>> --- > >>>> 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. -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
