* [PATCH 0/1] sanity.bbclass: check required perl modules
@ 2014-01-22 10:45 Robert Yang
2014-01-22 10:45 ` [PATCH 1/1] " Robert Yang
0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2014-01-22 10:45 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 6e7047434fc1570146ebc94254412b99b1c4cab4:
poky.ent: Fixed broken OE_LISTS_URL. (2014-01-21 21:58:03 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib rbt/perl
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=rbt/perl
Robert Yang (1):
sanity.bbclass: check required perl modules
meta/classes/sanity.bbclass | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] sanity.bbclass: check required perl modules
2014-01-22 10:45 [PATCH 0/1] sanity.bbclass: check required perl modules Robert Yang
@ 2014-01-22 10:45 ` Robert Yang
0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2014-01-22 10:45 UTC (permalink / raw)
To: openembedded-core
Several required perl modules may missing on the host, for example the
Text::ParseWords, Thread::Queue and Data::Dumper are not installed by
default on recent Fedora releases (19 and 20 AFAIK). There would be wild
errors if they don't exist, so check them in sanity.bbclass.
And add perl to SANITY_REQUIRED_UTILITIES.
[YOCTO #5744]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/classes/sanity.bbclass | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 8531df1..e5bf970 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -2,7 +2,8 @@
# Sanity check the users setup for common misconfigurations
#
-SANITY_REQUIRED_UTILITIES ?= "patch diffstat makeinfo git bzip2 tar gzip gawk chrpath wget cpio"
+SANITY_REQUIRED_UTILITIES ?= "patch diffstat makeinfo git bzip2 tar \
+ gzip gawk chrpath wget cpio perl"
def bblayers_conf_file(d):
return os.path.join(d.getVar('TOPDIR', True), 'conf/bblayers.conf')
@@ -378,6 +379,17 @@ def check_git_version(sanity_data):
return "Your version of git is older than 1.7.5 and has bugs which will break builds. Please install a newer version of git.\n"
return None
+# Check the required perl modules which may not be installed by default
+def check_perl_modules(sanity_data):
+ ret = ""
+ modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper" )
+ for m in modules:
+ status, result = oe.utils.getstatusoutput("perl -e 'use %s' 2> /dev/null" % m)
+ if status != 0:
+ ret += "%s " % m
+ if ret:
+ return "Required perl module(s) not found: %s\n" % ret
+ return None
def sanity_check_conffiles(status, d):
# Check we are using a valid local.conf
@@ -488,6 +500,7 @@ def check_sanity_version_change(status, d):
status.addresult(check_make_version(d))
status.addresult(check_tar_version(d))
status.addresult(check_git_version(d))
+ status.addresult(check_perl_modules(d))
missing = ""
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-22 10:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-22 10:45 [PATCH 0/1] sanity.bbclass: check required perl modules Robert Yang
2014-01-22 10:45 ` [PATCH 1/1] " Robert Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox