Patchwork bb/fetch2/__init__.py: Don't try to compute checksums for directories

login
register
mail settings
Submitter Andrei Gherzan
Date May 20, 2012, 5:16 p.m.
Message ID <1337534195-5184-1-git-send-email-andrei@gherzan.ro>
Download mbox | patch
Permalink /patch/28013/
State New
Headers show

Comments

Andrei Gherzan - May 20, 2012, 5:16 p.m.
In this way we avoid failing the build while trying to fetch local
directories.

[YOCTO #2475]

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
 bitbake/lib/bb/fetch2/__init__.py |    5 +++++
 1 file changed, 5 insertions(+)
Richard Purdie - May 21, 2012, 8:25 a.m.
On Sun, 2012-05-20 at 20:16 +0300, Andrei Gherzan wrote:
> In this way we avoid failing the build while trying to fetch local
> directories.
> 
> [YOCTO #2475]
> 
> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
> ---
>  bitbake/lib/bb/fetch2/__init__.py |    5 +++++
>  1 file changed, 5 insertions(+)

Please send bitbake patches to the bitbake-devel list in future. I've
applied this one directly since there is a clear need to fix problems
though, thanks!

Cheers,

Richard
Andrei Gherzan - May 21, 2012, 8:28 a.m.
On Mon, May 21, 2012 at 11:25 AM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Sun, 2012-05-20 at 20:16 +0300, Andrei Gherzan wrote:
> > In this way we avoid failing the build while trying to fetch local
> > directories.
> >
> > [YOCTO #2475]
> >
> > Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
> > ---
> >  bitbake/lib/bb/fetch2/__init__.py |    5 +++++
> >  1 file changed, 5 insertions(+)
>
> Please send bitbake patches to the bitbake-devel list in future. I've
> applied this one directly since there is a clear need to fix problems
> though, thanks!
>
>
I will. Thanks.

@g

Patch

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 9864595..e3ac4d2 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -671,6 +671,11 @@  class FetchMethod(object):
         """
         Is localpath something that can be represented by a checksum?
         """
+
+        # We cannot compute checksums for directories
+        if os.path.isdir(urldata.localpath) == True:
+            return False
+
         return True
 
     def recommends_checksum(self, urldata):