Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Skip symlinks when creating SBOM for source tarball#232

Merged
ambv merged 2 commits into
python:masterpython/release-tools:masterfrom
hugovk:skip-sbom-symlinkshugovk/release-tools:skip-sbom-symlinksCopy head branch name to clipboard
Apr 8, 2025
Merged

Skip symlinks when creating SBOM for source tarball#232
ambv merged 2 commits into
python:masterpython/release-tools:masterfrom
hugovk:skip-sbom-symlinkshugovk/release-tools:skip-sbom-symlinksCopy head branch name to clipboard

Conversation

@hugovk

@hugovk hugovk commented Apr 8, 2025

Copy link
Copy Markdown
Member
Building an SBOM for artifact 'Python-3.14.0a7.tgz'
💥  Building SBOM artifacts
Traceback (most recent call last):
  File "/Users/hugo/github/release-tools/run_release.py", line 1388, in <module>
    main()
  File "/Users/hugo/github/release-tools/run_release.py", line 1384, in main
    automata.run()
  File "/Users/hugo/github/release-tools/run_release.py", line 248, in run
    raise e from None
  File "/Users/hugo/github/release-tools/run_release.py", line 245, in run
    self.current_task(self.db)
  File "/Users/hugo/github/release-tools/release.py", line 126, in __call__
    return getattr(self, "function")(db)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hugo/github/release-tools/run_release.py", line 656, in build_sbom_artifacts
    sbom_data = sbom.create_sbom_for_source_tarball(tarball_path)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hugo/github/release-tools/sbom.py", line 616, in create_sbom_for_source_tarball
    assert member.isfile() and member.name.startswith(f"Python-{cpython_version}/")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

That's because Python-3.14.0a7/Misc/mypy/_colorize.py is a symlink and member.isfile() is False.

Because https://github.com/python/cpython/tree/main/Misc/mypy now has symlinks, added in python/cpython#131509.

Let's skip them.

@hugovk hugovk requested a review from sethmlarson April 8, 2025 12:22
Comment thread sbom.py Outdated
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

@sethmlarson sethmlarson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@ambv ambv merged commit 267346a into python:master Apr 8, 2025
@hugovk hugovk deleted the skip-sbom-symlinks branch April 8, 2025 14:42
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.