Skip to content

Commit 6a6a2cb

Browse files
committed
WIP
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
1 parent a7ace26 commit 6a6a2cb

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

plugins/config/_test_repository.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ projects:
2727
- name: osrf
2828
type: stable
2929
- name: ignition-transport7
30+
distributions:
31+
ubuntu:
32+
- no-existing-distro
3033
repositories:
3134
- name: osrf
3235
type: stable

plugins/repository.py

+13
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,19 @@ def process_project_install(project, config, linux_distro, dry_run=False):
216216
project_config = get_project_config(project, config)
217217
if not project_config:
218218
error('Unknown project: ' + project)
219+
220+
print(project_config)
221+
try:
222+
if linux_distro in project_config['distributions'][distro.id()]:
223+
print("FOO")
224+
print(project_config['distributions'][distro.id()])
225+
except KeyError as kerror:
226+
print(kerror)
227+
if kerror == 'distributions':
228+
pass # supported use case, no distributions defined
229+
else:
230+
warn(str(kerror))
231+
219232
if not dry_run: # useful for tests
220233
install_repos(get_repositories_config(project_config),
221234
config,

plugins/repository_TEST.py

+13
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,19 @@ def test_regexp(self):
7878

7979
class TestProjectInstall(TestBase):
8080

81+
def test_no_distributions(self):
82+
repository.process_project_install('ignition-math6',
83+
self.config,
84+
'jammy',
85+
dry_run=True)
86+
87+
def test_distributions(self):
88+
repository.process_project_install('ignition-transport7',
89+
self.config,
90+
'jammy',
91+
dry_run=True)
92+
93+
8194
def test_non_exist(self):
8295
with self.assertRaises(SystemExit):
8396
repository.process_project_install('fooooo',

0 commit comments

Comments
 (0)