summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@intel.com>2016-07-29 11:23:35 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-29 09:53:32 +0100
commitc42b5333f0261daa749306471c294c13dc33968a (patch)
treeaeecc1d30dd7bdeeebf0d7b831ef29dbde95ad34 /bitbake
parent039f47ad197a9a53109c9f3deadd9c35e62c056d (diff)
downloadpoky-c42b5333f0261daa749306471c294c13dc33968a.tar.gz
bitbake: fetch2: fix pickle issues while switching from master to krogoth
While switching from master to krogoth build with a common download directory, got a large number of warnings like the one listed below: WARNING: freetype-2.6.3-r0 do_fetch: Couldn't load checksums from donestamp /home/maxin/downloads/freetype-2.6.3.tar.bz2.done: ValueError (msg: unsupported pickle protocol: 4) These warnings are caused by the difference in pickle module implementation in python3(master) and python2(krogoth). Python2 supports 3 different protocols (0, 1, 2) and pickle.HIGHEST_PROTOCOL is 2 where as Python3 supports 5 different protocols (0, 1, 2, 3, 4) and pickle.HIGHEST_PROTOCOL is obviously 4. My suggestion is to use 2 since it is backward compatible with python2 (all the supported distros for krogoth provides python2 which supports pickle protocol version 2) (Bitbake rev: cc67800f279fb211ee3bb4ea7009fdbb82973b02) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 3eabba16b3..9054b2ec18 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -664,7 +664,7 @@ def verify_donestamp(ud, d, origud=None):
664 # as an upgrade path from the previous done stamp file format. 664 # as an upgrade path from the previous done stamp file format.
665 if checksums != precomputed_checksums: 665 if checksums != precomputed_checksums:
666 with open(ud.donestamp, "wb") as cachefile: 666 with open(ud.donestamp, "wb") as cachefile:
667 p = pickle.Pickler(cachefile, pickle.HIGHEST_PROTOCOL) 667 p = pickle.Pickler(cachefile, 2)
668 p.dump(checksums) 668 p.dump(checksums)
669 return True 669 return True
670 except ChecksumError as e: 670 except ChecksumError as e:
@@ -698,7 +698,7 @@ def update_stamp(ud, d):
698 checksums = verify_checksum(ud, d) 698 checksums = verify_checksum(ud, d)
699 # Store the checksums for later re-verification against the recipe 699 # Store the checksums for later re-verification against the recipe
700 with open(ud.donestamp, "wb") as cachefile: 700 with open(ud.donestamp, "wb") as cachefile:
701 p = pickle.Pickler(cachefile, pickle.HIGHEST_PROTOCOL) 701 p = pickle.Pickler(cachefile, 2)
702 p.dump(checksums) 702 p.dump(checksums)
703 except ChecksumError as e: 703 except ChecksumError as e:
704 # Checksums failed to verify, trigger re-download and remove the 704 # Checksums failed to verify, trigger re-download and remove the