mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
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: 92a0359b1e2558b175374a81a1d6146724cd1a9e) (From OE-Core rev: 409e2e8c2b8f99d6f3d5930047f29649a1e62888) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
b0184b6082
commit
59b982e6b8
@@ -402,7 +402,7 @@ class PackageManager(object, metaclass=ABCMeta):
|
|||||||
installed_pkgs.write(output)
|
installed_pkgs.write(output)
|
||||||
installed_pkgs.flush()
|
installed_pkgs.flush()
|
||||||
|
|
||||||
cmd = [bb.utils.which(os.getenv('PATH'), "oe-pkgdata-util"),
|
cmd = ["oe-pkgdata-util",
|
||||||
"-p", self.d.getVar('PKGDATA_DIR'), "glob", installed_pkgs.name,
|
"-p", self.d.getVar('PKGDATA_DIR'), "glob", installed_pkgs.name,
|
||||||
globs]
|
globs]
|
||||||
exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY')
|
exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY')
|
||||||
@@ -412,11 +412,11 @@ class PackageManager(object, metaclass=ABCMeta):
|
|||||||
bb.note("Installing complementary packages ...")
|
bb.note("Installing complementary packages ...")
|
||||||
bb.note('Running %s' % cmd)
|
bb.note('Running %s' % cmd)
|
||||||
complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
|
complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
|
||||||
|
self.install(complementary_pkgs.split(), attempt_only=True)
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
bb.fatal("Could not compute complementary packages list. Command "
|
bb.fatal("Could not compute complementary packages list. Command "
|
||||||
"'%s' returned %d:\n%s" %
|
"'%s' returned %d:\n%s" %
|
||||||
(' '.join(cmd), e.returncode, e.output.decode("utf-8")))
|
(' '.join(cmd), e.returncode, e.output.decode("utf-8")))
|
||||||
self.install(complementary_pkgs.split(), attempt_only=True)
|
|
||||||
|
|
||||||
def deploy_dir_lock(self):
|
def deploy_dir_lock(self):
|
||||||
if self.deploy_dir is None:
|
if self.deploy_dir is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user