mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
3fd81b0db2
commit
a5a5708dbb
@@ -34,7 +34,7 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
|
|||||||
split-strip packages-list pkgv-undefined var-undefined \
|
split-strip packages-list pkgv-undefined var-undefined \
|
||||||
version-going-backwards expanded-d invalid-chars \
|
version-going-backwards expanded-d invalid-chars \
|
||||||
license-checksum dev-elf file-rdeps configure-unsafe \
|
license-checksum dev-elf file-rdeps configure-unsafe \
|
||||||
configure-gettext \
|
configure-gettext perllocalpod \
|
||||||
"
|
"
|
||||||
# Add usrmerge QA check based on distro feature
|
# Add usrmerge QA check based on distro feature
|
||||||
ERROR_QA_append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}"
|
ERROR_QA_append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}"
|
||||||
@@ -795,6 +795,23 @@ def package_qa_check_usrmerge(pkg, d, messages):
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
QAPKGTEST[perllocalpod] = "package_qa_check_perllocalpod"
|
||||||
|
def package_qa_check_perllocalpod(pkg, d, messages):
|
||||||
|
"""
|
||||||
|
Check that the recipe didn't ship a perlocal.pod file, which shouldn't be
|
||||||
|
installed in a distribution package. cpan.bbclass sets NO_PERLLOCAL=1 to
|
||||||
|
handle this for most recipes.
|
||||||
|
"""
|
||||||
|
import glob
|
||||||
|
pkgd = oe.path.join(d.getVar('PKGDEST'), pkg)
|
||||||
|
podpath = oe.path.join(pkgd, d.getVar("libdir"), "perl*", "*", "*", "perllocal.pod")
|
||||||
|
|
||||||
|
matches = glob.glob(podpath)
|
||||||
|
if matches:
|
||||||
|
matches = [package_qa_clean_path(path, d, pkg) for path in matches]
|
||||||
|
msg = "%s contains perllocal.pod (%s), should not be installed" % (pkg, " ".join(matches))
|
||||||
|
package_qa_add_message(messages, "perllocalpod", msg)
|
||||||
|
|
||||||
QAPKGTEST[expanded-d] = "package_qa_check_expanded_d"
|
QAPKGTEST[expanded-d] = "package_qa_check_expanded_d"
|
||||||
def package_qa_check_expanded_d(package, d, messages):
|
def package_qa_check_expanded_d(package, d, messages):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user