Commit 94c89bb6 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c74b3dc5
...@@ -71,7 +71,8 @@ def bom_software(installed_cfg): # -> set of 'name-version' XXX ...@@ -71,7 +71,8 @@ def bom_software(installed_cfg): # -> set of 'name-version' XXX
elif recipe == 'slapos.recipe.build:download': 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 # 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 # 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 continue
# TODO binary -> parse name/ver # TODO binary -> parse name/ver
...@@ -107,6 +108,7 @@ def bom_software(installed_cfg): # -> set of 'name-version' XXX ...@@ -107,6 +108,7 @@ def bom_software(installed_cfg): # -> set of 'name-version' XXX
# XXX patches # XXX patches
print('(%s)\t%s-%s' % (s, name, ver)) 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 # verify that every egg listed in zc.recipe.egg was actally insalled one way or another
...@@ -145,10 +147,17 @@ def _namever(url): ...@@ -145,10 +147,17 @@ def _namever(url):
return name, ver 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): def isconf(url):
if url.endswith('.conf.in') or \ if url.endswith('.conf.in') or \
url.endswith('.cfg') or \
url.endswith('.cfg.in') 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('/templates/wrapper.in') or \
url.endswith('/logrotate_entry.in') : url.endswith('/logrotate_entry.in') :
return True return True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment