Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix package resource assign bug for jar manifests #3983

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

AyanSinhaMahapatra
Copy link
Member

@AyanSinhaMahapatra AyanSinhaMahapatra commented Nov 14, 2024

We had a bug in scancode.io Java MANIFEST.MF parsing and while scanning jars with scan_codebase pipelines we were not assigning package resources to DiscoveredPackages correctly. This PR fixes the same.

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
@AyanSinhaMahapatra AyanSinhaMahapatra force-pushed the jar-manifest-assign-package branch from cb808a2 to d7fc4cc Compare November 14, 2024 13:17
Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be merged in the meantime but the larger issue of JAR as a PURL type tracked in #3962 will need some love soon, may be with an "unknown" PURL type

@@ -1199,6 +1199,12 @@ def assign_package_to_resources(cls, package, resource, codebase, package_adder=
# NOTE: we do not attach files to the Package level. Instead we
# update `for_packages` of a codebase resource.
package_uid = package.package_uid
if resource.path.endswith("-extract"):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants