Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 643058

Summary: net-libs/libnsl-0 missing multilib dependencies
Product: Gentoo Linux Reporter: Brian Evans (RETIRED) <grknight>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: base-system, dschridde+gentoobugs, floppym
Priority: Normal Keywords: EBUILD
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 643038, 643052    
Attachments: libnsl-0-r1.ebuild
ebuild patch

Description Brian Evans (RETIRED) gentoo-dev 2018-01-01 22:13:32 UTC
Created attachment 512672 [details]
libnsl-0-r1.ebuild

Although net-libs/libnsl is a dummy ebuild, it should follow the other packages and have multilib USE flags pointing to glibc in order to satisfy current stable packages.

Attached is my proposed ebuild to solve this.
Comment 1 Dennis Schridde 2018-01-01 22:21:49 UTC
In bug #643052 I proposed net-libs/libnsl-0 to be changed in a way similar to this:
```
inherit multilib-minimal
if [[ "${MULTILIB_USEDEP}" != "${DEFAULT_ABI}" ]] ; then
  USEDEP=multilib
fi
DEPEND="elibc_glibc? ( <sys-libs/glibc-2.26[${USEDEP}] )"
```
Comment 2 Brian Evans (RETIRED) gentoo-dev 2018-01-01 22:55:55 UTC
(In reply to Dennis Schridde from comment #1)
> In bug #643052 I proposed net-libs/libnsl-0 to be changed in a way similar
> to this:
> ```
> inherit multilib-minimal
> if [[ "${MULTILIB_USEDEP}" != "${DEFAULT_ABI}" ]] ; then
>   USEDEP=multilib
> fi
> DEPEND="elibc_glibc? ( <sys-libs/glibc-2.26[${USEDEP}] )"
> ```

This is unlikely to work as MULTILIB_USEDEP usually contains much more than one ABI
Comment 3 Dennis Schridde 2018-01-02 01:42:04 UTC
(In reply to Brian Evans from comment #2)
> This is unlikely to work as MULTILIB_USEDEP usually contains much more than
> one ABI

For other (and shamefully obvious) reasons this also will not work.  Please forget that I ever proposed it...

Since the other (and only working) way of spelling out the USE dependencies one by one feels rather cludgey: Maybe we could create a function that derives a dependency string from the list of all ABIs supported by KEYWORDS and the package to depend on, if we are in a multilib situation?  I.e. something that would be called as follows:
KEYWORDS="x86 amd64 mips"
DEPEND="sys-libs/glibc
        $(generate_depend 'sys-libs/glibc[multilib]')"
And produce something like:
DEPEND="sys-libs/glibc
        abi_x86_32? ( abi_x86_64? ( sys-libs/glibc[multilib] ) )
        abi_x86_32? ( abi_x86_x32? ( sys-libs/glibc[multilib] ) )
        abi_x86_64? ( abi_x86_x32? ( sys-libs/glibc[multilib] ) )
        abi_mips_n64? ( abi_mips_n32? ( sys-libs/glibc[multilib] ) )
        abi_mips_n64? ( abi_mips_o32? ( sys-libs/glibc[multilib] ) )
        abi_mips_n32? ( abi_mips_o32? ( sys-libs/glibc[multilib] ) )"
Comment 4 Mike Gilbert gentoo-dev 2018-01-02 01:42:25 UTC
Created attachment 512684 [details, diff]
ebuild patch

Here's a simpler solution.

To quote my commit message:

We don't actually want to RDEPEND on sys-libs/glibc[multilib] since the
multilib USE flag is forced on/off by the user's profile, and a mismatch
would just cause confusion.
Comment 5 Brian Evans (RETIRED) gentoo-dev 2018-04-29 20:04:18 UTC
This looks completed

Closing
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2018-04-29 20:36:22 UTC
It's not committed yet... I'll have a look at it asap.
Comment 7 Larry the Git Cow gentoo-dev 2018-04-30 11:26:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71627502e290946938c5ae9bdecd910b14447a4b

commit 71627502e290946938c5ae9bdecd910b14447a4b
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2018-01-02 01:37:37 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2018-04-30 11:25:15 +0000

    net-libs/libnsl: inherit multilib-build in the dummy ebuild
    
    This populates IUSE with the appropriate flags.
    
    We don't actually want to RDEPEND on sys-libs/glibc[multilib] since the
    multilib USE flag is forced on/off by the user's profile, and a mismatch
    would just cause confusion.
    
    [Sorry for the delay -dilfridge]
    
    Closes: https://bugs.gentoo.org/643058

 net-libs/libnsl/{libnsl-0.ebuild => libnsl-0-r1.ebuild} | 3 +++
 1 file changed, 3 insertions(+)