From 1b5678334556982d3358678ab5f0bdd653b4ff08 Mon Sep 17 00:00:00 2001 From: crouzet Date: Mon, 17 May 2021 15:05:29 +0200 Subject: [PATCH] =?utf8?q?int=C3=A9gration=20patch=20quentin=20spns=20#241?= =?utf8?q?13=20pour=20plus=20de=20souplesse=20dans=20la=20d=C3=A9finition?= =?utf8?q?=20des=20paquets=20natifs?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/product.py | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/product.py b/src/product.py index bbeeffa..4c72a43 100644 --- a/src/product.py +++ b/src/product.py @@ -1229,11 +1229,15 @@ def check_system_dep(distrib, check_cmd, product_info): """ runtime_dep={} build_dep={} + if "system_info" in product_info: - if distrib in product_info.system_info: - sysinfo=product_info.system_info[distrib] - else: - sysinfo=product_info.system_info + + sysinfo=product_info.system_info + additional_sysinfo = None + + for key in sysinfo : + if distrib in key : + additional_sysinfo = sysinfo[key] if check_cmd[0]=="rpm": if "rpm" in sysinfo: @@ -1242,6 +1246,13 @@ def check_system_dep(distrib, check_cmd, product_info): if "rpm_dev" in sysinfo: for pkg in sysinfo.rpm_dev: build_dep[pkg]=src.system.check_system_pkg(check_cmd,pkg) + if additional_sysinfo : + if "rpm" in additional_sysinfo: + for pkg in additional_sysinfo.rpm: + runtime_dep[pkg]=src.system.check_system_pkg(check_cmd,pkg) + if "rpm_dev" in additional_sysinfo: + for pkg in additional_sysinfo.rpm_dev: + build_dep[pkg]=src.system.check_system_pkg(check_cmd,pkg) if check_cmd[0]=="apt": if "apt" in sysinfo: for pkg in sysinfo.apt: @@ -1249,6 +1260,14 @@ def check_system_dep(distrib, check_cmd, product_info): if "apt_dev" in sysinfo: for pkg in sysinfo.apt_dev: build_dep[pkg]=src.system.check_system_pkg(check_cmd,pkg) + if additional_sysinfo : + if "apt" in additional_sysinfo: + for pkg in additional_sysinfo.apt: + runtime_dep[pkg]=src.system.check_system_pkg(check_cmd,pkg) + if "apt_dev" in additional_sysinfo: + for pkg in additional_sysinfo.apt_dev: + build_dep[pkg]=src.system.check_system_pkg(check_cmd,pkg) + return runtime_dep,build_dep -- 2.39.2