mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
projects.py: Take install deps from all packages
Not taking install dependencies from pkg.required.jw alone anymore, but from all sections of the section cascade. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
562ee5fc49
commit
c1e41fa772
1 changed files with 31 additions and 27 deletions
|
|
@ -363,35 +363,39 @@ def cmd_pkg_requires(args_):
|
|||
args=parser.parse_args(args_)
|
||||
debug('flavour = ', args.flavour, ', vendor = ', args.vendor)
|
||||
version_pattern=re.compile("[0-9-.]*")
|
||||
subsecs = pkg_required_os_cascade()
|
||||
subsecs.append('jw')
|
||||
debug("subsecs = ", subsecs)
|
||||
r = []
|
||||
for m in args.module:
|
||||
value = get_value(m, 'pkg.required.jw', args.flavour)
|
||||
if not value:
|
||||
continue
|
||||
deps = value.split(',')
|
||||
for spec in deps:
|
||||
dep = re.split('([=><]+)', spec)
|
||||
for i, item in enumerate(dep):
|
||||
dep[i] = item.strip()
|
||||
if len(dep) == 3:
|
||||
dep_project = re.sub(r'-devel$|-run$', '', dep[0])
|
||||
if args.dont_expand_version_macros and dep_project in args.module:
|
||||
version = dep[2]
|
||||
else:
|
||||
version = get_value(dep_project, 'version', '')
|
||||
if dep[2] == 'VERSION':
|
||||
if args.dont_strip_revision:
|
||||
dep[2] = version
|
||||
for s in subsecs:
|
||||
for m in args.module:
|
||||
value = get_value(m, 'pkg.required.' + s, args.flavour)
|
||||
if not value:
|
||||
continue
|
||||
deps = value.split(',')
|
||||
for spec in deps:
|
||||
dep = re.split('([=><]+)', spec)
|
||||
for i, item in enumerate(dep):
|
||||
dep[i] = item.strip()
|
||||
if len(dep) == 3:
|
||||
dep_project = re.sub(r'-devel$|-run$', '', dep[0])
|
||||
if args.dont_expand_version_macros and dep_project in args.module:
|
||||
version = dep[2]
|
||||
else:
|
||||
dep[2] = version.split('-')[0]
|
||||
elif dep[2] == 'VERSION-REVISION':
|
||||
dep[2] = version
|
||||
elif version_pattern.match(dep[2]):
|
||||
# dep[2] = dep[2]
|
||||
pass
|
||||
else:
|
||||
raise Exception("Unknown version specifier in " + spec)
|
||||
r.append(' '.join(dep))
|
||||
version = get_value(dep_project, 'version', '')
|
||||
if dep[2] == 'VERSION':
|
||||
if args.dont_strip_revision:
|
||||
dep[2] = version
|
||||
else:
|
||||
dep[2] = version.split('-')[0]
|
||||
elif dep[2] == 'VERSION-REVISION':
|
||||
dep[2] = version
|
||||
elif version_pattern.match(dep[2]):
|
||||
# dep[2] = dep[2]
|
||||
pass
|
||||
else:
|
||||
raise Exception("Unknown version specifier in " + spec)
|
||||
r.append(' '.join(dep))
|
||||
print(', '.join(r))
|
||||
|
||||
def cmd_proj_dir(args_):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue