From 6ebda8e659f678a0f4fe1e970d6f38e5e273f5f7 Mon Sep 17 00:00:00 2001 From: Mariano Lopez Date: Mon, 18 Jan 2016 14:33:06 +0000 Subject: lib/oe/rootfs: Use list_pkgs() instead of list() This patch changes the use list_pkgs() instead of list() from class RpmPkgsList. The change is in two functions, image_list_installed_packages from rootfs.py and sdk_list_installed_packages from sdk.py. With this change the functions calling the functions listed above, must format the output as they required. The formatting can be done using format_pkg_list() from oe.utils. The classes calling the afected functions are changed too with this patch, to keep the same functionality using the new data structure. [YOCTO #7427] (From OE-Core rev: 983ea373362514e5888bd1d7d9c4f136c94b00f2) Signed-off-by: Mariano Lopez Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/lib/oe/rootfs.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'meta/lib/oe/rootfs.py') diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index f677d03a12..0e901c2405 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -252,7 +252,7 @@ class Rootfs(object): # Remove components that we don't need if it's a read-only rootfs pkgs_installed = image_list_installed_packages(self.d) pkgs_to_remove = list() - for pkg in pkgs_installed.split(): + for pkg in pkgs_installed: if pkg in ["update-rc.d", "base-passwd", "shadow", @@ -976,17 +976,17 @@ def create_rootfs(d, manifest_dir=None): os.environ.update(env_bkp) -def image_list_installed_packages(d, format=None, rootfs_dir=None): +def image_list_installed_packages(d, rootfs_dir=None): if not rootfs_dir: rootfs_dir = d.getVar('IMAGE_ROOTFS', True) img_type = d.getVar('IMAGE_PKGTYPE', True) if img_type == "rpm": - return RpmPkgsList(d, rootfs_dir).list(format) + return RpmPkgsList(d, rootfs_dir).list_pkgs() elif img_type == "ipk": - return OpkgPkgsList(d, rootfs_dir, d.getVar("IPKGCONF_TARGET", True)).list(format) + return OpkgPkgsList(d, rootfs_dir, d.getVar("IPKGCONF_TARGET", True)).list_pkgs() elif img_type == "deb": - return DpkgPkgsList(d, rootfs_dir).list(format) + return DpkgPkgsList(d, rootfs_dir).list_pkgs() if __name__ == "__main__": """ -- cgit 1.2.3-korg