diff options
| author | Alex Franco <alejandro.franco@linux.intel.com> | 2015-08-26 16:57:34 -0500 | 
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-29 13:32:41 +0100 | 
| commit | a902e98c5938f52ec960e0518e0ceaf8f5ee610c (patch) | |
| tree | 00ce66a5d4ff1b0226fcfd0145ed15d76c91100c | |
| parent | c51d24710b48eb3930edb8c661100705c6203e78 (diff) | |
| download | openembedded-core-a902e98c5938f52ec960e0518e0ceaf8f5ee610c.tar.gz openembedded-core-a902e98c5938f52ec960e0518e0ceaf8f5ee610c.tar.bz2 openembedded-core-a902e98c5938f52ec960e0518e0ceaf8f5ee610c.zip | |
Empty image: package list splitting and iteration
A few short fixes to splitting/iteration done over package lists
in license.bbclass, package_manager.py and rootfs.py.
[YOCTO #7664]
Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes/license.bbclass | 2 | ||||
| -rw-r--r-- | meta/lib/oe/package_manager.py | 5 | ||||
| -rw-r--r-- | meta/lib/oe/rootfs.py | 2 | 
3 files changed, 5 insertions, 4 deletions
| diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 32e172afc7..c616a20121 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass @@ -39,7 +39,7 @@ python license_create_manifest() {          return 0      pkg_dic = {} -    for pkg in image_list_installed_packages(d).split("\n"): +    for pkg in image_list_installed_packages(d).splitlines():          pkg_info = os.path.join(d.getVar('PKGDATA_DIR', True),                                  'runtime-reverse', pkg)          pkg_name = os.path.basename(os.readlink(pkg_info)) diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 2ab1d78bca..ef917f15b2 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py @@ -995,9 +995,10 @@ class RpmPM(PackageManager):      '''      def install(self, pkgs, attempt_only=False): -        bb.note("Installing the following packages: %s" % ' '.join(pkgs)) -        if attempt_only and len(pkgs) == 0: +        if not pkgs: +            bb.note("There are no packages to install")              return +        bb.note("Installing the following packages: %s" % ' '.join(pkgs))          pkgs = self._pkg_translate_oe_to_smart(pkgs, attempt_only)          if not attempt_only: diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 8c8244c453..c29843b054 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py @@ -235,7 +235,7 @@ class Rootfs(object):                  installed_pkgs_dir = self.d.expand('${WORKDIR}/installed_pkgs.txt')                  pkgs_to_remove = list()                  with open(installed_pkgs_dir, "r+") as installed_pkgs: -                    pkgs_installed = installed_pkgs.read().split('\n') +                    pkgs_installed = installed_pkgs.read().splitlines()                      for pkg_installed in pkgs_installed[:]:                          pkg = pkg_installed.split()[0]                          if pkg in ["update-rc.d", | 
