Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 708660 - sys-apps/portage - has_version -d fails with IPC daemon disabled
Summary: sys-apps/portage - has_version -d fails with IPC daemon disabled
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Other
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 706142
  Show dependency tree
 
Reported: 2020-02-07 21:35 UTC by krisztian99
Modified: 2020-04-21 07:49 UTC (History)
0 users

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


Attachments
build log, debug log, emerge info (logs.zip,55.15 KB, application/x-zip-compressed)
2020-02-07 21:35 UTC, krisztian99
Details

Note You need to log in before you can comment on or make changes to this bug.
Description krisztian99 2020-02-07 21:35:57 UTC
Created attachment 612610 [details]
build log, debug log, emerge info

Hello everyone,

I am posting this report as I was asked on IRC to do so. I have installed the Gentoo stage3 under WSL today and since it doesn't fully support IPC yet I had that disabled (packages randomly fail with IPC enabled). I wanted to emerge clang but it kept failing with:

> Not a directory: ''
> Run portageq with --help for info

I have asked for help on IRC and we figured out that it was from portageq being called with wrong parameters:

>/usr/lib/portage/python3.6/ebuild-helpers/portageq has_version '' sys-devel/llvm:9

It has the wrong parameter from (I was told by on IRC that this is the problem) https://gitweb.gentoo.org/proj/portage.git/tree/bin/phase-helpers.sh#n881 and by changing that line so it is 
> -d) root=${ESYSROOT:-/} ;;
or even
> -d) root="${ESYSROOT}/" ;;
Clang emerges fine. I don't know whether this problem is also on baremetal I have only tested under WSL.

The zip has three files: the build log, the debug log and emerge --info. The debug log was created before ccache was added to FEATURES but it doesn't change the outcome.
Comment 1 Mike Gilbert gentoo-dev 2020-02-08 17:38:33 UTC
This can be reproduced with sys-apps/portage[-ipc] and the simple ebuild below:

EAPI=7
SLOT=0

pkg_setup() {
    has_version -d app-misc/foo
}
Comment 2 Larry the Git Cow gentoo-dev 2020-02-08 18:19:43 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=81c88389f0456385545abb1bd703f8c25f009697

commit 81c88389f0456385545abb1bd703f8c25f009697
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-02-08 17:47:03 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-02-08 18:18:56 +0000

    phase-helpers.sh: avoid passing an empty root value to portageq
    
    Bug: https://bugs.gentoo.org/708660
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>
    Reviewed-by: Zac Medico <zmedico@gentoo.org>

 bin/phase-helpers.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2020-02-09 01:31:38 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87db6ee1103dc33c206111288a43ac619d27cefc

commit 87db6ee1103dc33c206111288a43ac619d27cefc
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-02-09 01:18:34 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-02-09 01:31:22 +0000

    sys-apps/portage: Bump to version 2.3.88
    
     #649622 prevent unecessary installation of virtual/w3m followed
             by removal by depclean
     #705736 preserve-libs: prevent unecessary preservation of system
             libraries which a package bundles
     #707820 generate API documentation with sphinx-apidoc
     #708448 support FEATURES=qa-unresolved-soname-deps so that the
             QA warning from bug 704320 can be disabled
     #708660 phase-helpers.sh: avoid passing an empty root value to
             portageq when ebuild IPC is disabled
    
    Bug: https://bugs.gentoo.org/706142
    Bug: https://bugs.gentoo.org/649622
    Bug: https://bugs.gentoo.org/705736
    Bug: https://bugs.gentoo.org/707820
    Bug: https://bugs.gentoo.org/708448
    Bug: https://bugs.gentoo.org/708660
    Package-Manager: Portage-2.3.88, Repoman-2.3.20
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 profiles/arch/riscv/package.use.mask   |   2 +-
 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-2.3.88.ebuild | 271 +++++++++++++++++++++++++++++++++
 3 files changed, 273 insertions(+), 1 deletion(-)