Skip to content

Commit

Permalink
remove duplicated line and unnecessary import
Browse files Browse the repository at this point in the history
  • Loading branch information
spatten committed Nov 18, 2024
1 parent 3165955 commit 07ecd07
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions classes/fossa.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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}")
}

Expand Down

0 comments on commit 07ecd07

Please sign in to comment.