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
Levin Zimmermann
nxd-bom
Commits
44274bf8
Commit
44274bf8
authored
Jun 05, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for collective.recipe.template
Occurs in SlapOS-node.
parent
8c2c7dee
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
nxdbom/__init__.py
nxdbom/__init__.py
+6
-2
nxdbom/nxdbom_test.py
nxdbom/nxdbom_test.py
+6
-0
No files found.
nxdbom/__init__.py
View file @
44274bf8
...
...
@@ -153,7 +153,8 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo
raise
NotImplementedError
(
'%s uses %s with url that does not look like a .conf, archive or SR file: %s'
%
(
s
,
recipe
,
url
))
elif
recipe
.
startswith
(
'slapos.recipe.template'
):
elif
recipe
.
startswith
(
'slapos.recipe.template'
)
or
\
recipe
==
'collective.recipe.template'
:
url
=
geturl
(
part
,
None
)
if
url
is
not
None
:
if
isconf
(
url
):
...
...
@@ -162,7 +163,10 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo
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
if
recipe
.
startswith
(
'slapos'
):
assert
'inline'
in
part
,
part
else
:
# collective...
assert
part
[
'input'
].
startswith
(
'inline:'
)
elif
recipe
in
(
'zc.recipe.egg:custom'
,
'zc.recipe.egg:develop'
):
...
...
nxdbom/nxdbom_test.py
View file @
44274bf8
...
...
@@ -142,6 +142,12 @@ recipe = slapos.recipe.template:jinja2
url = /srv/slapgrid/slappart47/srv/project/slapos/stack/logrotate/instance-logrotate-base.cfg.in
"""
,
''
)
# config ignored
case1
(
"""
\
[cfg-environment]
recipe = collective.recipe.template
input = inline: zzz
"""
,
''
)
# inline ignore
case1
(
"""
\
[neoppod-develop]
...
...
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