<div><br><div class="gmail_quote"><div>On Thu, Feb 23, 2017 at 8:00 PM Joe MacDonald <<a href="mailto:joe_macdonald@mentor.com">joe_macdonald@mentor.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Based on the blacklist behaviour, recipes can be tagged as deprecated.<br class="gmail_msg">
Such recipes will produce a warning message when included in a build but<br class="gmail_msg">
unlike blacklisted recipes, the build will continue.</blockquote><div><br></div><div>Perhaps this should also be documented in manuals</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="gmail_msg">
<br class="gmail_msg">
Signed-off-by: Joe MacDonald <<a href="mailto:joe_macdonald@mentor.com" class="gmail_msg" target="_blank">joe_macdonald@mentor.com</a>><br class="gmail_msg">
---<br class="gmail_msg">
<br class="gmail_msg">
I threw this together a long time ago and never got around to sending it out for<br class="gmail_msg">
consideration, but after the excitement last week and this, I got thinking about<br class="gmail_msg">
it again and thought it might be useful. My specific use-case for this is<br class="gmail_msg">
recipes I see in meta-networking that I know are largely abandonware but that I<br class="gmail_msg">
don't want to completely throw out without giving some kind of heads up.<br class="gmail_msg">
Obviously this is purely informational, there's no mechanism set up for purging<br class="gmail_msg">
deprecated recipes, that's intended to be a maintainer activity, but the idea<br class="gmail_msg">
would be that the maintainer would flag a recipe as deprecated (probably when<br class="gmail_msg">
it's become more trouble than it seems to be worth) and thereafter users would<br class="gmail_msg">
have fair warning that this thing is on notice. If nobody speaks up within some<br class="gmail_msg">
amount of time the maintainer considers reasonable (I'm thinking a Yocto release<br class="gmail_msg">
cycle) then it's fair game to remove the recipe in question.<br class="gmail_msg">
<br class="gmail_msg">
meta/classes/deprecated.bbclass | 16 ++++++++++++++++<br class="gmail_msg">
meta/conf/distro/defaultsetup.conf | 3 ++-<br class="gmail_msg">
2 files changed, 18 insertions(+), 1 deletion(-)<br class="gmail_msg">
create mode 100644 meta/classes/deprecated.bbclass<br class="gmail_msg">
<br class="gmail_msg">
diff --git a/meta/classes/deprecated.bbclass b/meta/classes/deprecated.bbclass<br class="gmail_msg">
new file mode 100644<br class="gmail_msg">
index 0000000..3dcdadb<br class="gmail_msg">
--- /dev/null<br class="gmail_msg">
+++ b/meta/classes/deprecated.bbclass<br class="gmail_msg">
@@ -0,0 +1,16 @@<br class="gmail_msg">
+# To use the deprecated recipe check, a distribution should<br class="gmail_msg">
+# include this class in the INHERIT_DISTRO<br class="gmail_msg">
+#<br class="gmail_msg">
+# Features:<br class="gmail_msg">
+#<br class="gmail_msg">
+# * To add a package to the deprecated list, set:<br class="gmail_msg">
+# PNDEPRECATED[pn] = "message"<br class="gmail_msg">
+#<br class="gmail_msg">
+<br class="gmail_msg">
+addtask check_deprecated before do_fetch<br class="gmail_msg">
+python do_check_deprecated () {<br class="gmail_msg">
+ deprecated = d.getVarFlag('PNDEPRECATED', d.getVar('PN', True), False)<br class="gmail_msg">
+<br class="gmail_msg">
+ if deprecated:<br class="gmail_msg">
+ bb.warn("Recipe is deprecated: ", (deprecated))<br class="gmail_msg">
+}<br class="gmail_msg">
diff --git a/meta/conf/distro/defaultsetup.conf b/meta/conf/distro/defaultsetup.conf<br class="gmail_msg">
index ca2f917..16ece3a 100644<br class="gmail_msg">
--- a/meta/conf/distro/defaultsetup.conf<br class="gmail_msg">
+++ b/meta/conf/distro/defaultsetup.conf<br class="gmail_msg">
@@ -20,5 +20,6 @@ CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' + str(d.getVar('MACHINE'<br class="gmail_msg">
USER_CLASSES ?= ""<br class="gmail_msg">
PACKAGE_CLASSES ?= "package_ipk"<br class="gmail_msg">
INHERIT_BLACKLIST = "blacklist"<br class="gmail_msg">
+INHERIT_DEPRECATED = "deprecated"<br class="gmail_msg">
INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"<br class="gmail_msg">
-INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST}"<br class="gmail_msg">
+INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST} ${INHERIT_DEPRECATED}"<br class="gmail_msg">
--<br class="gmail_msg">
1.9.1<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
Openembedded-core mailing list<br class="gmail_msg">
<a href="mailto:Openembedded-core@lists.openembedded.org" class="gmail_msg" target="_blank">Openembedded-core@lists.openembedded.org</a><br class="gmail_msg">
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br class="gmail_msg">
</blockquote></div></div>