summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorNiko Mauno <niko.mauno@vaisala.com>2018-02-28 18:20:08 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-08 10:39:33 -0800
commit0d4459e7086fced5e9e0b4ad10378c9eddec56a8 (patch)
tree428d5c56e6efceaae1d02989da2c14de652505cc /meta/lib
parent8e3839ce2663715de7f5d67ab21041b9e60e6efb (diff)
downloadpoky-0d4459e7086fced5e9e0b4ad10378c9eddec56a8.tar.gz
package_manager.py: Explicit complementary fail
When running bitbake -c populate_sdk <image_name>, it is expected that packages matching SDKIMAGE_INSTALL_COMPLEMENTARY name mask (unless declared in PACKAGE_EXCLUDE_COMPLEMENTARY) are installed to resulting SDK. Underlying mechanism issues a package manager install call for set of complementary packages. However the mechanism doesn't seem to inform the user all too obviously in case the package manager command behind install_complementary() method fails -- and since it is combined with attempt_only=True option, user might end up wondering why several *-dev, *-dbg packages are missing from resulting SDK. Improve associated install() method behaviour in affected OpkgPM and DpkgPM classes so that a problematic state of affairs becomes directly obvious for bitbake user, resulting in shell output like: WARNING: someimage-1.0-r0 do_populate_sdk: Unable to install packages. Command '...' returned 1: Collected errors: * Solver encountered 1 problem(s): * Problem 1/1: * - package somepkg-dev-1.0-r0.x86 requires somepkg = 1.0-r0, but none of the providers can be installed * * Solution 1: * - allow deinstallation of someotherpkg-1.1-r1.x86 * - do not ask to install a package providing somepkg-dev * Solution 2: * - do not ask to install a package providing somepkg-dev (From OE-Core rev: 2502bd591c37bf532d02dc6b37fc1e8b5224fb0a) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-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 980649fb4d..c10efb8df4 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1173,7 +1173,7 @@ class OpkgPM(OpkgDpkgPM):
1173 output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8") 1173 output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8")
1174 bb.note(output) 1174 bb.note(output)
1175 except subprocess.CalledProcessError as e: 1175 except subprocess.CalledProcessError as e:
1176 (bb.fatal, bb.note)[attempt_only]("Unable to install packages. " 1176 (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. "
1177 "Command '%s' returned %d:\n%s" % 1177 "Command '%s' returned %d:\n%s" %
1178 (cmd, e.returncode, e.output.decode("utf-8"))) 1178 (cmd, e.returncode, e.output.decode("utf-8")))
1179 1179
@@ -1472,7 +1472,7 @@ class DpkgPM(OpkgDpkgPM):
1472 bb.note("Installing the following packages: %s" % ' '.join(pkgs)) 1472 bb.note("Installing the following packages: %s" % ' '.join(pkgs))
1473 subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT) 1473 subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
1474 except subprocess.CalledProcessError as e: 1474 except subprocess.CalledProcessError as e:
1475 (bb.fatal, bb.note)[attempt_only]("Unable to install packages. " 1475 (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. "
1476 "Command '%s' returned %d:\n%s" % 1476 "Command '%s' returned %d:\n%s" %
1477 (cmd, e.returncode, e.output.decode("utf-8"))) 1477 (cmd, e.returncode, e.output.decode("utf-8")))
1478 1478