PERLVERSION sometimes changing sstate signature
A message that is not in the archive (sent off-list or not yet received): 20131127011949.GN2870@jama
Quoted 33 lines · Martin Jansa
Sometimes it's shown in
bitbake -S perf (or any other perl using recipes)NOTE: Reparsing files to collect dependency data
ERROR: Bitbake's cached basehash does not match the one we just generated
(/OE/oe-core/meta/recipes-kernel/perf/perf.bb.do_package)!
ERROR: The mismatched hashes were074153b639c930f9f3e06170745e2587ande5b25a12742221b725812945ccd5abfb
NOTE: Tasks Summary: Attempted 0 tasks of which 0 didn't need to be rerun and all succeeded.bitbake-diffsigs between such .sigdata files (not exactly the above) shows:
basehash changed from992e4ad775701625d03e5ba8b20a016fto9b5d76a5e33f2d53c20d89923bc553f7Variable PERLVERSION value changed from 'None' to '5.14.3'PERLVERSION is from cpan meta/classes/cpan-base.bbclass:PERLVERSION := "${@get_perl_version(d)}"
# Determine the staged version of perl from the perl configuration file def
get_perl_version(d):import re cfg = d.expand('${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/config.sh') try: f = open(cfg, 'r') except IOError: return None l = f.readlines(); f.close(); r = re.compile("^version='(\d*\.\d*\.\d*)'") for s in l: m = r.match(s) if m: return m.group(1) return None
Quoted 5 lines
So it looks understandable that bitbake -S executed without populated sysroot (only pseudo-native) sees PERLVERSION None, while parsing PERLVERSION with sysroot populated returns right version.
What's the proper fix for this?
Probably to give it a specific value for signature purposes e.g.:
get_perl_version[vardepvalue] = "${STAGING_LIBDIR}${PERL_OWN_DIR}"
Cheers,
Richard