[oe-commits] Roman I Khimov : cpan-base: add perl version to PR

git version control git at git.openembedded.org
Thu Mar 25 07:08:19 UTC 2010


Module: openembedded.git
Branch: shr/unstable
Commit: e7c6b93906b8909e659d7e680a1457472bc99bda
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=e7c6b93906b8909e659d7e680a1457472bc99bda

Author: Roman I Khimov <khimov at altell.ru>
Date:   Wed Mar 24 00:33:57 2010 +0300

cpan-base: add perl version to PR

Makes perl modules rebuild on perl version change, since binary compatibility
could be broken with that (although perl itself tries to maintain it  within
patchlevel range, like 5.8.7 -> 5.8.8).

This is conditional on PACKAGE_ARCH, since there is nothing to rebuild for
pure perl modules (and those should use 'PACKAGE_ARCH = "all"') even if they
break with perl version change.

This also should ease transition to perl 5.10.1.

Signed-off-by: Roman I Khimov <khimov at altell.ru>

---

 classes/cpan-base.bbclass |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/classes/cpan-base.bbclass b/classes/cpan-base.bbclass
index 8eb173e..1c77c9b 100644
--- a/classes/cpan-base.bbclass
+++ b/classes/cpan-base.bbclass
@@ -35,6 +35,14 @@ def is_target(d):
         return "yes"
     return "no"
 
+def perl_get_version_suffix(d):
+	if bb.data.expand('${PACKAGE_ARCH}', d) != "all":
+		return '-' + get_perl_version(d)
+	else:
+		return ''
+
+PR .= "${@perl_get_version_suffix(d)}"
+
 PERLLIBDIRS = "${@perl_get_libdirs(d)}"
 
 FILES_${PN}-dbg += "${PERLLIBDIRS}/auto/*/.debug \





More information about the Openembedded-commits mailing list