diff --git a/classes/fossa.bbclass b/classes/fossa.bbclass index b235c83..50c8284 100644 --- a/classes/fossa.bbclass +++ b/classes/fossa.bbclass @@ -14,7 +14,7 @@ do_fossa_archive[rdeptask] += "do_patch" # This task runs after the `do_patch` task. # # The `do_patch` task is executed for each package in the build; in this way -# `do_fossa_archive` is able to save the package information and source code +# `do_fossa_archive` is able to save the package information and source code # for every package that goes into the build. # # The temporary files containing this metadata are then combined into a @@ -82,20 +82,17 @@ python do_fossa_pkg() { # this way it is able to capture the output of `do_fossa_pkg` for every # package that was processed. python do_fossa() { - from oe.rootfs import image_list_installed_packages - if not is_fossa_enabled(d): bb.debug(1, "Since FOSSA_ENABLED is 0, skipping: creating fossa-deps.json") - return + return import errno import os import json import glob - + metadata_dir = d.getVar('FOSSA_METADATA_RECIPES') pkg_metadata = all_pkg_metadata(d, metadata_dir) - pkg_metadata = all_pkg_metadata(d, metadata_dir) installed_pkgs = [] for pkg in pkg_metadata: @@ -122,10 +119,10 @@ python do_fossa() { with open(fossa_deps_path, 'w+') as fd: json.dump(fossa_deps_dict, fd, indent=4, sort_keys=False) - + with open(fossa_deps_raw, 'w+') as fr: json.dump(pkg_metadata, fr, indent=4, sort_keys=False) - + bb.debug(1, "Wrote fossa-deps at: {fossa_deps_path}") }