summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2014-03-18 11:09:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-21 12:05:52 +0000
commit483d5a4f3101e51ae495f8473b494a94cefa1a0f (patch)
tree48aaf58716d20b8af46e339c4ea0820c294f6ae0 /meta
parentd91e35640d19471213122d36288315f071c37432 (diff)
downloadpoky-483d5a4f3101e51ae495f8473b494a94cefa1a0f.tar.gz
rootfs.py, sdk.py: adjust/create the wrappers for creating installed packages list
Since we created a new PkgsList object that will deal with listing the installed packages in a rootfs, use the new class both for images and SDKs in the wrapper functions. The old list_installed_packages() wrapper listed only the packages inside an image rootfs. It didn't deal with target/host SDK rootfs's. (From OE-Core rev: 8fc18e67504db5b6df3fdd239c6187a71af52656) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/rootfs.py19
-rw-r--r--meta/lib/oe/sdk.py18
2 files changed, 22 insertions, 15 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 30a1321db1..0e6c8bc2f0 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -709,28 +709,17 @@ def create_rootfs(d, manifest_dir=None):
709 os.environ.update(env_bkp) 709 os.environ.update(env_bkp)
710 710
711 711
712def list_installed_packages(d, format=None, rootfs_dir=None): 712def image_list_installed_packages(d, format=None, rootfs_dir=None):
713 if not rootfs_dir: 713 if not rootfs_dir:
714 rootfs_dir = d.getVar('IMAGE_ROOTFS', True) 714 rootfs_dir = d.getVar('IMAGE_ROOTFS', True)
715 715
716 img_type = d.getVar('IMAGE_PKGTYPE', True) 716 img_type = d.getVar('IMAGE_PKGTYPE', True)
717 if img_type == "rpm": 717 if img_type == "rpm":
718 return RpmPM(d, 718 return RpmPkgsList(d, rootfs_dir).list(format)
719 rootfs_dir,
720 d.getVar('TARGET_VENDOR', True)
721 ).list_installed(format)
722 elif img_type == "ipk": 719 elif img_type == "ipk":
723 return OpkgPM(d, 720 return OpkgPkgsList(d, rootfs_dir, d.getVar("IPKGCONF_TARGET", True)).list(format)
724 rootfs_dir,
725 d.getVar("IPKGCONF_TARGET", True),
726 d.getVar("ALL_MULTILIB_PACKAGE_ARCHS", True)
727 ).list_installed(format)
728 elif img_type == "deb": 721 elif img_type == "deb":
729 return DpkgPM(d, 722 return DpkgPkgsList(d, rootfs_dir).list(format)
730 rootfs_dir,
731 d.getVar('PACKAGE_ARCHS', True),
732 d.getVar('DPKG_ARCH', True)
733 ).list_installed(format)
734 723
735if __name__ == "__main__": 724if __name__ == "__main__":
736 """ 725 """
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