Skip to content

Conversation

@JonoYang
Copy link
Member

@JonoYang JonoYang commented Sep 1, 2025

@pombredanne pombredanne changed the title 660 purl next maven Add support to mine maven Package-URLs #660 Sep 2, 2025
f.write(saneyaml.dump(data))


def write_purls_to_repo(repo, package, packages, push_commit=False):
Copy link
Member Author

Choose a reason for hiding this comment

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

@AyanSinhaMahapatra I've moved your write_packageurls_to_file and write_purls_to_repo functions to this file and I see that we have overlapping functionality here, especially with the code in https://github.com/aboutcode-org/purldb/blob/main/minecode_pipeline/pipes/pypi.py#L135

I think we should use a common function to do these actions

Signed-off-by: Jono Yang <[email protected]>

def write_packageurls_to_file(repo, base_dir, packageurls):
purl_file_rel_path = os.path.join(base_dir, PURLS_FILENAME)
purl_file_rel_path = os.path.join(base_dir, hashid.PURLS_FILENAME)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@JonoYang @AyanSinhaMahapatra I think we should avoid computing the package URL path and just use this function. ppath = hashid.get_package_purls_yml_file_path(package)

    * This is done in the collect_packages_from_maven step

Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
Copy link
Member

@AyanSinhaMahapatra AyanSinhaMahapatra left a comment

Choose a reason for hiding this comment

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

@JonoYang thanks++, LGTM!

A couple of minor comments for your consideration.
I've also enabled trusted publishing, and created the repos, we can start testing this in the CI.

@JonoYang JonoYang merged commit 3428caf into main Sep 24, 2025
6 checks passed
@JonoYang JonoYang deleted the 660-purl-next-maven branch September 24, 2025 01:03
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.

4 participants