From 2bfb14d6caddf639de64f3d55ad73f0191c80741 Mon Sep 17 00:00:00 2001 From: Herb Kuta Date: Fri, 12 Apr 2019 12:25:33 -0700 Subject: [PATCH] DRAFT Add ros_recipe_now_generated.bbclass --- classes/ros_recipe_now_generated.bbclass | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 classes/ros_recipe_now_generated.bbclass diff --git a/classes/ros_recipe_now_generated.bbclass b/classes/ros_recipe_now_generated.bbclass new file mode 100644 index 0000000..414e6a5 --- /dev/null +++ b/classes/ros_recipe_now_generated.bbclass @@ -0,0 +1,10 @@ +# Inherit this bbclass in a manually created recipe to handle the case where a package that originally wasn't listed in +# ROS_DISTRO-cache.yaml now appears in that file for a subsequent distro. It appends a '-notgenerated' suffix to PN if the current +# ROS_DISTRO now has a generated recipe for PN, thus ensuring it won't be used regardless of the algorithm used by OE to select +# between multiple recipes. + +def ros_recipe_now_generated__get_suffix(d): + pn = bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname' + return bb.utils.contains('ROS_SUPERFLORE_GENERATED_RECIPES', pn, '-notgenerated', '', d) + +PN_append = "${@ros_recipe_now_generated__get_suffix(d)}"