Skip to content

Commit

Permalink
Merge pull request #31 from fosslight/some
Browse files Browse the repository at this point in the history
Prints even if some package is missing
  • Loading branch information
soimkim authored Jun 12, 2024
2 parents 348cce8 + c6f3261 commit 69564d2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/fosslight_yocto/create_oss_report_for_yocto.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def read_installed_pkg_file(installed_pkg_names_file):
global installed_packages_src
installed_packages_src = []
success = True
pkg_info_not_found = True
try:
success, lines = read_file(installed_pkg_names_file)
for line in lines:
Expand All @@ -89,18 +90,19 @@ def read_installed_pkg_file(installed_pkg_names_file):
for key, value in bom_pkg_data[pkg_name].items():
set_value_switch(pkg_item, key, value, nested_pkg_name)
installed_packages_src.append(pkg_item)
if not pkg_item.oss_name:
logger.error(f"Can't find recipe for {pkg_name}")
logger.error("Check whether you entered installed-package-names.txt with -i.")
logger.info(f"---- Value entered with -i:{installed_pkg_names_file}")
success = False
break
if pkg_info_not_found and pkg_item.oss_name:
pkg_info_not_found = False
except Exception as ex:
logger.error(f"Read {installed_pkg_names_file}: {ex}")
success = False
if not installed_packages_src:
logger.error(f"Empty File : {installed_pkg_names_file}")
success = False
if pkg_info_not_found:
logger.error("Check whether you entered installed-package-names.txt with -i.")
logger.info(f"---- Value entered with -i:{installed_pkg_names_file}")
success = False

return success


Expand Down

0 comments on commit 69564d2

Please sign in to comment.