From 34d277d80f52af7abac0adb19001daab0f48252c Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Mon, 17 Oct 2022 18:49:34 +0200 Subject: [PATCH] src/risotto/image.py: display depends if failed --- src/risotto/image.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/risotto/image.py b/src/risotto/image.py index fadd9d3..1f16bd5 100644 --- a/src/risotto/image.py +++ b/src/risotto/image.py @@ -163,8 +163,8 @@ def load_applicationservice(appname: str, suppliers.setdefault(supplier, []) if appname not in suppliers[supplier]: suppliers[supplier].append(appname) - if 'distribution' in app: - distribution = app['distribution'] + if 'distribution' in app and app['distribution']: + distribution = appname else: distribution = None for xml in app.get('depends', []): @@ -181,7 +181,7 @@ def load_applicationservice(appname: str, ) if ret: if distribution: - raise Exception(f'duplicate distribution for {cfg.module_name} ({distribution} and {ret})') + raise Exception(f'duplicate distribution for {cfg.module_name}: {distribution} and {ret} (dependencies: {cfg.depends}) ') distribution = ret return distribution @@ -209,7 +209,7 @@ def load_image_informations(module_name: str, ) if ret: if distribution: - raise Exception(f'duplicate distribution for {cfg.module_name} ({distribution} and {ret})') + raise Exception(f'duplicate distribution for {cfg.module_name}: {distribution} and {ret} (dependencies: {cfg.depends}) ') distribution = ret if module_name != 'host' and not distribution: raise Exception(f'cannot found any linux distribution for {module_name}')