1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-13 07:56:14 +01:00

Identify inherited packages in the 'dependson' command output

This commit is contained in:
Daniel Mach 2023-04-28 09:30:38 +02:00
parent 0ea0015ca1
commit a08ab2ef18

View File

@ -6475,6 +6475,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
This is no guarantee, since the new build might have changed dependencies. This is no guarantee, since the new build might have changed dependencies.
The packages marked with the [i] flag are inherited to the project.
The arguments REPOSITORY and ARCH can be taken from the first two columns The arguments REPOSITORY and ARCH can be taken from the first two columns
of the 'osc repos' output. of the 'osc repos' output.
@ -6519,13 +6521,15 @@ Please submit there instead, or use --nodevelproject to force direct submission.
repository = args[2] repository = args[2]
arch = args[3] arch = args[3]
project_packages = meta_get_packagelist(apiurl, project, deleted=False, expand=False)
xml = get_dependson(apiurl, project, repository, arch, packages, reverse) xml = get_dependson(apiurl, project, repository, arch, packages, reverse)
root = ET.fromstring(xml) root = ET.fromstring(xml)
for package in root.findall('package'): for package in root.findall('package'):
print(package.get('name'), ":") print(package.get('name'), ":")
for dep in package.findall('pkgdep'): for dep in package.findall('pkgdep'):
print(" ", dep.text) inherited = " " if dep.text in project_packages else "[i]"
print(f" {inherited} {dep.text}")
@cmdln.option('--alternative-project', metavar='PROJECT', @cmdln.option('--alternative-project', metavar='PROJECT',
help='specify the build target project') help='specify the build target project')