summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/sdk.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/sdk.py')
-rw-r--r--meta/lib/oe/sdk.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index 01a1807160..564319965d 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -289,6 +289,24 @@ class DpkgSdk(Sdk):
289 bb.utils.remove(os.path.join(self.sdk_output, "var"), True) 289 bb.utils.remove(os.path.join(self.sdk_output, "var"), True)
290 290
291 291
292def sdk_list_installed_packages(d, target, format=None, rootfs_dir=None):
293 if rootfs_dir is None:
294 sdk_output = d.getVar('SDK_OUTPUT', True)
295 target_path = d.getVar('SDKTARGETSYSROOT', True).strip('/')
296
297 rootfs_dir = [sdk_output, os.path.join(sdk_output, target_path)][target is True]
298
299 img_type = d.getVar('IMAGE_PKGTYPE', True)
300 if img_type == "rpm":
301 arch_var = ["SDK_PACKAGE_ARCHS", None][target is True]
302 os_var = ["SDK_OS", None][target is True]
303 return RpmPkgsList(d, rootfs_dir, arch_var, os_var).list(format)
304 elif img_type == "ipk":
305 conf_file_var = ["IPKGCONF_SDK", "IPKGCONF_Target"][target is True]
306 return OpkgPkgsList(d, rootfs_dir, d.getVar(conf_file_var, True)).list(format)
307 elif img_type == "deb":
308 return DpkgPkgsList(d, rootfs_dir).list(format)
309
292def populate_sdk(d, manifest_dir=None): 310def populate_sdk(d, manifest_dir=None):
293 env_bkp = os.environ.copy() 311 env_bkp = os.environ.copy()
294 312