[Bitbake-dev] [PATCH] Fix comparison with SRCREVINACTION string constant.
javier Martin
javier.martin at vista-silicon.com
Wed Feb 9 08:48:20 CET 2011
On 27 January 2011 09:38, Javier Martin <javier.martin at vista-silicon.com>wrote:
> Use '==' instead of 'is', otherwise it will always return
> true since 'rev' and "SRCREVINACTION" are not the same object.
>
> Signed-off-by: Javier Martin <javier.martin at vista-silicon.com>
> ---
> lib/bb/fetch/__init__.py | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lib/bb/fetch/__init__.py b/lib/bb/fetch/__init__.py
> index d87ff0a..62ba4ea 100644
> --- a/lib/bb/fetch/__init__.py
> +++ b/lib/bb/fetch/__init__.py
> @@ -699,7 +699,7 @@ class Fetch(object):
> raise InvalidSRCREV("Please set SRCREV to a valid value")
> if not rev:
> return False
> - if rev is "SRCREVINACTION":
> + if rev == "SRCREVINACTION":
> return True
> return rev
>
> --
> 1.7.0.4
>
>
Hello,
this patch fixes a real bug which can be reproduced trying to use
SRCREVINACTION in a recipe for always fetching last commit of a git
repository.
However, the comparison is broken since it use "is" instead of "==".
Would you please be as kind to include this patch in bitbake?
Thank you.
--
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxtogo.org/pipermail/bitbake-devel/attachments/20110209/ccedc554/attachment.htm>
More information about the bitbake-devel
mailing list