summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/sdk.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:30:19 +0000
commita0a045098115d94d31f6fcd3c16dd286ce16d84a (patch)
tree93649f13ee5a5a6d0bcb1d59f90b482e81c254cd /meta/lib/oe/sdk.py
parentaed96f6a6aee74d677c4647af159174477c134ab (diff)
downloadpoky-a0a045098115d94d31f6fcd3c16dd286ce16d84a.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; (From OE-Core rev: d339d6f48f81330e94162f333aad76f3c65d6bfd) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/sdk.py')
-rw-r--r--meta/lib/oe/sdk.py48
1 files changed, 5 insertions, 43 deletions
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index 518076e75d..01a1807160 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -66,59 +66,20 @@ class RpmSdk(Sdk):
66 self.host_manifest = RpmManifest(d, self.manifest_dir, 66 self.host_manifest = RpmManifest(d, self.manifest_dir,
67 Manifest.MANIFEST_TYPE_SDK_HOST) 67 Manifest.MANIFEST_TYPE_SDK_HOST)
68 68
69 package_archs = {
70 'default': [],
71 }
72 target_os = {
73 'default': "",
74 }
75 package_archs['default'] = self.d.getVar("PACKAGE_ARCHS", True).split()
76 # arch order is reversed. This ensures the -best- match is
77 # listed first!
78 package_archs['default'].reverse()
79 target_os['default'] = self.d.getVar("TARGET_OS", True).strip()
80 multilibs = self.d.getVar('MULTILIBS', True) or ""
81 for ext in multilibs.split():
82 eext = ext.split(':')
83 if len(eext) > 1 and eext[0] == 'multilib':
84 localdata = bb.data.createCopy(self.d)
85 default_tune_key = "DEFAULTTUNE_virtclass-multilib-" + eext[1]
86 default_tune = localdata.getVar(default_tune_key, False)
87 if default_tune:
88 localdata.setVar("DEFAULTTUNE", default_tune)
89 bb.data.update_data(localdata)
90 package_archs[eext[1]] = localdata.getVar('PACKAGE_ARCHS',
91 True).split()
92 package_archs[eext[1]].reverse()
93 target_os[eext[1]] = localdata.getVar("TARGET_OS",
94 True).strip()
95 target_providename = ['/bin/sh', 69 target_providename = ['/bin/sh',
96 '/bin/bash', 70 '/bin/bash',
97 '/usr/bin/env', 71 '/usr/bin/env',
98 '/usr/bin/perl', 72 '/usr/bin/perl',
99 'pkgconfig' 73 'pkgconfig'
100 ] 74 ]
75
101 self.target_pm = RpmPM(d, 76 self.target_pm = RpmPM(d,
102 self.sdk_target_sysroot, 77 self.sdk_target_sysroot,
103 package_archs,
104 target_os,
105 self.d.getVar('TARGET_VENDOR', True), 78 self.d.getVar('TARGET_VENDOR', True),
106 'target', 79 'target',
107 target_providename 80 target_providename
108 ) 81 )
109 82
110 sdk_package_archs = {
111 'default': [],
112 }
113 sdk_os = {
114 'default': "",
115 }
116 sdk_package_archs['default'] = self.d.getVar("SDK_PACKAGE_ARCHS",
117 True).split()
118 # arch order is reversed. This ensures the -best- match is
119 # listed first!
120 sdk_package_archs['default'].reverse()
121 sdk_os['default'] = self.d.getVar("SDK_OS", True).strip()
122 sdk_providename = ['/bin/sh', 83 sdk_providename = ['/bin/sh',
123 '/bin/bash', 84 '/bin/bash',
124 '/usr/bin/env', 85 '/usr/bin/env',
@@ -127,13 +88,14 @@ class RpmSdk(Sdk):
127 'libGL.so()(64bit)', 88 'libGL.so()(64bit)',
128 'libGL.so' 89 'libGL.so'
129 ] 90 ]
91
130 self.host_pm = RpmPM(d, 92 self.host_pm = RpmPM(d,
131 self.sdk_host_sysroot, 93 self.sdk_host_sysroot,
132 sdk_package_archs,
133 sdk_os,
134 self.d.getVar('SDK_VENDOR', True), 94 self.d.getVar('SDK_VENDOR', True),
135 'host', 95 'host',
136 sdk_providename 96 sdk_providename,
97 "SDK_PACKAGE_ARCHS",
98 "SDK_OS"
137 ) 99 )
138 100
139 def _populate_sysroot(self, pm, manifest): 101 def _populate_sysroot(self, pm, manifest):