Skip to contentSkip to conversation

PERLVERSION sometimes changing sstate signature

DISCUSSION Richard Purdie 1 participant 1 message Nov 29, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20131127011949.GN2870@jama

#1 lore raw
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 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
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