Portage reports the following QA issue when emerging dev-lang/ghc-8.0.2: > QA: install > QA Notice: command not found: > /var/tmp/portage/dev-lang/ghc-8.0.2/temp/environment: line 2477: --info: command not found --------------------- # emerge -pv ghc These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-lang/ghc-8.0.2:0/8.0.2::gentoo USE="gmp -binary -doc -ghcbootstrap -ghcmakebinary -profile" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Created attachment 572554 [details] info.txt emerge --info
Created attachment 572556 [details] build.log.xz
Likely a ghc--info call before ghc is available. Should be easy to fix or at least improve the error message.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f58d31d661f7bda2fe7b591419f0d9f138a2dae6 commit f58d31d661f7bda2fe7b591419f0d9f138a2dae6 Author: Benjamin Gordon <bmgordon@chromium.org> AuthorDate: 2020-01-29 19:38:13 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-01-29 22:04:46 +0000 ghc-package.eclass: Handle missing ghc in lookups ghc-getghc() and ghc-getghcpkg() both assume that they can find an installed binary. If ghc isn't installed (e.g., because it's being being rebuilt or has been unmerged), there is no such binary. This causes the intended arguments to be run as a command, which produces "command not found" QA Notices. If ghc can't be found, return "false" instead. The false command will harmlessly absorb the other command-line arguments. This doesn't produce any difference in the final result because the invalid commands were failing anyway. Closes: https://bugs.gentoo.org/683144 Signed-off-by: Benjamin Gordon <bmgordon@chromium.org> Closes: https://github.com/gentoo/gentoo/pull/14499 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> eclass/ghc-package.eclass | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)