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
94c89bb6
Commit
94c89bb6
authored
Jul 21, 2022
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c74b3dc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
bom
bom
+11
-2
No files found.
bom
View file @
94c89bb6
...
...
@@ -71,7 +71,8 @@ def bom_software(installed_cfg): # -> set of 'name-version' XXX
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'
]):
url
=
part
[
'url'
]
if
isconf
(
url
):
continue
# TODO binary -> parse name/ver
...
...
@@ -107,6 +108,7 @@ def bom_software(installed_cfg): # -> set of 'name-version' XXX
# XXX patches
print
(
'(%s)
\
t
%s-%s'
%
(
s
,
name
,
ver
))
bom
[
name
]
=
ver
# verify that every egg listed in zc.recipe.egg was actally insalled one way or another
...
...
@@ -145,10 +147,17 @@ def _namever(url):
return name, ver
# isconf returns whether url points to data related to configuration file (contrary to e.g. binary executable)
# isconf returns whether url points to data related to configuration file
# (contrary to binary executable), or a simple/small script.
def isconf(url):
if url.endswith('
.
conf
.
in
') or
\
url.endswith('
.
cfg
') or
\
url.endswith('
.
cfg
.
in
') or
\
url.endswith('
.
cfg
.
jinja2
.
in
') or
\
url.endswith('
.
jinja2
.
cfg
') or
\
url.endswith('
.
asn
') or
\
url.endswith('
/
ltelogs
.
jinja2
.
sh
') or
\
'
/
promise
/
' in url or
\
url.endswith('
/
templates
/
wrapper
.
in
') or
\
url.endswith('
/
logrotate_entry
.
in
') :
return True
...
...
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