mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-22 22:20: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,39 +484,42 @@ 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 = []
|
||||||
for s in subsecs:
|
flavours = args.flavour.split(',')
|
||||||
for m in args.module:
|
for flavour in flavours:
|
||||||
value = get_value(m, 'pkg.' + rel_type + '.' + s, args.flavour)
|
for s in subsecs:
|
||||||
if not value:
|
for m in args.module:
|
||||||
continue
|
value = get_value(m, 'pkg.' + rel_type + '.' + s, flavour)
|
||||||
deps = value.split(',')
|
if not value:
|
||||||
for spec in deps:
|
continue
|
||||||
dep = re.split('([=><]+)', spec)
|
deps = value.split(',')
|
||||||
if args.no_version:
|
for spec in deps:
|
||||||
dep = dep[:1]
|
dep = re.split('([=><]+)', spec)
|
||||||
if args.no_subpackages:
|
if args.no_version:
|
||||||
dep[0] = re.sub('-devel$|-run$', '', dep[0])
|
dep = dep[:1]
|
||||||
for i, item in enumerate(dep):
|
dep = map(str.strip, dep)
|
||||||
dep[i] = item.strip()
|
if args.no_subpackages:
|
||||||
if len(dep) == 3:
|
dep[0] = re.sub('-devel$|-run$', '', dep[0])
|
||||||
dep_project = re.sub(r'-devel$|-run$', '', dep[0])
|
for i, item in enumerate(dep):
|
||||||
if args.dont_expand_version_macros and dep_project in args.module:
|
dep[i] = item.strip()
|
||||||
version = dep[2]
|
if len(dep) == 3:
|
||||||
else:
|
dep_project = re.sub(r'-devel$|-run$', '', dep[0])
|
||||||
version = get_value(dep_project, 'version', '')
|
if args.dont_expand_version_macros and dep_project in args.module:
|
||||||
if dep[2] == 'VERSION':
|
version = dep[2]
|
||||||
if args.dont_strip_revision:
|
|
||||||
dep[2] = version
|
|
||||||
else:
|
else:
|
||||||
dep[2] = version.split('-')[0]
|
version = get_value(dep_project, 'version', '')
|
||||||
elif dep[2] == 'VERSION-REVISION':
|
if dep[2] == 'VERSION':
|
||||||
dep[2] = version
|
if args.dont_strip_revision:
|
||||||
elif version_pattern.match(dep[2]):
|
dep[2] = version
|
||||||
# dep[2] = dep[2]
|
else:
|
||||||
pass
|
dep[2] = version.split('-')[0]
|
||||||
else:
|
elif dep[2] == 'VERSION-REVISION':
|
||||||
raise Exception("Unknown version specifier in " + spec)
|
dep[2] = version
|
||||||
r.append(' '.join(dep))
|
elif version_pattern.match(dep[2]):
|
||||||
|
# dep[2] = dep[2]
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
raise Exception("Unknown version specifier in " + spec)
|
||||||
|
r.append(' '.join(dep))
|
||||||
print(args.delimiter.join(r))
|
print(args.delimiter.join(r))
|
||||||
|
|
||||||
def get_libname(names):
|
def get_libname(names):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue