Skip to contentSkip to conversation

classes/cpan-base: fix for PERLVERSION

PATCH In review [email protected] 2 participants 3 messages Nov 9, 2016 – Dec 9, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 classes/cpan-base: fix for PERLVERSION

From: Jackie Huang <[email protected]>

Immediate expansion of get_perl_version() is too early for PERLVERSION, it will result in 'None' before perl is built and packages that rely on this veriable fail to work with the incorrect version.

---
 meta/classes/cpan-base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/cpan-base.bbclass +1 -1
index 55ac052..48d53cc 100644
@@ -36,5 +36,5 @@ def is_target(d):
 
 PERLLIBDIRS = "${libdir}/perl"
 PERLLIBDIRS_class-native = "${libdir}/perl-native"
-PERLVERSION := "${@get_perl_version(d)}"
+PERLVERSION = "${@get_perl_version(d)}"
 PERLVERSION[vardepvalue] = ""
Signature · 1 line
2.8.3
#1 lore raw

meta/classes/cpan-base.bbclass def is_target(d): · line 39

Quoted 3 lines · On 9 November 2016 at 05:51, <[email protected]> wrote:
meta/classes/cpan-base.bbclass +1 -1
-PERLVERSION := "${@get_perl_version(d)}"
+PERLVERSION = "${@get_perl_version(d)}"

This uses := as the get_perl_version is a non-trivial amount of python which doesn't need to be re-evaluated all the time. Have you looked at how bad the performance hit is, and whether there is an alternative?

Ross

#2 lore raw

Yes, I can fix it in the recipe that uses PERLVERSION as an alternative.

Thanks,
Jackie

From: Burton, Ross [mailto:[email protected]]
Sent: Monday, December 05, 2016 11:34 PM
To: Huang, Jie (Jackie)
Cc: OE-core
Subject: Re: [OE-core] [PATCH] classes/cpan-base: fix for PERLVERSION

On 9 November 2016 at 05:51, <[email protected]<mailto:[email protected]>> wrote:
-PERLVERSION := "${@get_perl_version(d)}"
+PERLVERSION = "${@get_perl_version(d)}"

This uses := as the get_perl_version is a non-trivial amount of python which doesn't need to be re-evaluated all the time. Have you looked at how bad the performance hit is, and whether there is an alternative?

Ross