1 |
commit: 682fc4b8ea1b2caeeef88596508026edea8e8ac5 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 16 23:41:57 2017 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 16 23:47:18 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=682fc4b8 |
7 |
|
8 |
quickpkg: report all binarytree.inject failures (bug 637902) |
9 |
|
10 |
The binarytree.inject method should not return None unless |
11 |
something went wrong, therefore report failure whenever it |
12 |
returns None. |
13 |
|
14 |
Bug: https://bugs.gentoo.org/637902 |
15 |
|
16 |
bin/quickpkg | 7 ++++--- |
17 |
1 file changed, 4 insertions(+), 3 deletions(-) |
18 |
|
19 |
diff --git a/bin/quickpkg b/bin/quickpkg |
20 |
index 7e9aa1373..ec6f50409 100755 |
21 |
--- a/bin/quickpkg |
22 |
+++ b/bin/quickpkg |
23 |
@@ -185,11 +185,12 @@ def quickpkg_atom(options, infos, arg, eout): |
24 |
binpkg_path = bintree.getname(pkg_info or cpv) |
25 |
try: |
26 |
s = os.stat(binpkg_path) |
27 |
- except OSError as e: |
28 |
+ except OSError: |
29 |
+ s = None |
30 |
+ |
31 |
+ if s is None or pkg_info is None: |
32 |
# Sanity check, shouldn't happen normally. |
33 |
eout.eend(1) |
34 |
- eout.eerror(str(e)) |
35 |
- del e |
36 |
eout.eerror("Failed to create package: '%s'" % binpkg_path) |
37 |
retval |= 1 |
38 |
else: |