Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 683144 - dev-lang/ghc-8.0.2 - QA Notice: command not found
Summary: dev-lang/ghc-8.0.2 - QA Notice: command not found
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-04-12 10:44 UTC by Francesco Turco
Modified: 2020-01-29 22:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
info.txt (info.txt,5.78 KB, text/plain)
2019-04-12 10:44 UTC, Francesco Turco
Details
build.log.xz (build.log.xz,177.62 KB, application/x-xz)
2019-04-12 10:46 UTC, Francesco Turco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Turco 2019-04-12 10:44:10 UTC
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
Comment 1 Francesco Turco 2019-04-12 10:44:54 UTC
Created attachment 572554 [details]
info.txt

emerge --info
Comment 2 Francesco Turco 2019-04-12 10:46:18 UTC
Created attachment 572556 [details]
build.log.xz
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-22 09:39:27 UTC
Likely a ghc--info call before ghc is available. Should be easy to fix or at least improve the error message.
Comment 4 Larry the Git Cow gentoo-dev 2020-01-29 22:04:52 UTC
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(-)