diff options
| -rw-r--r-- | meta/lib/oe/package_manager/deb/__init__.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/meta/lib/oe/package_manager/deb/__init__.py b/meta/lib/oe/package_manager/deb/__init__.py index e09e81e490..eb48f3f982 100644 --- a/meta/lib/oe/package_manager/deb/__init__.py +++ b/meta/lib/oe/package_manager/deb/__init__.py | |||
| @@ -244,9 +244,19 @@ class DpkgPM(OpkgDpkgPM): | |||
| 244 | output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT) | 244 | output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT) |
| 245 | bb.note(output.decode("utf-8")) | 245 | bb.note(output.decode("utf-8")) |
| 246 | except subprocess.CalledProcessError as e: | 246 | except subprocess.CalledProcessError as e: |
| 247 | e_output = e.output.decode("utf-8") | ||
| 248 | extra_info = "" | ||
| 249 | for e_line in e_output.split('\n'): | ||
| 250 | if 'has no installation candidate' in e_line or 'Unable to locate package' in e_line: | ||
| 251 | match = re.search(r"E: Package '([a-z0-9+\-\._]+)' has no installation candidate", e_line) | ||
| 252 | if match: | ||
| 253 | pkg = match.group(1) | ||
| 254 | else: | ||
| 255 | pkg = re.search(r"E: Unable to locate package ([a-z0-9+\-\._]+)", e_line).group(1) | ||
| 256 | extra_info += self.get_missing_pkg_reason(pkg) | ||
| 247 | (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. " | 257 | (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. " |
| 248 | "Command '%s' returned %d:\n%s" % | 258 | "Command '%s' returned %d:\n%s%s" % |
| 249 | (cmd, e.returncode, e.output.decode("utf-8"))) | 259 | (cmd, e.returncode, e_output, extra_info)) |
| 250 | 260 | ||
| 251 | # rename *.dpkg-new files/dirs | 261 | # rename *.dpkg-new files/dirs |
| 252 | for root, dirs, files in os.walk(self.target_rootfs): | 262 | for root, dirs, files in os.walk(self.target_rootfs): |
