From 491fde8cd3fd493f9fec2fd434fe1be547f66148 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 24 Aug 2013 17:01:20 +0100 Subject: classes: Remove references to _remove in function names since this may become a bitbake keyword There is a good chance we might want to support a bitbake operator "_remove" which works in a similar way to _append and _prepend. As such, we can't use those keywords in function or variable names. Signed-off-by: Richard Purdie Signed-off-by: Saul Wold --- meta/classes/recipe_sanity.bbclass | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'meta/classes/recipe_sanity.bbclass') diff --git a/meta/classes/recipe_sanity.bbclass b/meta/classes/recipe_sanity.bbclass index 8b3a1c9571..2f90159d58 100644 --- a/meta/classes/recipe_sanity.bbclass +++ b/meta/classes/recipe_sanity.bbclass @@ -57,7 +57,7 @@ def can_use_autotools_base(cfgdata, d): return True -def can_remove_FILESPATH(cfgdata, d): +def can_delete_FILESPATH(cfgdata, d): expected = cfgdata.get("FILESPATH") #expected = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in d.getVar('FILESPATHBASE', True).split(':') for p in d.getVar('FILESPATHPKG', True).split(':') for o in (d.getVar('OVERRIDES', True) + ':').split(':') if os.path.exists(os.path.join(fp, p, o))])}:${FILESDIR}" expectedpaths = d.expand(expected) @@ -71,7 +71,7 @@ def can_remove_FILESPATH(cfgdata, d): return False return expected != unexpanded -def can_remove_FILESDIR(cfgdata, d): +def can_delete_FILESDIR(cfgdata, d): expected = cfgdata.get("FILESDIR") #expected = "${@bb.which(d.getVar('FILESPATH', True), '.')}" unexpanded = d.getVar("FILESDIR", 0) @@ -87,7 +87,7 @@ def can_remove_FILESDIR(cfgdata, d): (expanded in filespath or expanded == d.expand(expected)) -def can_remove_others(p, cfgdata, d): +def can_delete_others(p, cfgdata, d): for k in ["S", "PV", "PN", "DESCRIPTION", "DEPENDS", "SECTION", "PACKAGES", "EXTRA_OECONF", "EXTRA_OEMAKE"]: #for k in cfgdata: @@ -113,8 +113,8 @@ python do_recipe_sanity () { p = "%s %s %s" % (d.getVar("PN", True), d.getVar("PV", True), d.getVar("PR", True)) sanitychecks = [ - (can_remove_FILESDIR, "candidate for removal of FILESDIR"), - (can_remove_FILESPATH, "candidate for removal of FILESPATH"), + (can_delete_FILESDIR, "candidate for removal of FILESDIR"), + (can_delete_FILESPATH, "candidate for removal of FILESPATH"), #(can_use_autotools_base, "candidate for use of autotools_base"), (incorrect_nonempty_PACKAGES, "native or cross recipe with non-empty PACKAGES"), ] @@ -124,7 +124,7 @@ python do_recipe_sanity () { if func(cfgdata, d): __note(msg, d) - can_remove_others(p, cfgdata, d) + can_delete_others(p, cfgdata, d) var_renames_overwrite(cfgdata, d) req_vars(cfgdata, d) bad_runtime_vars(cfgdata, d) -- cgit 1.2.3-korg