summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@ti.com>2016-04-21 14:44:22 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-29 07:41:42 +0100
commit5bfd397e16ddae0ad7a1abce36bb8a112e743df0 (patch)
tree5636869d592ab0cdc3e1681059e7fee5f9790ad5 /meta/lib
parent69d3df9169133d5e05eff25019569fb8974d48c2 (diff)
downloadpoky-5bfd397e16ddae0ad7a1abce36bb8a112e743df0.tar.gz
sdk.py: preserve packaging data when SDKIMAGE_FEATURES has "package-management"
This is not enabled by default, as there are still limitations and possible issues with opkg (and rpm?) packaging data containing broken symlinks for local indexes: http://cgit.openembedded.org/openembedded-core/commit/?id=c8e0ec2da9ad4ce1c103966906a85f68c15400dd There are other use cases for the packaging data to be available in SDK, since it provides comprehensive info about SDK's contents and in the case of opkg and dpkg is all text-based and can be easily parsed by simple scripts. Introduce new "package-management" flag for SDKIMAGE_FEATURES list (similar to the one already used for IMAGE_FEATURES) that controls presence of the packaging data in resulting SDK, while unifying this behavior across the board for supported pkg managers - rpm, opkg, dpkg. (From OE-Core rev: 9ab934e4aecb759c922049245888dcd2a8c55477) Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/sdk.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index f15fbdb368..f1bbef6f58 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -155,14 +155,16 @@ class RpmSdk(Sdk):
155 155
156 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND", True)) 156 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND", True))
157 157
158 self.target_pm.remove_packaging_data() 158 if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
159 self.target_pm.remove_packaging_data()
159 160
160 bb.note("Installing NATIVESDK packages") 161 bb.note("Installing NATIVESDK packages")
161 self._populate_sysroot(self.host_pm, self.host_manifest) 162 self._populate_sysroot(self.host_pm, self.host_manifest)
162 163
163 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND", True)) 164 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND", True))
164 165
165 self.host_pm.remove_packaging_data() 166 if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
167 self.host_pm.remove_packaging_data()
166 168
167 # Move host RPM library data 169 # Move host RPM library data
168 native_rpm_state_dir = os.path.join(self.sdk_output, 170 native_rpm_state_dir = os.path.join(self.sdk_output,
@@ -232,14 +234,16 @@ class OpkgSdk(Sdk):
232 234
233 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND", True)) 235 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND", True))
234 236
235 self.target_pm.remove_packaging_data() 237 if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
238 self.target_pm.remove_packaging_data()
236 239
237 bb.note("Installing NATIVESDK packages") 240 bb.note("Installing NATIVESDK packages")
238 self._populate_sysroot(self.host_pm, self.host_manifest) 241 self._populate_sysroot(self.host_pm, self.host_manifest)
239 242
240 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND", True)) 243 execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND", True))
241 244
242 self.host_pm.remove_packaging_data() 245 if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
246 self.host_pm.remove_packaging_data()
243 247
244 target_sysconfdir = os.path.join(self.sdk_target_sysroot, self.sysconfdir) 248 target_sysconfdir = os.path.join(self.sdk_target_sysroot, self.sysconfdir)
245 host_sysconfdir = os.path.join(self.sdk_host_sysroot, self.sysconfdir) 249 host_sysconfdir = os.path.join(self.sdk_host_sysroot, self.sysconfdir)
@@ -314,6 +318,9 @@ class DpkgSdk(Sdk):
314 318
315 self._copy_apt_dir_to(os.path.join(self.sdk_target_sysroot, "etc", "apt")) 319 self._copy_apt_dir_to(os.path.join(self.sdk_target_sysroot, "etc", "apt"))
316 320
321 if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
322 self.target_pm.remove_packaging_data()
323
317 bb.note("Installing NATIVESDK packages") 324 bb.note("Installing NATIVESDK packages")
318 self._populate_sysroot(self.host_pm, self.host_manifest) 325 self._populate_sysroot(self.host_pm, self.host_manifest)
319 326
@@ -322,6 +329,9 @@ class DpkgSdk(Sdk):
322 self._copy_apt_dir_to(os.path.join(self.sdk_output, self.sdk_native_path, 329 self._copy_apt_dir_to(os.path.join(self.sdk_output, self.sdk_native_path,
323 "etc", "apt")) 330 "etc", "apt"))
324 331
332 if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
333 self.host_pm.remove_packaging_data()
334
325 native_dpkg_state_dir = os.path.join(self.sdk_output, self.sdk_native_path, 335 native_dpkg_state_dir = os.path.join(self.sdk_output, self.sdk_native_path,
326 "var", "lib", "dpkg") 336 "var", "lib", "dpkg")
327 self.mkdirhier(native_dpkg_state_dir) 337 self.mkdirhier(native_dpkg_state_dir)