diff --git a/HISTORY.rst b/HISTORY.rst index f62db6cd..8ef422a1 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -22,6 +22,7 @@ test-driven methodologies, and modern toolchains for unrivaled success. ~~~~~~~~~~~~~~~~~~~ * Added support for ``tar.xz`` tarball dependencies (`pull #4974 `_) +* Ensured that dependencies of private libraries are no longer unnecessarily re-installed, optimizing dependency management and reducing redundant operations (`issue #4987 `_) * Resolved an issue where the ``compiledb`` target failed to properly escape compiler executable paths containing spaces (`issue #4998 `_) * Resolved an issue with incorrect path resolution when linking static libraries via the `build_flags `__ option (`issue #5004 `_) diff --git a/platformio/package/commands/install.py b/platformio/package/commands/install.py index 8c987c17..675c229c 100644 --- a/platformio/package/commands/install.py +++ b/platformio/package/commands/install.py @@ -297,7 +297,11 @@ def _install_project_private_library_deps(private_pkg, private_lm, env_lm, optio if not spec.external and not spec.owner: continue pkg = private_lm.get_package(spec) - if not pkg and not env_lm.get_package(spec): + if ( + not pkg + and not private_lm.get_package(spec) + and not env_lm.get_package(spec) + ): pkg = env_lm.install( spec, skip_dependencies=True,