summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-03-01 18:26:29 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-02 16:06:24 (GMT)
commit9248da456eb164ba90cfc8263655ef8afb8da9f9 (patch)
tree3ec1df2c8688ae7b8cef7a5b12f72a8a0001af1b
parent883c22e3431b73360726013fa2c8b0afb07aad99 (diff)
downloadpoky-9248da456eb164ba90cfc8263655ef8afb8da9f9.tar.gz
package_manager: improve install_complementary
- No need to use bb.utils.which() as subprocess will search $PATH - Clarity flow by moving the install inside the try/except (From OE-Core rev: f4d22b7195dd8f08fe26dd353c7e860208e87d6a) (From OE-Core rev: 1267df89164d7dcbbf77668ac49452bd0df87b54) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/package_manager.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 3a2daad..7f94687 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -401,7 +401,7 @@ class PackageManager(object, metaclass=ABCMeta):
401 installed_pkgs.write(output) 401 installed_pkgs.write(output)
402 installed_pkgs.flush() 402 installed_pkgs.flush()
403 403
404 cmd = [bb.utils.which(os.getenv('PATH'), "oe-pkgdata-util"), 404 cmd = ["oe-pkgdata-util",
405 "-p", self.d.getVar('PKGDATA_DIR'), "glob", installed_pkgs.name, 405 "-p", self.d.getVar('PKGDATA_DIR'), "glob", installed_pkgs.name,
406 globs] 406 globs]
407 exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY') 407 exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY')
@@ -411,11 +411,11 @@ class PackageManager(object, metaclass=ABCMeta):
411 bb.note("Installing complementary packages ...") 411 bb.note("Installing complementary packages ...")
412 bb.note('Running %s' % cmd) 412 bb.note('Running %s' % cmd)
413 complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8") 413 complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
414 self.install(complementary_pkgs.split(), attempt_only=True)
414 except subprocess.CalledProcessError as e: 415 except subprocess.CalledProcessError as e:
415 bb.fatal("Could not compute complementary packages list. Command " 416 bb.fatal("Could not compute complementary packages list. Command "
416 "'%s' returned %d:\n%s" % 417 "'%s' returned %d:\n%s" %
417 (' '.join(cmd), e.returncode, e.output.decode("utf-8"))) 418 (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
418 self.install(complementary_pkgs.split(), attempt_only=True)
419 419
420 def deploy_dir_lock(self): 420 def deploy_dir_lock(self):
421 if self.deploy_dir is None: 421 if self.deploy_dir is None: