[OE-core] PERLVERSION sometimes changing sstate signature

Richard Purdie martin.jansa at gmail.com
Wed Nov 27 08:58:33 UTC 2013


On Wed, 2013-11-27 at 02:19 +0100, Martin Jansa wrote:
> 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 were 074153b639c930f9f3e06170745e2587 and e5b25a12742221b725812945ccd5abfb
> 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 from 992e4ad775701625d03e5ba8b20a016f to 9b5d76a5e33f2d53c20d89923bc553f7
> Variable 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
> 
> 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






More information about the Openembedded-core mailing list