[OE-core] [PATCH 1/2] devtool/standard.py: Allow recipe to disable menuconfig logic

Tom Hochstein tom.hochstein at nxp.com
Thu Nov 21 12:40:23 UTC 2019



> -----Original Message-----
> From: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
> Sent: Thursday, November 21, 2019 4:24 AM
> To: Tom Hochstein <tom.hochstein at nxp.com>; openembedded-core at lists.openembedded.org
> Subject: RE: [OE-core] [PATCH 1/2] devtool/standard.py: Allow recipe to disable menuconfig logic
> 
> > -----Original Message-----
> > From: openembedded-core-bounces at lists.openembedded.org <openembedded-core-
> > bounces at lists.openembedded.org> On Behalf Of Tom Hochstein
> > Sent: den 20 november 2019 20:26
> > To: openembedded-core at lists.openembedded.org
> > Subject: [OE-core] [PATCH 1/2] devtool/standard.py: Allow recipe to
> > disable menuconfig logic
> >
> > @@ -940,8 +940,10 @@ def modify(args, config, basepath, workspace):
> >                          '}\n')
> >              if rd.getVarFlag('do_menuconfig','task'):
> >                  f.write('\ndo_configure_append() {\n'
> > -                '    cp ${B}/.config ${S}/.config.baseline\n'
> > -                '    ln -sfT ${B}/.config ${S}/.config.new\n'
> > +                '    if [ ! ${DEVTOOL_DISABLE_MENUCONFIG} ]; then\n'
> > +                '        cp ${B}/.config ${S}/.config.baseline\n'
> > +                '        ln -sfT ${B}/.config ${S}/.config.new\n'
> > +                '    fi\n'
> 
> Why do you need the extra variable? Why not just check if the .config
> file exists before copying it:
> 
>                 '    if -e ${B}/.config; then\n'
>                 '        cp ${B}/.config ${S}/.config.baseline\n'
>                 '        ln -sfT ${B}/.config ${S}/.config.new\n'
>                 '    fi\n'
> 
> >                  '}\n')
> >              if initial_rev:
> >                  f.write('\n# initial_rev: %s\n' % initial_rev)
> > --
> > 2.17.1
> 
> //Peter

I wanted to preserve the existing error handling in the case that menuconfig is supported and .config is unexpectedly missing. Having the cp fail immediately seems best.

Tom


More information about the Openembedded-core mailing list