[oe-commits] [openembedded-core] 09/23: build-recipe-list: improvements
git at git.openembedded.org
git at git.openembedded.org
Thu Mar 15 10:53:22 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 1d615fc2d6b74ea62ef0c614bd54670c1a62a17f
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Mon Mar 12 16:37:47 2018 +0000
build-recipe-list: improvements
---
scripts/distro/build-recipe-list.py | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/scripts/distro/build-recipe-list.py b/scripts/distro/build-recipe-list.py
index 3f5f7c2..2162764 100755
--- a/scripts/distro/build-recipe-list.py
+++ b/scripts/distro/build-recipe-list.py
@@ -20,15 +20,27 @@ import argparse
__version__ = "0.1.0"
-recipenames = []
-allrecipes = []
-
+# set of BPNs
+recipenames = set()
+# map of recipe -> data
+allrecipes = {}
+
+def make_bpn(recipe):
+ prefixes = ("nativesdk-",)
+ suffixes = ("-native", "-cross", "-initial", "-intermediate", "-crosssdk", "-cross-canadian")
+ for ix in prefixes + suffixes:
+ if ix in recipe:
+ recipe = recipe.replace(ix, "")
+ return recipe
+
def gather_recipes(rows):
- # store the data into the array
for row in rows:
- if row[0] not in recipenames:
- recipenames.append(row[0])
- allrecipes.append(row)
+ recipe = row[0]
+ bpn = make_bpn(recipe)
+ if bpn not in recipenames:
+ recipenames.add(bpn)
+ if recipe not in allrecipes:
+ allrecipes[recipe] = row
def generate_recipe_list():
# machine list
@@ -60,8 +72,8 @@ def generate_recipe_list():
print("file : recipe-list.txt is created with %d entries." % len(recipenames))
with open('all-recipe-list.txt', 'w') as f:
- for recipe in sorted(allrecipes):
- f.write("%s\n" % ','.join([str(data) for data in recipe]))
+ for recipe, row in sorted(allrecipes.items()):
+ f.write("%s\n" % ','.join(row))
def diff_for_new_recipes(recipe1, recipe2):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list