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-05 14:13:47 (GMT)
commit9ac4f5b88e592504e9edd8d3e65ad19c4113ee17 (patch)
tree06c1697994cd5993376facd807379316520bfe3f
parentc9159f18ed7c7d7dca95d240a8548ab0d08a7bdb (diff)
downloadpoky-9ac4f5b88e592504e9edd8d3e65ad19c4113ee17.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) (From OE-Core rev: fdc95793dff3dbfa49faa19c51c7e8c9cd67dc6c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixup do to merge conflict] Signed-off-by: Armin Kuster <akuster808@gmail.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 b74c859..8954338 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -594,7 +594,7 @@ class PackageManager(object, metaclass=ABCMeta):
594 installed_pkgs.write(output) 594 installed_pkgs.write(output)
595 installed_pkgs.flush() 595 installed_pkgs.flush()
596 596
597 cmd = [bb.utils.which(os.getenv('PATH'), "oe-pkgdata-util"), 597 cmd = ["oe-pkgdata-util",
598 "-p", self.d.getVar('PKGDATA_DIR', True), "glob", installed_pkgs.name, 598 "-p", self.d.getVar('PKGDATA_DIR', True), "glob", installed_pkgs.name,
599 globs] 599 globs]
600 exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY', True) 600 exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY', True)
@@ -604,11 +604,11 @@ class PackageManager(object, metaclass=ABCMeta):
604 bb.note("Installing complementary packages ...") 604 bb.note("Installing complementary packages ...")
605 bb.note('Running %s' % cmd) 605 bb.note('Running %s' % cmd)
606 complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8") 606 complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
607 self.install(complementary_pkgs.split(), attempt_only=True)
607 except subprocess.CalledProcessError as e: 608 except subprocess.CalledProcessError as e:
608 bb.fatal("Could not compute complementary packages list. Command " 609 bb.fatal("Could not compute complementary packages list. Command "
609 "'%s' returned %d:\n%s" % 610 "'%s' returned %d:\n%s" %
610 (' '.join(cmd), e.returncode, e.output.decode("utf-8"))) 611 (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
611 self.install(complementary_pkgs.split(), attempt_only=True)
612 612
613 def deploy_dir_lock(self): 613 def deploy_dir_lock(self):
614 if self.deploy_dir is None: 614 if self.deploy_dir is None: