Skip to contentSkip to conversation

cpan-base: Don't use immediate expansion

PATCH In review Tyler Hall 2 participants 3 messages Aug 5, 2013 – Aug 6, 2013

lore
Share & tools
lore

Tyler Hall

author
#0 lore raw

PATCH 1/1 cpan-base: Don't use immediate expansion

PERLVERSION is derived from installed output in the sysroot, so it should not be evaluated at parse time.

In an new workspace, the sequence

$ bitbake -S libxml-sax-perl
$ bitbake perl
$ bitbake -S libxml-sax-perl

generates different task hashes for libxml-sax-perl, and the error

ERROR: Bitbake's cached basehash does not match the one we just
generated (/bonus/scratch/tylerh/oe-core/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb.do_package)!

---
 meta/classes/cpan-base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/cpan-base.bbclass +1 -1
index 7e1e8d0..d05863e 100644
@@ -40,7 +40,7 @@ def is_target(d):
     return "no"
 
 PERLLIBDIRS := "${@perl_get_libdirs(d)}"
-PERLVERSION := "${@get_perl_version(d)}"
+PERLVERSION = "${@get_perl_version(d)}"
 
 FILES_${PN}-dbg += "${PERLLIBDIRS}/auto/*/.debug \
                     ${PERLLIBDIRS}/auto/*/*/.debug \
Signature · 1 line
1.8.3.4
#1 lore raw
Quoted 5 lines · Tyler Hall

PERLVERSION is derived from installed output in the sysroot, so it should not be evaluated at parse time.

In an new workspace, the sequence

Quoted 9 lines
$ bitbake -S libxml-sax-perl
$ bitbake perl
$ bitbake -S libxml-sax-perl

generates different task hashes for libxml-sax-perl, and the error

ERROR: Bitbake's cached basehash does not match the one we just
generated (/bonus/scratch/tylerh/oe-core/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb.do_package)!

I could not replicate this, can you provide more details about how you setup the failure, was it from a clean sstate?

Are you working with master or 1.4 or something else?

Thanks
Sau!

Quoted 19 lines
---
  meta/classes/cpan-base.bbclass | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/cpan-base.bbclass +1 -1
index 7e1e8d0..d05863e 100644
@@ -40,7 +40,7 @@ def is_target(d):
      return "no"
 
  PERLLIBDIRS := "${@perl_get_libdirs(d)}"
-PERLVERSION := "${@get_perl_version(d)}"
+PERLVERSION = "${@get_perl_version(d)}"
 
  FILES_${PN}-dbg += "${PERLLIBDIRS}/auto/*/.debug \
                      ${PERLLIBDIRS}/auto/*/*/.debug \
author
#2 lore raw
Quoted 3 lines · Saul Wold

I could not replicate this, can you provide more details about how you setup the failure, was it from a clean sstate?

It was with clean sstate, but I can switch between libxml-sax-perl task
hashes with a regular clean or setscene of perl. In my existing workspace, I ran

$ bitbake -c clean perl
$ STAMPS_DIR=perl-stamps bitbake -S libxml-sax-perl
$ bitbake perl # From sstate
$ STAMPS_DIR=perl-stamps bitbake -S libxml-sax-perl

and got the error for several do_package tasks
ERROR: Bitbake's cached basehash does not match the one we just generated (/.../oe-core/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb.do_package)!

I think you have to trigger a re-parse (which -S seems to do) since the perl files being in the sysroot wouldn't invalidate the cache.

Are you working with master or 1.4 or something else?

Quoted 1 line

I first noticed it on 1.4 and reproduced it on master, which was 09deeef20ee5a0c12ad4fd89cace6e0fb832d5b1 at the time.

Thanks,
Tyler