mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-25 07:00:39 +01:00
projects.py, pkg_relations(): Fix --no-subpackages, support multiple flavours
- --no-subpackages sometimes doesn\'t strip off -devel -run - Flavours can now be comma-separated Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
0b80649f59
commit
d8115e6b22
1 changed files with 35 additions and 32 deletions
|
|
@ -484,9 +484,11 @@ def pkg_relations(rel_type, args_):
|
||||||
subsecs = args.subsections.split(',')
|
subsecs = args.subsections.split(',')
|
||||||
debug('flavour = ', args.flavour, ', subsecs = ', ' '.join(subsecs))
|
debug('flavour = ', args.flavour, ', subsecs = ', ' '.join(subsecs))
|
||||||
r = []
|
r = []
|
||||||
|
flavours = args.flavour.split(',')
|
||||||
|
for flavour in flavours:
|
||||||
for s in subsecs:
|
for s in subsecs:
|
||||||
for m in args.module:
|
for m in args.module:
|
||||||
value = get_value(m, 'pkg.' + rel_type + '.' + s, args.flavour)
|
value = get_value(m, 'pkg.' + rel_type + '.' + s, flavour)
|
||||||
if not value:
|
if not value:
|
||||||
continue
|
continue
|
||||||
deps = value.split(',')
|
deps = value.split(',')
|
||||||
|
|
@ -494,6 +496,7 @@ def pkg_relations(rel_type, args_):
|
||||||
dep = re.split('([=><]+)', spec)
|
dep = re.split('([=><]+)', spec)
|
||||||
if args.no_version:
|
if args.no_version:
|
||||||
dep = dep[:1]
|
dep = dep[:1]
|
||||||
|
dep = map(str.strip, dep)
|
||||||
if args.no_subpackages:
|
if args.no_subpackages:
|
||||||
dep[0] = re.sub('-devel$|-run$', '', dep[0])
|
dep[0] = re.sub('-devel$|-run$', '', dep[0])
|
||||||
for i, item in enumerate(dep):
|
for i, item in enumerate(dep):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue