Commit 8c2d871f authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Make it possible to get the dependencies of several projects in one call

parent ecd08677
......@@ -6,9 +6,10 @@ from helperslib import BuildSpecs, CommonUtils, Buildable, Packages
# Parse the command line arguments we've been given
parser = argparse.ArgumentParser(description='Utility to execute tests for a build.', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--project', type=str, required=True)
parser.add_argument('--branchGroup', type=str, default='kf5-qt5')
parser.add_argument('--platform', type=str, required=True)
parser.add_argument('--withProject', action='store_true', help="include the requested project in the list")
parser.add_argument('projects', nargs='+', help='projects to see the dependencies from', type=str)
arguments = parser.parse_args()
# Initialise the dependnecy resolver
......@@ -41,10 +42,14 @@ dependenciesFile = os.path.join( CommonUtils.scriptsBaseDirectory(), 'local-meta
if os.path.exists( dependenciesFile ):
resolver.loadDependenciesFromFile( dependenciesFile )
# Now that we are all initialised, we can ask the resolver for the project we represent, then resolve it's dependencies
resolverProject = resolver.retrieveProject( arguments.project )
projectDependencies = resolver.forProject( resolverProject, arguments.platform )
projectsDependencies = []
for project in arguments.projects:
# Now that we are all initialised, we can ask the resolver for the project we represent, then resolve it's dependencies
resolverProject = resolver.retrieveProject( project )
projectsDependencies.extend(resolver.forProject( resolverProject, arguments.platform ))
if arguments.withProject and not resolverProject.virtualDependency:
projectsDependencies.append(resolverProject)
# Iterate over them and print details
for project in projectDependencies:
for project in resolver.unique(projectsDependencies):
print( project.name )
......@@ -15,7 +15,7 @@ git clone kde:kde-build-metadata || true
cd ..
# we figure out the dependencies
all_packages=$(python3 ci-tooling/helpers/list-dependencies.py --project $package --platform AndroidQt5.9)
all_packages=$(python3 ci-tooling/helpers/list-dependencies.py $package --platform AndroidQt5.9)
echo "Dependencies to build: $all_packages"
blacklist="extra-cmake-modules $package"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment