summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2019-02-06 08:28:59 -0500
committerGunnar Mills <gmills@us.ibm.com>2019-02-12 15:46:58 +0000
commit20d70b14d24fcb46bb6d7ac25a092c84f912a91d (patch)
treef81027c8fd677c3a6307b37e621acf657198c9af
parent876953d31a48164a8dc513a238f02abefeb77303 (diff)
downloadopenbmc-docs-20d70b14d24fcb46bb6d7ac25a092c84f912a91d.tar.gz
openbmc-docs-20d70b14d24fcb46bb6d7ac25a092c84f912a91d.zip
anti-patterns: explicit shared lib dependencies
Out of the box bitbake examines built applications, automatically adds runtime dependencies and thus ensures any library packages dependencies are automatically added to images, sdks, etc. There is no need to list them explicitly in a recipe. Change-Id: Ia19805546eb5808afebbc757e4ca36c562109075 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
-rw-r--r--anti-patterns.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/anti-patterns.md b/anti-patterns.md
index ab9ab0f..bdad52c 100644
--- a/anti-patterns.md
+++ b/anti-patterns.md
@@ -41,3 +41,34 @@ thought). If you are unable to determine why the anti-pattern exists, put:
anti-pattern and the positive effects of solving it in the manner described.
<!-- end copy/paste on previous line -->
+
+## Explicit listing of shared library packages in RDEPENDS in bitbake metadata
+
+### Identification
+```
+RDEPENDS_${PN} = "libsystemd"
+```
+
+### Description
+Out of the box bitbake examines built applications, automatically adds runtime
+dependencies and thus ensures any library packages dependencies are
+automatically added to images, sdks, etc. There is no need to list them
+explicitly in a recipe.
+
+Dependencies change over time, and listing them explicitly is likely prone to
+errors - the net effect being unnecessary shared library packages being
+installed into images.
+
+Consult
+https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-RDEPENDS
+for information on when to use explicit runtime dependencies.
+
+### Background
+The initial bitbake metadata author for OpenBMC was not aware that bitbake
+added these dependencies automatically. Initial bitbake metadata therefore
+listed shared library dependencies explicitly, and was subsequently copy pasted.
+
+### Resolution
+Do not list shared library packages in RDEPENDS. This eliminates the
+possibility of installing unnecessary shared library packages due to
+unmaintained library dependency lists in bitbake metadata.
OpenPOWER on IntegriCloud