> -----Original Message-----
> From: Peter Kjellerstedt <peter.kjellerst...@axis.com>
> Sent: Thursday, November 21, 2019 4:24 AM
> To: Tom Hochstein <tom.hochst...@nxp.com>; 
> openembedded-core@lists.openembedded.org
> Subject: RE: [OE-core] [PATCH 1/2] devtool/standard.py: Allow recipe to 
> disable menuconfig logic
> 
> > -----Original Message-----
> > From: openembedded-core-boun...@lists.openembedded.org <openembedded-core-
> > boun...@lists.openembedded.org> On Behalf Of Tom Hochstein
> > Sent: den 20 november 2019 20:26
> > To: openembedded-core@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
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to