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

Merge pull request #1310 from dmach/dependson-identify-inherited-packages

Identify inherited packages in the 'dependson' command output
This commit is contained in:
Daniel Mach 2023-04-28 11:23:51 +02:00 committed by GitHub
commit 426f2102ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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.
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
of the 'osc repos' output.
@ -6519,13 +6521,15 @@ Please submit there instead, or use --nodevelproject to force direct submission.
repository = args[2]
arch = args[3]
project_packages = meta_get_packagelist(apiurl, project, deleted=False, expand=False)
xml = get_dependson(apiurl, project, repository, arch, packages, reverse)
root = ET.fromstring(xml)
for package in root.findall('package'):
print(package.get('name'), ":")
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',
help='specify the build target project')