Skip to content

elbepack: cyclonedx-sbom: add support for flat repository layouts#463

Open
d4nuu8 wants to merge 2 commits into
Linutronix:masterfrom
d4nuu8:sbom
Open

elbepack: cyclonedx-sbom: add support for flat repository layouts#463
d4nuu8 wants to merge 2 commits into
Linutronix:masterfrom
d4nuu8:sbom

Conversation

@d4nuu8

@d4nuu8 d4nuu8 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

This brings support for repositories using a flat layout (e.g. minidinst).

Comment thread elbepack/commands/cyclonedx-sbom.py Outdated
# https://deb.corporate.com/kuka/dom/ethtool_6.14.2-1%7ekdeb13u1_arm64.deb
return '/'.join(uri_parts[:-1])

raise ValueError('Unexpected URI format: too few parts')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you reformat this to make it a bit easier to understand?

if < 6:
    if endswith('.deb)
        ...
    else
        ...
else if:
    ...
else if:
   ...
else:
    ...

This still won't handle all cases I guess and at some point we should figure out a better variant.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've added tests for the supported URLs and refactored it completely.

What do you think?

d4nuu8 added 2 commits June 11, 2026 19:31
This patch adds tests for the already supported URLs.

This enables us to easily refactor the current implementation and extend
it for further URL formats.

Signed-off-by: Daniel Braunwarth <daniel.braunwarth@kuka.com>
This brings support for repositories using a flat layout (e.g.
minidinst).

Signed-off-by: Daniel Braunwarth <daniel.braunwarth@kuka.com>
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