diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-24 17:01:20 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-26 11:29:45 +0100 |
commit | 93ec1e347cbba47cb35137047ac2ef8875a1c5d1 (patch) | |
tree | 4a677d414583daf49f8d029bea7a320bb3856751 /meta/classes/recipe_sanity.bbclass | |
parent | 388318706699250b7f48c5692ba81f0595b176bd (diff) | |
download | poky-93ec1e347cbba47cb35137047ac2ef8875a1c5d1.tar.gz |
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.
(From OE-Core rev: 491fde8cd3fd493f9fec2fd434fe1be547f66148)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/recipe_sanity.bbclass')
-rw-r--r-- | meta/classes/recipe_sanity.bbclass | 12 |
1 files changed, 6 insertions, 6 deletions
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): | |||
57 | 57 | ||
58 | return True | 58 | return True |
59 | 59 | ||
60 | def can_remove_FILESPATH(cfgdata, d): | 60 | def can_delete_FILESPATH(cfgdata, d): |
61 | expected = cfgdata.get("FILESPATH") | 61 | expected = cfgdata.get("FILESPATH") |
62 | #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}" | 62 | #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}" |
63 | expectedpaths = d.expand(expected) | 63 | expectedpaths = d.expand(expected) |
@@ -71,7 +71,7 @@ def can_remove_FILESPATH(cfgdata, d): | |||
71 | return False | 71 | return False |
72 | return expected != unexpanded | 72 | return expected != unexpanded |
73 | 73 | ||
74 | def can_remove_FILESDIR(cfgdata, d): | 74 | def can_delete_FILESDIR(cfgdata, d): |
75 | expected = cfgdata.get("FILESDIR") | 75 | expected = cfgdata.get("FILESDIR") |
76 | #expected = "${@bb.which(d.getVar('FILESPATH', True), '.')}" | 76 | #expected = "${@bb.which(d.getVar('FILESPATH', True), '.')}" |
77 | unexpanded = d.getVar("FILESDIR", 0) | 77 | unexpanded = d.getVar("FILESDIR", 0) |
@@ -87,7 +87,7 @@ def can_remove_FILESDIR(cfgdata, d): | |||
87 | (expanded in filespath or | 87 | (expanded in filespath or |
88 | expanded == d.expand(expected)) | 88 | expanded == d.expand(expected)) |
89 | 89 | ||
90 | def can_remove_others(p, cfgdata, d): | 90 | def can_delete_others(p, cfgdata, d): |
91 | for k in ["S", "PV", "PN", "DESCRIPTION", "DEPENDS", | 91 | for k in ["S", "PV", "PN", "DESCRIPTION", "DEPENDS", |
92 | "SECTION", "PACKAGES", "EXTRA_OECONF", "EXTRA_OEMAKE"]: | 92 | "SECTION", "PACKAGES", "EXTRA_OECONF", "EXTRA_OEMAKE"]: |
93 | #for k in cfgdata: | 93 | #for k in cfgdata: |
@@ -113,8 +113,8 @@ python do_recipe_sanity () { | |||
113 | p = "%s %s %s" % (d.getVar("PN", True), d.getVar("PV", True), d.getVar("PR", True)) | 113 | p = "%s %s %s" % (d.getVar("PN", True), d.getVar("PV", True), d.getVar("PR", True)) |
114 | 114 | ||
115 | sanitychecks = [ | 115 | sanitychecks = [ |
116 | (can_remove_FILESDIR, "candidate for removal of FILESDIR"), | 116 | (can_delete_FILESDIR, "candidate for removal of FILESDIR"), |
117 | (can_remove_FILESPATH, "candidate for removal of FILESPATH"), | 117 | (can_delete_FILESPATH, "candidate for removal of FILESPATH"), |
118 | #(can_use_autotools_base, "candidate for use of autotools_base"), | 118 | #(can_use_autotools_base, "candidate for use of autotools_base"), |
119 | (incorrect_nonempty_PACKAGES, "native or cross recipe with non-empty PACKAGES"), | 119 | (incorrect_nonempty_PACKAGES, "native or cross recipe with non-empty PACKAGES"), |
120 | ] | 120 | ] |
@@ -124,7 +124,7 @@ python do_recipe_sanity () { | |||
124 | if func(cfgdata, d): | 124 | if func(cfgdata, d): |
125 | __note(msg, d) | 125 | __note(msg, d) |
126 | 126 | ||
127 | can_remove_others(p, cfgdata, d) | 127 | can_delete_others(p, cfgdata, d) |
128 | var_renames_overwrite(cfgdata, d) | 128 | var_renames_overwrite(cfgdata, d) |
129 | req_vars(cfgdata, d) | 129 | req_vars(cfgdata, d) |
130 | bad_runtime_vars(cfgdata, d) | 130 | bad_runtime_vars(cfgdata, d) |