From 80d9c5659905a6454e4855078e824296de414ba0 Mon Sep 17 00:00:00 2001 From: Matthew Brady Date: Fri, 20 Sep 2024 09:50:26 +0100 Subject: [PATCH] v1.0.14 - Fix for copying package + src files --- README.md | 2 +- pyproject.toml | 2 +- yocto_import_sbom/BBClass.py | 6 ++++-- yocto_import_sbom/ConfigClass.py | 2 +- yocto_import_sbom/RecipeListClass.py | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4ab9cd9..5560d10 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Synopsys Scan Yocto Script - bd_scan_yocto_via_sbom.py v1.0.13 +# Synopsys Scan Yocto Script - bd_scan_yocto_via_sbom.py v1.0.14 # PROVISION OF THIS SCRIPT This script is provided under the MIT license (see LICENSE file). diff --git a/pyproject.toml b/pyproject.toml index f3761e7..6768cc7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "bd_scan_yocto_via_sbom" -version = "1.0.13" +version = "1.0.14" authors = [ { name="Matthew Brady", email="mbrad@synopsys.com" }, ] diff --git a/yocto_import_sbom/BBClass.py b/yocto_import_sbom/BBClass.py index 6546613..42693a8 100644 --- a/yocto_import_sbom/BBClass.py +++ b/yocto_import_sbom/BBClass.py @@ -193,6 +193,7 @@ def process_showlayers(showlayers_file, reclist): @staticmethod def process_licman_file(lic_manifest_file, reclist): + packages_total = 0 recipes_total = 0 try: with open(lic_manifest_file, "r") as lfile: @@ -214,14 +215,15 @@ def process_licman_file(lic_manifest_file, reclist): recipe = line.split(': ')[1] if recipe and ver: - recipes_total += 1 + packages_total += 1 rec_obj = Recipe(recipe, ver) if not reclist.check_recipe_exists(recipe): reclist.recipes.append(rec_obj) + recipes_total += 1 ver = '' recipe = '' - logging.info(f"- {recipes_total} packages found in license.manifest file ({reclist.count()} recipes)") + logging.info(f"- {packages_total} packages found in {lic_manifest_file} ({recipes_total} recipes)") except Exception as e: logging.error(f"Cannot read license manifest file '{lic_manifest_file}' - error '{e}'") diff --git a/yocto_import_sbom/ConfigClass.py b/yocto_import_sbom/ConfigClass.py index 1ed9758..19727e6 100644 --- a/yocto_import_sbom/ConfigClass.py +++ b/yocto_import_sbom/ConfigClass.py @@ -144,7 +144,7 @@ def __init__(self): else: logging.basicConfig(level=loglevel) - logging.info("Black Duck Yocto scan via SBOM utility - v1.0.13") + logging.info("Black Duck Yocto scan via SBOM utility - v1.0.14") logging.info("SUPPLIED ARGUMENTS:") for arg in vars(args): logging.info(f"--{arg}={getattr(args, arg)}") diff --git a/yocto_import_sbom/RecipeListClass.py b/yocto_import_sbom/RecipeListClass.py index 913b4c4..c2d377b 100644 --- a/yocto_import_sbom/RecipeListClass.py +++ b/yocto_import_sbom/RecipeListClass.py @@ -85,7 +85,7 @@ def scan_pkg_download_files(self, conf, bom): return True return False - def find_files(self, conf, all_download_files, all_pkg_files): + def find_files(self, conf, all_pkg_files, all_download_files): found_files = [] for recipe in self.recipes: if not conf.scan_all_packages and recipe.matched_in_bom: