* [PATCH 0/1]
@ 2017-11-21 0:21 Amanda Brindle
2017-11-21 0:21 ` [PATCH 1/1] scripts/contrib/bbvars.py: Remove dead code Amanda Brindle
2017-11-21 0:35 ` ✗ patchtest: failure for " Patchwork
0 siblings, 2 replies; 3+ messages in thread
From: Amanda Brindle @ 2017-11-21 0:21 UTC (permalink / raw)
To: openembedded-core; +Cc: paul.eggleton
The following changes since commit 4ed19ac8c19afd56d445d84e02b622cb056b8359:
poky: Switch to post release name/version (2017-11-14 17:26:58 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib abrindle/bbvars_tinfoil2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=abrindle/bbvars_tinfoil2
Amanda Brindle (1):
scripts/contrib/bbvars.py: Remove dead code
scripts/contrib/bbvars.py | 52 ++---------------------------------------------
1 file changed, 2 insertions(+), 50 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] scripts/contrib/bbvars.py: Remove dead code
2017-11-21 0:21 [PATCH 0/1] Amanda Brindle
@ 2017-11-21 0:21 ` Amanda Brindle
2017-11-21 0:35 ` ✗ patchtest: failure for " Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Amanda Brindle @ 2017-11-21 0:21 UTC (permalink / raw)
To: openembedded-core; +Cc: paul.eggleton
Removed the -m option since this script now searches through all
recipes in the configuration. Also removed dead code, which includes
the functions recipe_bbvars() and collect_bbvars().
---
scripts/contrib/bbvars.py | 52 ++---------------------------------------------
1 file changed, 2 insertions(+), 50 deletions(-)
diff --git a/scripts/contrib/bbvars.py b/scripts/contrib/bbvars.py
index 556f652..286b5a9 100755
--- a/scripts/contrib/bbvars.py
+++ b/scripts/contrib/bbvars.py
@@ -32,48 +32,12 @@ scriptpath.add_bitbake_lib_path()
import bb.tinfoil
def usage():
- print('Usage: %s -d FILENAME [-d FILENAME]* -m METADIR [-m MATADIR]*' % os.path.basename(sys.argv[0]))
+ print('Usage: %s -d FILENAME [-d FILENAME]*' % os.path.basename(sys.argv[0]))
print(' -d FILENAME documentation file to search')
print(' -h, --help display this help and exit')
- print(' -m METADIR meta directory to search for recipes')
print(' -t FILENAME documentation config file (for doc tags)')
print(' -T Only display variables with doc tags (requires -t)')
-def recipe_bbvars(recipe):
- ''' Return a unique set of every bbvar encountered in the recipe '''
- prog = re.compile("[A-Z_]+")
- vset = set()
- try:
- r = open(recipe)
- except IOError as err:
- print('WARNING: Failed to open recipe ', recipe)
- print(err.args[1])
-
- for line in r:
- # Strip any comments from the line
- line = line.rsplit('#')[0]
- vset = vset.union(set(prog.findall(line)))
- r.close()
-
- bbvars = {}
- for v in vset:
- bbvars[v] = 1
-
- return bbvars
-
-def collect_bbvars(metadir):
- ''' Walk the metadir and collect the bbvars from each recipe found '''
- bbvars = {}
- for root,dirs,files in os.walk(metadir):
- for name in files:
- if name.find(".bb") >= 0:
- for key in recipe_bbvars(os.path.join(root,name)).keys():
- if key in bbvars:
- bbvars[key] = bbvars[key] + 1
- else:
- bbvars[key] = 1
- return bbvars
-
def bbvar_is_documented(var, documented_vars):
''' Check if variable (var) is in the list of documented variables(documented_vars) '''
if var in documented_vars:
@@ -112,7 +76,6 @@ def bbvar_doctag(var, docconf):
def main():
docfiles = []
- metadirs = []
bbvars = set()
undocumented = []
docconf = ""
@@ -136,12 +99,6 @@ def main():
else:
print('ERROR: documentation file %s is not a regular file' % a)
sys.exit(3)
- elif o == '-m':
- if os.path.isdir(a):
- metadirs.append(a)
- else:
- print('ERROR: meta directory %s is not a directory' % a)
- sys.exit(4)
elif o == "-t":
if os.path.isfile(a):
docconf = a
@@ -155,11 +112,6 @@ def main():
usage()
sys.exit(5)
- if len(metadirs) == 0:
- print('ERROR: no metadir specified')
- usage()
- sys.exit(6)
-
if onlydoctags and docconf == "":
print('ERROR: no docconf specified')
usage()
@@ -196,7 +148,7 @@ def main():
bbvars_update(data)
# Collect variables from all recipes
- for recipe in tinfoil.all_recipe_files():
+ for recipe in tinfoil.all_recipe_files(variants=False):
print("Checking %s" % recipe)
for data in tinfoil.parse_recipe_file(recipe):
bbvars_update(data)
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* ✗ patchtest: failure for scripts/contrib/bbvars.py: Remove dead code
2017-11-21 0:21 [PATCH 0/1] Amanda Brindle
2017-11-21 0:21 ` [PATCH 1/1] scripts/contrib/bbvars.py: Remove dead code Amanda Brindle
@ 2017-11-21 0:35 ` Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2017-11-21 0:35 UTC (permalink / raw)
To: Amanda Brindle; +Cc: openembedded-core
== Series Details ==
Series: scripts/contrib/bbvars.py: Remove dead code
Revision: 1
URL : https://patchwork.openembedded.org/series/9885/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:
* Patch [1/1] scripts/contrib/bbvars.py: Remove dead code
Issue Patch is missing Signed-off-by [test_signed_off_by_presence]
Suggested fix Sign off the patch (either manually or with "git commit --amend -s")
If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-21 0:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-21 0:21 [PATCH 0/1] Amanda Brindle
2017-11-21 0:21 ` [PATCH 1/1] scripts/contrib/bbvars.py: Remove dead code Amanda Brindle
2017-11-21 0:35 ` ✗ patchtest: failure for " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox