From 863520da5f533c56bbda93af3a17a84d1cbe9001 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Sun, 9 Aug 2020 20:52:11 +0000 Subject: [PATCH] Add dependencies to remaining makefiles --- rules/sonic-ledd.mk | 1 + rules/sonic-psud.mk | 1 + rules/sonic-py-common.mk | 3 +++ rules/sonic-syseepromd.mk | 1 + rules/sonic-utilities.mk | 2 +- rules/sonic-xcvrd.mk | 1 + rules/sonic_bgpcfgd.mk | 6 +++++- 7 files changed, 13 insertions(+), 2 deletions(-) diff --git a/rules/sonic-ledd.mk b/rules/sonic-ledd.mk index 056f0f6c9bd8..c9d66b113de2 100644 --- a/rules/sonic-ledd.mk +++ b/rules/sonic-ledd.mk @@ -2,4 +2,5 @@ SONIC_LEDD = python-sonic-ledd_1.1-1_all.deb $(SONIC_LEDD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-ledd +$(SONIC_LEDD)_WHEEL_DEPENDS = $(SONIC_PY_COMMON_PY2) SONIC_PYTHON_STDEB_DEBS += $(SONIC_LEDD) diff --git a/rules/sonic-psud.mk b/rules/sonic-psud.mk index 0249115359f3..404b18d2fe7b 100644 --- a/rules/sonic-psud.mk +++ b/rules/sonic-psud.mk @@ -2,4 +2,5 @@ SONIC_PSUD = python-sonic-psud_1.0-1_all.deb $(SONIC_PSUD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-psud +$(SONIC_PSUD)_WHEEL_DEPENDS = $(SONIC_PY_COMMON_PY2) SONIC_PYTHON_STDEB_DEBS += $(SONIC_PSUD) diff --git a/rules/sonic-py-common.mk b/rules/sonic-py-common.mk index b730ef55857b..bf42559376dc 100644 --- a/rules/sonic-py-common.mk +++ b/rules/sonic-py-common.mk @@ -11,5 +11,8 @@ SONIC_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY2) SONIC_PY_COMMON_PY3 = sonic_py_common-1.0-py3-none-any.whl $(SONIC_PY_COMMON_PY3)_SRC_PATH = $(SRC_PATH)/sonic-py-common $(SONIC_PY_COMMON_PY3)_DEPENDS += $(SWSSSDK_PY3) +# Synthetic dependency to avoid building the Python 2 and 3 packages +# # simultaneously and any potential conflicts which may arise +$(SONIC_PY_COMMON_PY3)_DEPENDS += $(SONIC_PY_COMMON_PY2) $(SONIC_PY_COMMON_PY3)_PYTHON_VERSION = 3 SONIC_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) diff --git a/rules/sonic-syseepromd.mk b/rules/sonic-syseepromd.mk index 8f7a6e5e902f..b8c68179571d 100644 --- a/rules/sonic-syseepromd.mk +++ b/rules/sonic-syseepromd.mk @@ -2,4 +2,5 @@ SONIC_SYSEEPROMD = python-sonic-syseepromd_1.0-1_all.deb $(SONIC_SYSEEPROMD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-syseepromd +$(SONIC_SYSEEPROMD)_WHEEL_DEPENDS = $(SONIC_PY_COMMON_PY2) SONIC_PYTHON_STDEB_DEBS += $(SONIC_SYSEEPROMD) diff --git a/rules/sonic-utilities.mk b/rules/sonic-utilities.mk index eba618d051dc..d6d2b5f4772f 100644 --- a/rules/sonic-utilities.mk +++ b/rules/sonic-utilities.mk @@ -12,5 +12,5 @@ SONIC_UTILS = python-sonic-utilities_1.2-1_all.deb $(SONIC_UTILS)_SRC_PATH = $(SRC_PATH)/sonic-utilities -$(SONIC_UTILS)_WHEEL_DEPENDS = $(SONIC_CONFIG_ENGINE) +$(SONIC_UTILS)_WHEEL_DEPENDS = $(SONIC_PY_COMMON_PY2) $(SONIC_CONFIG_ENGINE) SONIC_PYTHON_STDEB_DEBS += $(SONIC_UTILS) diff --git a/rules/sonic-xcvrd.mk b/rules/sonic-xcvrd.mk index b97f8dd11b79..c4b6016f1a86 100644 --- a/rules/sonic-xcvrd.mk +++ b/rules/sonic-xcvrd.mk @@ -2,4 +2,5 @@ SONIC_XCVRD = python-sonic-xcvrd_1.0-1_all.deb $(SONIC_XCVRD)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-xcvrd +$(SONIC_XCVRD)_WHEEL_DEPENDS = $(SONIC_PY_COMMON_PY2) SONIC_PYTHON_STDEB_DEBS += $(SONIC_XCVRD) diff --git a/rules/sonic_bgpcfgd.mk b/rules/sonic_bgpcfgd.mk index 650874b619c9..32abbd5af948 100644 --- a/rules/sonic_bgpcfgd.mk +++ b/rules/sonic_bgpcfgd.mk @@ -2,6 +2,10 @@ SONIC_BGPCFGD = sonic_bgpcfgd-1.0-py2-none-any.whl $(SONIC_BGPCFGD)_SRC_PATH = $(SRC_PATH)/sonic-bgpcfgd -$(SONIC_BGPCFGD)_DEPENDS += $(SWSSSDK_PY2) +# These dependencies are only needed becuase they are dependencies +# of sonic-config-engine and bgpcfgd explicitly calls sonic-cfggen +# as part of its unit tests. +# TODO: Refactor unit tests so that these dependencies are not needed +$(SONIC_BGPCFGD)_DEPENDS += $(SWSSSDK_PY2) $(SONIC_PY_COMMON_PY2) $(SONIC_BGPCFGD)_PYTHON_VERSION = 2 SONIC_PYTHON_WHEELS += $(SONIC_BGPCFGD)