[bitbake-devel] [PATCH] fetch2: do not try to checksum a socket

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Mon Jun 18 11:28:27 UTC 2012


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'

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at 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:
-- 
1.7.10





More information about the bitbake-devel mailing list