diff options
author | Ross Burton <ross.burton@intel.com> | 2019-10-04 01:22:17 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-10-08 11:22:24 +0100 |
commit | a5a5708dbbb534f6624fafe9e78f96de25c10dea (patch) | |
tree | b5c57f2906cae705d10d4a6ed75a99e4e69bff20 /meta/classes | |
parent | 3fd81b0db24776432d35e1bfb84a68bdfec5e0d2 (diff) | |
download | poky-a5a5708dbbb534f6624fafe9e78f96de25c10dea.tar.gz |
insane: add check for perllocal.pod
perlocal.pod is an index file of locally installed modules and so shouldn't be
installed by any distribution packages. cpan.bbclass already sets NO_PERLOCAL
to stop this file being generated by most Perl recipes, but if a recipe is using
MakeMaker directly (such as rrdtool) then they might not be doing this
correctly.
To avoid multiple packages shipping this file and then failing to install
together, add a QA test to check if this file exists and by default emit an
error if it does.
[ YOCTO #13491 ]
(From OE-Core rev: 5d16d265cc61c4e279fe3bf66016a00d9daa4068)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/insane.bbclass | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 9b886d1380..9605ac2bae 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -34,7 +34,7 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ | |||
34 | split-strip packages-list pkgv-undefined var-undefined \ | 34 | split-strip packages-list pkgv-undefined var-undefined \ |
35 | version-going-backwards expanded-d invalid-chars \ | 35 | version-going-backwards expanded-d invalid-chars \ |
36 | license-checksum dev-elf file-rdeps configure-unsafe \ | 36 | license-checksum dev-elf file-rdeps configure-unsafe \ |
37 | configure-gettext \ | 37 | configure-gettext perllocalpod \ |
38 | " | 38 | " |
39 | # Add usrmerge QA check based on distro feature | 39 | # Add usrmerge QA check based on distro feature |
40 | ERROR_QA_append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}" | 40 | ERROR_QA_append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}" |
@@ -795,6 +795,23 @@ def package_qa_check_usrmerge(pkg, d, messages): | |||
795 | return False | 795 | return False |
796 | return True | 796 | return True |
797 | 797 | ||
798 | QAPKGTEST[perllocalpod] = "package_qa_check_perllocalpod" | ||
799 | def package_qa_check_perllocalpod(pkg, d, messages): | ||
800 | """ | ||
801 | Check that the recipe didn't ship a perlocal.pod file, which shouldn't be | ||
802 | installed in a distribution package. cpan.bbclass sets NO_PERLLOCAL=1 to | ||
803 | handle this for most recipes. | ||
804 | """ | ||
805 | import glob | ||
806 | pkgd = oe.path.join(d.getVar('PKGDEST'), pkg) | ||
807 | podpath = oe.path.join(pkgd, d.getVar("libdir"), "perl*", "*", "*", "perllocal.pod") | ||
808 | |||
809 | matches = glob.glob(podpath) | ||
810 | if matches: | ||
811 | matches = [package_qa_clean_path(path, d, pkg) for path in matches] | ||
812 | msg = "%s contains perllocal.pod (%s), should not be installed" % (pkg, " ".join(matches)) | ||
813 | package_qa_add_message(messages, "perllocalpod", msg) | ||
814 | |||
798 | QAPKGTEST[expanded-d] = "package_qa_check_expanded_d" | 815 | QAPKGTEST[expanded-d] = "package_qa_check_expanded_d" |
799 | def package_qa_check_expanded_d(package, d, messages): | 816 | def package_qa_check_expanded_d(package, d, messages): |
800 | """ | 817 | """ |