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
Kirill Smelkov
nxd-bom
Commits
c74b3dc5
Commit
c74b3dc5
authored
Jul 21, 2022
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f2d5abea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
bom
bom
+31
-0
No files found.
bom
View file @
c74b3dc5
...
...
@@ -68,6 +68,28 @@ def bom_software(installed_cfg): # -> set of 'name-version' XXX
else
:
name
,
ver
=
namever
(
url
)
elif
recipe
==
'slapos.recipe.build:download'
:
# slapos.recipe.build:download is often used to download .conf files, but sometimes it is used to download e.g. binaries
# skip the part, if we can detect that downloaded item is a configuration file
if
isconf
(
part
[
'url'
]):
continue
# TODO binary -> parse name/ver
raise
NotImplementedError
(
'%s uses %s with url that does not look like a .conf file: %s'
%
(
s
,
recipe
,
url
))
elif
recipe
.
startswith
(
'slapos.recipe.template'
):
url
=
part
.
get
(
'url'
,
None
)
if
url
is
not
None
:
if
isconf
(
part
[
'url'
]):
continue
# NOTE binary is not expected with slapos.recipe.template
raise
ValueError
(
'%s uses %s with url that does not look like a .conf file: %s'
%
(
s
,
recipe
,
url
))
else
:
# it is an inline= script
assert
'inline'
in
part
,
part
elif
recipe
==
'zc.recipe.egg:custom'
:
eggpath
=
part
[
'__buildout_installed__'
]
assert
len
(
eggpath
.
split
())
==
1
,
eggpath
# no spaces inside - just one item
...
...
@@ -123,6 +145,15 @@ def _namever(url):
return name, ver
# isconf returns whether url points to data related to configuration file (contrary to e.g. binary executable)
def isconf(url):
if url.endswith('
.
conf
.
in
') or
\
url.endswith('
.
cfg
.
in
') or
\
url.endswith('
/
templates
/
wrapper
.
in
') or
\
url.endswith('
/
logrotate_entry
.
in
') :
return True
return False
# ----------------------------------------
def main():
...
...
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