ebuild: check for QA issues in preinst logs too

The pkg_preinst phase is still safe to die in, so run QA checks
after that too to catch common errors like "command not found".

TEST=CQ passes

Change-Id: I6db81fbcfba7b3f6d7d96b5a3febbdc6b21c2c91
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/portage_tool/+/2085971
Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/lib/_emerge/EbuildPhase.py b/lib/_emerge/EbuildPhase.py
index bb2088b..5d7fa50 100644
--- a/lib/_emerge/EbuildPhase.py
+++ b/lib/_emerge/EbuildPhase.py
@@ -239,7 +239,7 @@
 		logfile = self._get_log_path()
-		if self.phase == "install":
+		if self.phase in {'install', 'preinst'}:
 			out = io.StringIO()
 			ret = _check_build_log(self.settings, out=out)
 			if ret is False: