diff options
| author | Fredrik Gustafsson <fredrik.gustafsson@axis.com> | 2020-09-08 12:53:07 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-11-24 15:53:07 +0000 |
| commit | e51345b50784572602a09a233b9d6f4847fe1f16 (patch) | |
| tree | d65d4d5d4e06f3d0a014a634c03ced594d6c1dc7 /meta/lib/oe/package_manager/rpm | |
| parent | 8c28435258ea28dadbbbe9506beae700c226c379 (diff) | |
| download | poky-e51345b50784572602a09a233b9d6f4847fe1f16.tar.gz | |
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 <fredrigu@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/package_manager/rpm')
| -rw-r--r-- | meta/lib/oe/package_manager/rpm/__init__.py | 2 | ||||
| -rw-r--r-- | meta/lib/oe/package_manager/rpm/manifest.py | 2 | ||||
| -rw-r--r-- | meta/lib/oe/package_manager/rpm/rootfs.py | 8 | ||||
| -rw-r--r-- | meta/lib/oe/package_manager/rpm/sdk.py | 10 |
4 files changed, 11 insertions, 11 deletions
diff --git a/meta/lib/oe/package_manager/rpm/__init__.py b/meta/lib/oe/package_manager/rpm/__init__.py index c91f61ae5c..898184442f 100644 --- a/meta/lib/oe/package_manager/rpm/__init__.py +++ b/meta/lib/oe/package_manager/rpm/__init__.py | |||
| @@ -43,7 +43,7 @@ class RpmSubdirIndexer(RpmIndexer): | |||
| 43 | self.do_write_index(dir_path) | 43 | self.do_write_index(dir_path) |
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | class RpmPkgsList(PkgsList): | 46 | class PMPkgsList(PkgsList): |
| 47 | def list_pkgs(self): | 47 | def list_pkgs(self): |
| 48 | return RpmPM(self.d, self.rootfs_dir, self.d.getVar('TARGET_VENDOR'), needfeed=False).list_installed() | 48 | return RpmPM(self.d, self.rootfs_dir, self.d.getVar('TARGET_VENDOR'), needfeed=False).list_installed() |
| 49 | 49 | ||
diff --git a/meta/lib/oe/package_manager/rpm/manifest.py b/meta/lib/oe/package_manager/rpm/manifest.py index a75f6bdabf..e6604b301f 100644 --- a/meta/lib/oe/package_manager/rpm/manifest.py +++ b/meta/lib/oe/package_manager/rpm/manifest.py | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | from oe.manifest import Manifest | 5 | from oe.manifest import Manifest |
| 6 | 6 | ||
| 7 | class RpmManifest(Manifest): | 7 | class PkgManifest(Manifest): |
| 8 | """ | 8 | """ |
| 9 | Returns a dictionary object with mip and mlp packages. | 9 | Returns a dictionary object with mip and mlp packages. |
| 10 | """ | 10 | """ |
diff --git a/meta/lib/oe/package_manager/rpm/rootfs.py b/meta/lib/oe/package_manager/rpm/rootfs.py index 2de5752b91..00d07cd9cc 100644 --- a/meta/lib/oe/package_manager/rpm/rootfs.py +++ b/meta/lib/oe/package_manager/rpm/rootfs.py | |||
| @@ -5,17 +5,17 @@ | |||
| 5 | from oe.rootfs import Rootfs | 5 | from oe.rootfs import Rootfs |
| 6 | from oe.manifest import Manifest | 6 | from oe.manifest import Manifest |
| 7 | from oe.utils import execute_pre_post_process | 7 | from oe.utils import execute_pre_post_process |
| 8 | from oe.package_manager.rpm.manifest import RpmManifest | 8 | from oe.package_manager.rpm.manifest import PkgManifest |
| 9 | from oe.package_manager.rpm import RpmPM | 9 | from oe.package_manager.rpm import RpmPM |
| 10 | 10 | ||
| 11 | class RpmRootfs(Rootfs): | 11 | class PkgRootfs(Rootfs): |
| 12 | def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None): | 12 | def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None): |
| 13 | super(RpmRootfs, self).__init__(d, progress_reporter, logcatcher) | 13 | super(PkgRootfs, self).__init__(d, progress_reporter, logcatcher) |
| 14 | self.log_check_regex = r'(unpacking of archive failed|Cannot find package'\ | 14 | self.log_check_regex = r'(unpacking of archive failed|Cannot find package'\ |
| 15 | r'|exit 1|ERROR: |Error: |Error |ERROR '\ | 15 | r'|exit 1|ERROR: |Error: |Error |ERROR '\ |
| 16 | r'|Failed |Failed: |Failed$|Failed\(\d+\):)' | 16 | r'|Failed |Failed: |Failed$|Failed\(\d+\):)' |
| 17 | 17 | ||
| 18 | self.manifest = RpmManifest(d, manifest_dir) | 18 | self.manifest = PkgManifest(d, manifest_dir) |
| 19 | 19 | ||
| 20 | self.pm = RpmPM(d, | 20 | self.pm = RpmPM(d, |
| 21 | d.getVar('IMAGE_ROOTFS'), | 21 | d.getVar('IMAGE_ROOTFS'), |
diff --git a/meta/lib/oe/package_manager/rpm/sdk.py b/meta/lib/oe/package_manager/rpm/sdk.py index b14b155a85..c5f232431f 100644 --- a/meta/lib/oe/package_manager/rpm/sdk.py +++ b/meta/lib/oe/package_manager/rpm/sdk.py | |||
| @@ -6,16 +6,16 @@ import glob | |||
| 6 | from oe.utils import execute_pre_post_process | 6 | from oe.utils import execute_pre_post_process |
| 7 | from oe.sdk import Sdk | 7 | from oe.sdk import Sdk |
| 8 | from oe.manifest import Manifest | 8 | from oe.manifest import Manifest |
| 9 | from oe.package_manager.rpm.manifest import PkgManifest | ||
| 9 | from oe.package_manager.rpm import RpmPM | 10 | from oe.package_manager.rpm import RpmPM |
| 10 | 11 | ||
| 11 | class RpmSdk(Sdk): | 12 | class PkgSdk(Sdk): |
| 12 | def __init__(self, d, manifest_dir=None, rpm_workdir="oe-sdk-repo"): | 13 | def __init__(self, d, manifest_dir=None, rpm_workdir="oe-sdk-repo"): |
| 13 | super(RpmSdk, self).__init__(d, manifest_dir) | 14 | super(PkgSdk, self).__init__(d, manifest_dir) |
| 14 | 15 | ||
| 15 | from oe.package_manager.rpm.manifest import RpmManifest | 16 | self.target_manifest = PkgManifest(d, self.manifest_dir, |
| 16 | self.target_manifest = RpmManifest(d, self.manifest_dir, | ||
| 17 | Manifest.MANIFEST_TYPE_SDK_TARGET) | 17 | Manifest.MANIFEST_TYPE_SDK_TARGET) |
| 18 | self.host_manifest = RpmManifest(d, self.manifest_dir, | 18 | self.host_manifest = PkgManifest(d, self.manifest_dir, |
| 19 | Manifest.MANIFEST_TYPE_SDK_HOST) | 19 | Manifest.MANIFEST_TYPE_SDK_HOST) |
| 20 | 20 | ||
| 21 | rpm_repo_workdir = "oe-sdk-repo" | 21 | rpm_repo_workdir = "oe-sdk-repo" |
