Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH] fetch2: do not try to checksum a socket
Date: Thu, 21 Jun 2012 13:16:08 +0100	[thread overview]
Message-ID: <1340280968.1640.96.camel@ted> (raw)
In-Reply-To: <1340018907-8814-1-git-send-email-rep.dot.nop@gmail.com>

On Mon, 2012-06-18 at 13:28 +0200, Bernhard Reutner-Fischer wrote:
> computing the md5 of a socket does not work too well.
> 
> Traceback (most recent call last):
>   File "/scratch/src/oe/bitbake/build/lib/bb/siggen.py", line 172, in SignatureGeneratorOEBasic.get_taskhash(fn='/scratch/src/oe/openembedded-core/meta/recipes-core/uclibc/uclibc_git.bb', task='do_fetch', deps=[], dataCache=<bb.cache.CacheData object at 0xd95890>):
>              if task in dataCache.file_checksums[fn]:
>     >            checksums = bb.fetch2.get_file_checksums(dataCache.file_checksums[fn][task], recipename)
>                  for (f,cs) in checksums:
>   File "/scratch/src/oe/bitbake/build/lib/bb/fetch2/__init__.py", line 627, in get_file_checksums(filelist='/scratch/src/uClibc/ /scratch/src/oe/openembedded-core/meta/recipes-core/uclibc/uclibc-git/uClibc.machine /scratch/src/oe/openembedded-core/meta/recipes-core/uclibc/uclibc-git/uClibc.distro', pn='uclibc'):
>                          fullpth = os.path.join(root, name)
>     >                    checksum = checksum_file(fullpth)
>                          if checksum:
>   File "/scratch/src/oe/bitbake/build/lib/bb/fetch2/__init__.py", line 605, in checksum_file(f='/scratch/src/uClibc/test/inet/socktest'):
>              try:
>     >            checksum = _checksum_cache.get_checksum(f)
>              except OSError as e:
>   File "/scratch/src/oe/bitbake/build/lib/bb/checksum.py", line 78, in FileChecksumCache.get_checksum(f='/scratch/src/uClibc/test/inet/socktest'):
> 
>     >        hashval = bb.utils.md5_file(f)
>              self.cachedata_extras[0][f] = (cmtime, hashval)
>   File "/scratch/src/oe/bitbake/build/lib/bb/utils.py", line 362, in md5_file(filename='/scratch/src/uClibc/test/inet/socktest'):
> 
>     >    for line in open(filename):
>              m.update(line)
> IOError: [Errno 6] No such device or address: '/scratch/src/uClibc/test/inet/socktest'

Can you give some details on how to reproduce this? I'm guessing this is
due to some kind of proxy configuration?

What is worrying me a bit is that we shouldn't be calling the checksum
code for git repositories at all. Whilst this fix no doubt avoids the
problem, I'm worried there might be something deeper going on...

Cheers,

Richard

> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
> ---
>  lib/bb/fetch2/__init__.py |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
> index 324eef2..0c0d60d 100644
> --- a/lib/bb/fetch2/__init__.py
> +++ b/lib/bb/fetch2/__init__.py
> @@ -601,6 +601,7 @@ def get_file_checksums(filelist, pn):
>      """
>  
>      def checksum_file(f):
> +        if not os.path.isfile(f): return None
>          try:
>              checksum = _checksum_cache.get_checksum(f)
>          except OSError as e:





  reply	other threads:[~2012-06-21 12:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-18 11:28 [PATCH] fetch2: do not try to checksum a socket Bernhard Reutner-Fischer
2012-06-21 12:16 ` Richard Purdie [this message]
2012-06-21 13:08   ` Bernhard Reutner-Fischer
2012-06-21 13:25     ` Richard Purdie
2012-06-21 13:46       ` Paul Eggleton
2012-06-21 13:57       ` Bernhard Reutner-Fischer
2012-06-22  8:09         ` Richard Purdie

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=1340280968.1640.96.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=rep.dot.nop@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox