Skip to content

Commit 69564d2

Browse files
authored
Merge pull request #31 from fosslight/some
Prints even if some package is missing
2 parents 348cce8 + c6f3261 commit 69564d2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/fosslight_yocto/create_oss_report_for_yocto.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def read_installed_pkg_file(installed_pkg_names_file):
7777
global installed_packages_src
7878
installed_packages_src = []
7979
success = True
80+
pkg_info_not_found = True
8081
try:
8182
success, lines = read_file(installed_pkg_names_file)
8283
for line in lines:
@@ -89,18 +90,19 @@ def read_installed_pkg_file(installed_pkg_names_file):
8990
for key, value in bom_pkg_data[pkg_name].items():
9091
set_value_switch(pkg_item, key, value, nested_pkg_name)
9192
installed_packages_src.append(pkg_item)
92-
if not pkg_item.oss_name:
93-
logger.error(f"Can't find recipe for {pkg_name}")
94-
logger.error("Check whether you entered installed-package-names.txt with -i.")
95-
logger.info(f"---- Value entered with -i:{installed_pkg_names_file}")
96-
success = False
97-
break
93+
if pkg_info_not_found and pkg_item.oss_name:
94+
pkg_info_not_found = False
9895
except Exception as ex:
9996
logger.error(f"Read {installed_pkg_names_file}: {ex}")
10097
success = False
10198
if not installed_packages_src:
10299
logger.error(f"Empty File : {installed_pkg_names_file}")
103100
success = False
101+
if pkg_info_not_found:
102+
logger.error("Check whether you entered installed-package-names.txt with -i.")
103+
logger.info(f"---- Value entered with -i:{installed_pkg_names_file}")
104+
success = False
105+
104106
return success
105107

106108

0 commit comments

Comments
 (0)