blackducksoftware / bd_scan_yocto_via_sbom

MIT License
1 stars 0 forks source link

Skip bitbake not working due to wrong variable name #17

Closed AlexanderAduda closed 5 days ago

AlexanderAduda commented 5 days ago

Using the scripts with the following options leads to an attribute error

bd-scan-yocto-via-sbom \
--blackduck_url <URL> \
--blackduck_api_token <TOKEN> \
--blackduck_trust_cert \
-t some-image \
-p some-project \
-v some-version \
--oe_data_folder ./build/oe-data \
--license_manifest ./build/tmp/deploy/licenses/some_target/some-image-some_target.rootfs/license.manifest  \
--cve_check_file ./build/tmp/deploy/images/some_target/some-image-some_target.rootfs.cve \
--bitbake_layers_file ./build/current-bitbake-layers \
--download_dir ./build/downloads \
--package_dir ./build/tmp/deploy/rpm \
--build_dir ./build \
--image_package_type rpm \
--machine some_target\
--skip_bitbake
Traceback (most recent call last):
  File "<project path>/venv/bin/bd-scan-yocto-via-sbom", line 8, in <module>
    sys.exit(main.main())
             ^^^^^^^^^^^
  File "<project path>/.venv/lib/python3.12/site-packages/yocto_import_sbom/main.py", line 86, in main
    if not reclist.scan_pkg_download_files(conf, bom):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<project path>/.venv/lib/python3.12/site-packages/yocto_import_sbom/RecipeListClass.py", line 82, in scan_pkg_download_files
    found_files = self.find_files(conf, all_pkg_files, all_download_files)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<project path>/.venv/lib/python3.12/site-packages/yocto_import_sbom/RecipeListClass.py", line 97, in find_files
    pkg_regex = re.compile(rf"^(lib)?{recipe_esc}\d*[_-]v?{ver_esc}[+.-].*\.{conf.image_pkgtype}")
                                                                             ^^^^^^^^^^^^^^^^^^
AttributeError: 'Config' object has no attribute 'image_pkgtype'. Did you mean: 'image_package_type'?
matthewb66 commented 5 days ago

Thanks for highlighting. Has been fixed in v1.0.17