[bitbake-devel] [OE-core] [PATCH] bitbake: fetch: Extend subdir unpack parameter to local folder

Richard Purdie richard.purdie at linuxfoundation.org
Mon Oct 5 08:07:27 UTC 2015


On Sat, 2015-10-03 at 11:35 -0700, Christopher Larson wrote:
> 
> On Mon, Sep 28, 2015 at 6:11 AM, Ming Liu <liu.ming50 at gmail.com>
> wrote:
>         +                    if urldata.parm.get('subdir') != None:
>         +                        destdir = urldata.parm.get('subdir')
>         + "/" + destdir
> 
> If you really care about the difference between None and the empty
> string, then this should be 'is not None', not '!= None', but most
> likely you don't, in which case 'if urldata.parm.get('subdir')' is
> sufficient, and cleaner. Also you do the parm.get() twice, it may be
> better to store that in a variable.

Chris is correct, this patch needs tweaking. This area of the code also
keeps seeing various issues so I'd like to ask that we add a test case
for this in lib/bb/tests/ so we can ensure this doesn't regress in the
future please.

Cheers,

Richard





More information about the bitbake-devel mailing list