All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Christopher Larson <clarson@kergoth.com>
Cc: "bitbake-devel@lists.openembedded.org"
	<bitbake-devel@lists.openembedded.org>,
	Peter Liu <peter.x.liu@external.atlascopco.com>,
	Ming Liu <liu.ming50@gmail.com>
Subject: Re: [OE-core] [PATCH] bitbake: fetch: Extend subdir unpack parameter to local folder
Date: Mon, 05 Oct 2015 09:07:27 +0100	[thread overview]
Message-ID: <1444032447.5118.2.camel@linuxfoundation.org> (raw)
In-Reply-To: <CABcZANkWo=s5VDpO0nAs42q8Cv+sfhNeu7qsv+XBckEQFQZy7Q@mail.gmail.com>

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@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




  reply	other threads:[~2015-10-05 10:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28 13:11 [OE-core] [PATCH] bitbake: fetch: Extend subdir unpack parameter to local folder Ming Liu
2015-10-03 18:35 ` Christopher Larson
2015-10-05  8:07   ` Richard Purdie [this message]
2015-11-13 18:24     ` Ming Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444032447.5118.2.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=clarson@kergoth.com \
    --cc=liu.ming50@gmail.com \
    --cc=peter.x.liu@external.atlascopco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.