From 4705dd264681d908f144dd4d9bf1f6175f68d8b9 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Fri, 24 Jun 2022 16:31:04 +0100 Subject: package_manager: Change complementary package handling to not include soft dependencies We've some long standing bugs where the RDEPENDS from -dev packages causes problems, e.g. dropbear and openssh components on an image working fine together but then the SDK failing to build as the main openssh and dropbear packages conflict with each other (pulled in by openssh-dev and dropbear-dev). We propose changing the behavour of complementary package installation to ignore RRECOMMENDS. If we then change the ${PN}-dev dependency on ${PN} to a RRECOMMENDS, we can avoid many of the issues people run into yet still have the desired behaviour of ${PN}-dev pulling in ${PN}. This therefore changes the package manager code so that it doesn't follow RRECOMMENDS for completementary package globs. [RP: Added deb support] (From OE-Core rev: b44b0b9294675f89aa51ff84f532664f4c479677) Signed-off-by: Richard Purdie --- meta/lib/oe/package_manager/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta/lib/oe/package_manager/__init__.py') diff --git a/meta/lib/oe/package_manager/__init__.py b/meta/lib/oe/package_manager/__init__.py index 80bc1a6bc6..d3b45705ec 100644 --- a/meta/lib/oe/package_manager/__init__.py +++ b/meta/lib/oe/package_manager/__init__.py @@ -266,7 +266,7 @@ class PackageManager(object, metaclass=ABCMeta): pass @abstractmethod - def install(self, pkgs, attempt_only=False): + def install(self, pkgs, attempt_only=False, hard_depends_only=False): """ Install a list of packages. 'pkgs' is a list object. If 'attempt_only' is True, installation failures are ignored. @@ -396,7 +396,7 @@ class PackageManager(object, metaclass=ABCMeta): bb.note("Installing complementary packages ... %s (skipped already provided packages %s)" % ( ' '.join(install_pkgs), ' '.join(skip_pkgs))) - self.install(install_pkgs) + self.install(install_pkgs, hard_depends_only=True) except subprocess.CalledProcessError as e: bb.fatal("Could not compute complementary packages list. Command " "'%s' returned %d:\n%s" % -- cgit v1.2.3-54-g00ecf