Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 663256 - sys-apps/portage: always use gfind and gxargs when available
Summary: sys-apps/portage: always use gfind and gxargs when available
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 659322
  Show dependency tree
 
Reported: 2018-08-09 20:29 UTC by Zac Medico
Modified: 2018-10-12 19:33 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2018-08-09 20:29:01 UTC
According to PMS, GNU findutils version 4.4 or later is required for EAPI 5 and later. However, for USERLAND=BSD, we currently rely on this alias from profiles/default/bsd/fbsd/profile.bashrc:

    type -P gxargs > /dev/null && alias xargs=gxargs

Since the findutils ebuild does this:

    program_prefix=$(usex userland_GNU '' g)

Note that for the ebuild environment, portage already has a bin/ebuild-helpers/bsd/sed wrapper that calls gsed, which is added to PATH when USERLAND != GNU.

In isolated-functions.sh we've got this code that 'alias xargs=gxargs' doesn't apply to:

    case ${USERLAND} in
    BSD)
        export XARGS="xargs"
        ;;
    *)
        export XARGS="xargs -r"
        ;;
    esac
Comment 1 Larry the Git Cow gentoo-dev 2018-08-11 08:14:43 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=9f66589863e10c074c8bf652d7f9ef7631e10d61

commit 9f66589863e10c074c8bf652d7f9ef7631e10d61
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-08-09 22:56:33 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-08-10 00:00:25 +0000

    XARGS: use gxargs for USERLAND=BSD (bug 663256)
    
    For USERLAND=BSD, set XARGS="gxargs -r" if gxargs is available,
    so the code from bug 630292 works for USERLAND=BSD.
    
    Fixes: 50283f1abb77 (install-qa-check.d/60pngfix: parallel support (bug 630292))
    Bug: https://bugs.gentoo.org/663256
    Reported-by: Michał Górny <mgorny@gentoo.org>
    Reviewed-by: M. J. Everitt <m.j.everitt@iee.org>
    Reviewed-by: Brian Dolbec <dolsen@gentoo.org>

 bin/isolated-functions.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)