Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nxd-bom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
nxd-bom
Commits
e0437e84
Commit
e0437e84
authored
Jun 01, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
understand slapos.recipe.cmmi from path=
parent
ba8f96b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
nxdbom/__init__.py
nxdbom/__init__.py
+6
-2
nxdbom/nxdbom_test.py
nxdbom/nxdbom_test.py
+15
-0
No files found.
nxdbom/__init__.py
View file @
e0437e84
...
@@ -114,7 +114,12 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo
...
@@ -114,7 +114,12 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo
recipe
=
part
[
'recipe'
].
rsplit
(
'=='
,
1
)[
0
]
recipe
=
part
[
'recipe'
].
rsplit
(
'=='
,
1
)[
0
]
if
recipe
==
'slapos.recipe.cmmi'
:
if
recipe
==
'slapos.recipe.cmmi'
:
addbom
(
geturl
(
part
),
''
)
# XXX detect kind?
if
part
.
get
(
'path'
,
raw
=
True
):
url
=
geturl
(
part
,
default
=
None
)
else
:
url
=
geturl
(
part
)
if
url
:
addbom
(
url
,
''
)
# XXX detect kind?
elif
recipe
==
'slapos.recipe.build'
:
elif
recipe
==
'slapos.recipe.build'
:
# slapos.recipe.build is often used in creative ways to actually
# slapos.recipe.build is often used in creative ways to actually
...
@@ -129,7 +134,6 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo
...
@@ -129,7 +134,6 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo
# ZODB, ZEO, ... are similar as well
# ZODB, ZEO, ... are similar as well
if
s
in
(
'gcc'
,
'python'
,
'ZODB'
,
'ZEO'
,
'tempstorage'
,
'generic_testrunner_init'
):
if
s
in
(
'gcc'
,
'python'
,
'ZODB'
,
'ZEO'
,
'tempstorage'
,
'generic_testrunner_init'
):
continue
continue
raise
NotImplementedError
(
'%s uses %s without url'
%
(
s
,
recipe
))
raise
NotImplementedError
(
'%s uses %s without url'
%
(
s
,
recipe
))
else
:
else
:
...
...
nxdbom/nxdbom_test.py
View file @
e0437e84
...
@@ -138,6 +138,21 @@ url = http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz
...
@@ -138,6 +138,21 @@ url = http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz
GeoLite2-Country dc6224c6 http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz
GeoLite2-Country dc6224c6 http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz
"""
)
"""
)
# slapos.recipe.build from a git clone
case1
(
"""
\
[shellinabox-repository]
recipe = slapos.recipe.build:gitclone
repository = https://github.com/shellinabox/shellinabox
revision = b8285748993c4c99e80793775f3d2a0a4e962d5a
[shellinabox]
recipe = slapos.recipe.cmmi
path = ${shellinabox-repository:location}
"""
,
"""
>>> gits:
shellinabox b8285748993c4c99e80793775f3d2a0a4e962d5a https://github.com/shellinabox/shellinabox
"""
)
for
x
in
(
'gcc'
,
'python'
,
'ZODB'
,
'ZEO'
,
'tempstorage'
,
'generic_testrunner_init'
):
for
x
in
(
'gcc'
,
'python'
,
'ZODB'
,
'ZEO'
,
'tempstorage'
,
'generic_testrunner_init'
):
case1
(
"""
\
case1
(
"""
\
[%s]
[%s]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment