From e51345b50784572602a09a233b9d6f4847fe1f16 Mon Sep 17 00:00:00 2001 From: Fredrik Gustafsson Date: Tue, 8 Sep 2020 12:53:07 +0200 Subject: package management: Allow dynamic loading of PM Dynamic loading of package managers will allow other layers to simply add their package manager code in package_manager/ and have bitbake find it according to the package manager configuration. This is useful for adding new (faster) package managers to Open Embedded while not increasing the test scope or require Open Embedded to support more package managers. How this is tested: * Build core-image-minimal with all three package managers * Build the sdk with all three package managers. dpkg fails, but it fails on master as well. * Run the complete test suite, all tests passed except 16 * Run those 16 tests on master and verify that they fail there as well * Fix errors making tests works on master but not with this patch. (From OE-Core rev: 02670501dea192879ddf9f8048eea57a94719fc1) Signed-off-by: Fredrik Gustafsson Signed-off-by: Richard Purdie --- meta/lib/oe/package_manager/ipk/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'meta/lib/oe/package_manager/ipk/__init__.py') diff --git a/meta/lib/oe/package_manager/ipk/__init__.py b/meta/lib/oe/package_manager/ipk/__init__.py index 9603993a59..416ed23d47 100644 --- a/meta/lib/oe/package_manager/ipk/__init__.py +++ b/meta/lib/oe/package_manager/ipk/__init__.py @@ -59,9 +59,10 @@ class OpkgIndexer(Indexer): self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE'), armor=is_ascii_sig) -class OpkgPkgsList(PkgsList): - def __init__(self, d, rootfs_dir, config_file): - super(OpkgPkgsList, self).__init__(d, rootfs_dir) +class PMPkgsList(PkgsList): + def __init__(self, d, rootfs_dir): + super(PMPkgsList, self).__init__(d, rootfs_dir) + config_file = d.getVar("IPKGCONF_TARGET") self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg") self.opkg_args = "-f %s -o %s " % (config_file, rootfs_dir) @@ -416,7 +417,7 @@ class OpkgPM(OpkgDpkgPM): bb.utils.remove(os.path.join(self.opkg_dir, "lists"), True) def list_installed(self): - return OpkgPkgsList(self.d, self.target_rootfs, self.config_file).list_pkgs() + return PMPkgsList(self.d, self.target_rootfs).list_pkgs() def dummy_install(self, pkgs): """ -- cgit v1.2.3-54-g00ecf