diff --git a/scripts/projects.py b/scripts/projects.py index fc4e1451..01b1f3ed 100644 --- a/scripts/projects.py +++ b/scripts/projects.py @@ -484,39 +484,42 @@ def pkg_relations(rel_type, args_): subsecs = args.subsections.split(',') debug('flavour = ', args.flavour, ', subsecs = ', ' '.join(subsecs)) r = [] - for s in subsecs: - for m in args.module: - value = get_value(m, 'pkg.' + rel_type + '.' + s, args.flavour) - if not value: - continue - deps = value.split(',') - for spec in deps: - dep = re.split('([=><]+)', spec) - if args.no_version: - dep = dep[:1] - if args.no_subpackages: - dep[0] = re.sub('-devel$|-run$', '', dep[0]) - 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 + flavours = args.flavour.split(',') + for flavour in flavours: + for s in subsecs: + for m in args.module: + value = get_value(m, 'pkg.' + rel_type + '.' + s, flavour) + if not value: + continue + deps = value.split(',') + for spec in deps: + dep = re.split('([=><]+)', spec) + if args.no_version: + dep = dep[:1] + dep = map(str.strip, dep) + if args.no_subpackages: + dep[0] = re.sub('-devel$|-run$', '', dep[0]) + 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(args.delimiter.join(r)) def get_libname(names):