diff options
author | niko.mauno@vaisala.com <niko.mauno@vaisala.com> | 2018-03-16 11:05:21 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-19 15:56:16 +0000 |
commit | 22ce3c120613660feadd30ea1fcc0758f82e8252 (patch) | |
tree | bfec756be43d5a1b4a15f90d1b63942ea0d752ee /meta | |
parent | a149114fec7046a25d1a59a918410891df296427 (diff) | |
download | poky-22ce3c120613660feadd30ea1fcc0758f82e8252.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)
(From OE-Core rev: 6ea3b9c595893f9148e579dc5628c0b9a239bcc9)
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>
(cherry picked from commit 0d4459e7086fced5e9e0b4ad10378c9eddec56a8)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/package_manager.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 0c5d907ff1..bd6dc99542 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
@@ -1066,7 +1066,7 @@ class OpkgPM(OpkgDpkgPM): | |||
1066 | output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8") | 1066 | output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8") |
1067 | bb.note(output) | 1067 | bb.note(output) |
1068 | except subprocess.CalledProcessError as e: | 1068 | except subprocess.CalledProcessError as e: |
1069 | (bb.fatal, bb.note)[attempt_only]("Unable to install packages. " | 1069 | (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. " |
1070 | "Command '%s' returned %d:\n%s" % | 1070 | "Command '%s' returned %d:\n%s" % |
1071 | (cmd, e.returncode, e.output.decode("utf-8"))) | 1071 | (cmd, e.returncode, e.output.decode("utf-8"))) |
1072 | 1072 | ||
@@ -1365,7 +1365,7 @@ class DpkgPM(OpkgDpkgPM): | |||
1365 | bb.note("Installing the following packages: %s" % ' '.join(pkgs)) | 1365 | bb.note("Installing the following packages: %s" % ' '.join(pkgs)) |
1366 | subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT) | 1366 | subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT) |
1367 | except subprocess.CalledProcessError as e: | 1367 | except subprocess.CalledProcessError as e: |
1368 | (bb.fatal, bb.note)[attempt_only]("Unable to install packages. " | 1368 | (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. " |
1369 | "Command '%s' returned %d:\n%s" % | 1369 | "Command '%s' returned %d:\n%s" % |
1370 | (cmd, e.returncode, e.output.decode("utf-8"))) | 1370 | (cmd, e.returncode, e.output.decode("utf-8"))) |
1371 | 1371 | ||