aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/rootfs.py
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2014-02-14 13:01:05 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-14 12:25:13 +0000
commitd339d6f48f81330e94162f333aad76f3c65d6bfd (patch)
tree360cab7d4404f98a71477a3c07a40c634360a2b5 /meta/lib/oe/rootfs.py
parentf3fa7577e8153b537948cf48711ffe03dbab6b3b (diff)
downloadopenembedded-core-contrib-d339d6f48f81330e94162f333aad76f3c65d6bfd.tar.gz
package_manager.py, rootfs.py, sdk.py: add Indexer class
Because the package-index.bb needs to create package indexes outside do_rootfs environment, move the indexing capability out of PackageManager class to a smaller Indexer class. This commit: * simply moves the indexing functions for ipk/deb with no changes; * rewrites the RPM indexing function so that it can be easily moved out of the PackageManager class; * removes some RPM duplicate code, moves it into a method inside RpmPM class and changes the RpmPM constructor so that the new method is effective; Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/rootfs.py')
-rw-r--r--meta/lib/oe/rootfs.py58
1 files changed, 0 insertions, 58 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 6114f5652a..d149ca3eff 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -233,37 +233,8 @@ class RpmRootfs(Rootfs):
self.manifest = RpmManifest(d, manifest_dir)
- package_archs = {
- 'default': [],
- }
- target_os = {
- 'default': "",
- }
- package_archs['default'] = self.d.getVar("PACKAGE_ARCHS", True).split()
- # arch order is reversed. This ensures the -best- match is
- # listed first!
- package_archs['default'].reverse()
- target_os['default'] = self.d.getVar("TARGET_OS", True).strip()
- multilibs = self.d.getVar('MULTILIBS', True) or ""
- for ext in multilibs.split():
- eext = ext.split(':')
- if len(eext) > 1 and eext[0] == 'multilib':
- localdata = bb.data.createCopy(self.d)
- default_tune_key = "DEFAULTTUNE_virtclass-multilib-" + eext[1]
- default_tune = localdata.getVar(default_tune_key, False)
- if default_tune:
- localdata.setVar("DEFAULTTUNE", default_tune)
- bb.data.update_data(localdata)
- package_archs[eext[1]] = localdata.getVar('PACKAGE_ARCHS',
- True).split()
- package_archs[eext[1]].reverse()
- target_os[eext[1]] = localdata.getVar("TARGET_OS",
- True).strip()
-
self.pm = RpmPM(d,
d.getVar('IMAGE_ROOTFS', True),
- package_archs,
- target_os,
self.d.getVar('TARGET_VENDOR', True)
)
@@ -634,37 +605,8 @@ def list_installed_packages(d, format=None, rootfs_dir=None):
img_type = d.getVar('IMAGE_PKGTYPE', True)
if img_type == "rpm":
- package_archs = {
- 'default': [],
- }
- target_os = {
- 'default': "",
- }
- package_archs['default'] = d.getVar("PACKAGE_ARCHS", True).split()
- # arch order is reversed. This ensures the -best- match is
- # listed first!
- package_archs['default'].reverse()
- target_os['default'] = d.getVar("TARGET_OS", True).strip()
- multilibs = d.getVar('MULTILIBS', True) or ""
- for ext in multilibs.split():
- eext = ext.split(':')
- if len(eext) > 1 and eext[0] == 'multilib':
- localdata = bb.data.createCopy(d)
- default_tune_key = "DEFAULTTUNE_virtclass-multilib-" + eext[1]
- default_tune = localdata.getVar(default_tune_key, False)
- if default_tune:
- localdata.setVar("DEFAULTTUNE", default_tune)
- bb.data.update_data(localdata)
- package_archs[eext[1]] = localdata.getVar('PACKAGE_ARCHS',
- True).split()
- package_archs[eext[1]].reverse()
- target_os[eext[1]] = localdata.getVar("TARGET_OS",
- True).strip()
-
return RpmPM(d,
rootfs_dir,
- package_archs,
- target_os,
d.getVar('TARGET_VENDOR', True)
).list_installed(format)
elif img_type == "ipk":