summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/package_manager.py
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-01-18 14:33:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-20 17:07:15 +0000
commit6ebda8e659f678a0f4fe1e970d6f38e5e273f5f7 (patch)
tree3f3a48a5798b58defdfc9c812705da0bf7fd40fb /meta/lib/oe/package_manager.py
parent03075f671c5425f08669f10f30330c4880c0d60a (diff)
downloadpoky-6ebda8e659f678a0f4fe1e970d6f38e5e273f5f7.tar.gz
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 <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/package_manager.py')
-rw-r--r--meta/lib/oe/package_manager.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 79cadda682..6d026307f5 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -708,7 +708,7 @@ class PackageManager(object):
708 pass 708 pass
709 709
710 @abstractmethod 710 @abstractmethod
711 def list_installed(self, format=None): 711 def list_installed(self):
712 pass 712 pass
713 713
714 @abstractmethod 714 @abstractmethod
@@ -728,7 +728,9 @@ class PackageManager(object):
728 installed_pkgs_file = os.path.join(self.d.getVar('WORKDIR', True), 728 installed_pkgs_file = os.path.join(self.d.getVar('WORKDIR', True),
729 "installed_pkgs.txt") 729 "installed_pkgs.txt")
730 with open(installed_pkgs_file, "w+") as installed_pkgs: 730 with open(installed_pkgs_file, "w+") as installed_pkgs:
731 installed_pkgs.write(self.list_installed("arch")) 731 pkgs = self.list_installed()
732 output = oe.utils.format_pkg_list(pkgs, "arch")
733 installed_pkgs.write(output)
732 734
733 if globs is None: 735 if globs is None:
734 globs = self.d.getVar('IMAGE_INSTALL_COMPLEMENTARY', True) 736 globs = self.d.getVar('IMAGE_INSTALL_COMPLEMENTARY', True)
@@ -1432,8 +1434,8 @@ class RpmPM(PackageManager):
1432 self.image_rpmlib, 1434 self.image_rpmlib,
1433 symlinks=True) 1435 symlinks=True)
1434 1436
1435 def list_installed(self, format=None): 1437 def list_installed(self):
1436 return self.pkgs_list.list(format) 1438 return self.pkgs_list.list_pkgs()
1437 1439
1438 ''' 1440 '''
1439 If incremental install, we need to determine what we've got, 1441 If incremental install, we need to determine what we've got,
@@ -1797,8 +1799,8 @@ class OpkgPM(PackageManager):
1797 # create the directory back, it's needed by PM lock 1799 # create the directory back, it's needed by PM lock
1798 bb.utils.mkdirhier(self.opkg_dir) 1800 bb.utils.mkdirhier(self.opkg_dir)
1799 1801
1800 def list_installed(self, format=None): 1802 def list_installed(self):
1801 return OpkgPkgsList(self.d, self.target_rootfs, self.config_file).list(format) 1803 return OpkgPkgsList(self.d, self.target_rootfs, self.config_file).list_pkgs()
1802 1804
1803 def handle_bad_recommendations(self): 1805 def handle_bad_recommendations(self):
1804 bad_recommendations = self.d.getVar("BAD_RECOMMENDATIONS", True) or "" 1806 bad_recommendations = self.d.getVar("BAD_RECOMMENDATIONS", True) or ""
@@ -2186,8 +2188,8 @@ class DpkgPM(PackageManager):
2186 bb.fatal("Cannot fix broken dependencies. Command '%s' " 2188 bb.fatal("Cannot fix broken dependencies. Command '%s' "
2187 "returned %d:\n%s" % (cmd, e.returncode, e.output)) 2189 "returned %d:\n%s" % (cmd, e.returncode, e.output))
2188 2190
2189 def list_installed(self, format=None): 2191 def list_installed(self):
2190 return DpkgPkgsList(self.d, self.target_rootfs).list() 2192 return DpkgPkgsList(self.d, self.target_rootfs).list_pkgs()
2191 2193
2192 2194
2193def generate_index_files(d): 2195def generate_index_files(d):