From 026b50ad945722fed3a48c1a94febb5f62082b73 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Wed, 1 Apr 2020 10:04:17 -0500 Subject: python-sdbus++: remove sdbus++ executable When moving all packages over to use ${PYTHON_PN}-sdbus++ instead of the (python2-based) sdbus++ alias, I ran into frequent problems where BOTH python-sdbus++ and python3-sdbus++ were in the DEPEND-chain. When this happens, bitbake is upset because both packages install the sdbus++ executable. (Both are in the DEPEND-chain because some packages have transitioned to python3 and some have not.) There are two reasons someone might depend on the python-sdbus++-native package: 1. They need to use the sdbus++ executable to generate code. 2. They wrote their own scripts leveraging sdbus++'s module. For #1, we can force everyone to use the python3 varient by adding a DEPEND on python3-sdbus++-native and then removing sdbus++ (the executable). This will continue to install the python modules for #2. (From meta-phosphor rev: 737cd1accac2d00d9adfaced667da81e6207c66b) Signed-off-by: Patrick Williams Change-Id: Ia1c8697ecc36dffdc52b3e7206e428f8112e4ed2 Signed-off-by: Andrew Geissler --- meta-phosphor/recipes-extended/sdbusplus/python-sdbus++_git.bb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta-phosphor/recipes-extended/sdbusplus/python-sdbus++_git.bb b/meta-phosphor/recipes-extended/sdbusplus/python-sdbus++_git.bb index 7bb0198a5..de4d6ba41 100644 --- a/meta-phosphor/recipes-extended/sdbusplus/python-sdbus++_git.bb +++ b/meta-phosphor/recipes-extended/sdbusplus/python-sdbus++_git.bb @@ -7,3 +7,12 @@ SRC_URI += "file://0001-Revert-sdbus-switch-to-python3.patch" # new package name. PROVIDES_class-native += "sdbusplus-native sdbus++-native" PROVIDES_class-nativesdk += "sdbusplus-nativesdk sdbus++-nativesdk" + +# If anyone wanted the sdbus++ executable, make them use the python3 version. +# This avoids issues where both packages attempt to install the executable +# into /usr/bin. +DEPENDS += "python3-sdbus++-native" +do_install_append() { + rm ${D}${bindir}/sdbus++ + rmdir ${D}${bindir} || true +} -- cgit v1.2.3