From e46ce55528e661a556ec575b1a871ecfd97e681d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 8 Oct 2019 22:12:49 +0200 Subject: [PATCH] lv2-turtle-helper.bbclass: Create console warnings for postponed plugins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- classes/lv2-turtle-helper.bbclass | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/classes/lv2-turtle-helper.bbclass b/classes/lv2-turtle-helper.bbclass index a6de6fb..633dcd5 100644 --- a/classes/lv2-turtle-helper.bbclass +++ b/classes/lv2-turtle-helper.bbclass @@ -15,6 +15,7 @@ # File containing names of plugins to handle in do_compile_append # Line-format expected: /.so LV2_PLUGIN_INFO_FILE = "${WORKDIR}/lv2-ttl-generator-data" +LV2_PLUGIN_INFO_FILE_CLEANED = "${LV2_PLUGIN_INFO_FILE}-cleaned" # File containing names of plugins to handle in do_compile_append # Line-format expected: /.so @@ -55,10 +56,12 @@ do_compile_prepend() { do_compile[vardeps] += "LV2_PLUGIN_BLACKLIST_QEMU LV2_TTL_GENERATOR" do_compile_append() { + rm -f ${LV2_PLUGIN_INFO_FILE_CLEANED} if [ -e ${LV2_PLUGIN_INFO_FILE} ]; then - echo "lv2-plugins found - try ttl-generation for them" + echo "lv2-plugins found - try ttl-generation with '${LV2_TTL_GENERATOR}" # try build ttl-files with quemu for sofile in `sort ${LV2_PLUGIN_INFO_FILE} | uniq`; do + echo $sofile >> ${LV2_PLUGIN_INFO_FILE_CLEANED} sobase=`basename $sofile` ttl_failed="" if echo "${LV2_PLUGIN_BLACKLIST_QEMU}" | grep -q "$sobase"; then @@ -89,6 +92,19 @@ do_compile_append() { exit -1 fi } +do_compile[postfuncs] += "do_ttl_qa" +python do_ttl_qa() { + lv2_plugin_postinst_info_file = d.getVar('LV2_PLUGIN_POSTINST_INFO_FILE') + if os.path.isfile(lv2_plugin_postinst_info_file): + lv2_plugin_info_file_cleaned = d.getVar('LV2_PLUGIN_INFO_FILE_CLEANED') + num_plugins = len(open(lv2_plugin_info_file_cleaned).readlines()) + num_plugins_postinst = len(open(lv2_plugin_postinst_info_file).readlines()) + name = d.getVar('PN') + if num_plugins == num_plugins_postinst: + bb.warn("All plugins in %s are postponed to post-install! Check log.do_compile for valid LV2_TTL_GENERATOR (%s)" % (name,d.getVar('LV2_TTL_GENERATOR'))) + else: + bb.warn("%i of %i plugins in %s are postponed to post-install! Check %s and log.do_compile for details" % (num_plugins_postinst, num_plugins, name, lv2_plugin_postinst_info_file)) +} do_install_append() { # create postinst manifest