From 969cb27b4d978551817612ff4558bec81cfb655c Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 20 Jul 2020 17:58:04 +0100 Subject: cooker: Fix unmatched files handling leading to misleading warnings Currently if all recipes in a layer are skipped, there are warnings that the BBFILE_PATTERN_ entry didn't match anything. We probably shouldn't do this for skipped recipes. The current code is hard to understand, not least as it passes variables which functions modify by reference rather than giving a return value. Update calc_bbfile_priority() to return values rather than modifying them. Refactor the code to try and make it clearer what its doing and fix the skipped recipe issue by passing in the list of parsed files. The function is complicated by the need to not rerun regex matching more than we ever have to which complicates the flow, it would be easier if we just reran operations multiple times. Signed-off-by: Richard Purdie --- lib/bb/tests/cooker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/bb/tests') diff --git a/lib/bb/tests/cooker.py b/lib/bb/tests/cooker.py index 74c903f01..c82d4b7b8 100644 --- a/lib/bb/tests/cooker.py +++ b/lib/bb/tests/cooker.py @@ -60,7 +60,7 @@ class CookerTest(unittest.TestCase): log_handler = LogHandler() logger.addHandler(log_handler) collection = bb.cooker.CookerCollectFiles(bbfile_config_priorities) - collection.collection_priorities(pkgfns, self.d) + collection.collection_priorities(pkgfns, pkgfns, self.d) logger.removeHandler(log_handler) # Should be empty (no generated messages) -- cgit 1.2.3-korg