Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 643052 - dev-qt/qtgui-4.8.7[nis] should depend on net-libs/libnsl
Summary: dev-qt/qtgui-4.8.7[nis] should depend on net-libs/libnsl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
: 643216 657042 (view as bug list)
Depends on: 643058
Blocks: glibc-libnsl glibc-2.26-stable
  Show dependency tree
 
Reported: 2018-01-01 21:50 UTC by Dennis Schridde
Modified: 2018-06-21 12:22 UTC (History)
4 users (show)

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


Attachments
Patch (qtgui.patch,1.20 KB, patch)
2018-05-01 20:24 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2018-01-01 21:50:11 UTC
dev-qt/qtgui-4.8.7 should depend on net-libs/libnsl[${MULTILIB_USEDEP}] as it tests for the presence of libnsl during compile-time, even though it loads the library dynamically at runtime and handles the situation gracefully, if the library is missing by then.

This was previously discussed here: https://github.com/gentoo/gentoo/pull/6712

The problem with depending on net-libs/libnsl[${MULTILIB_USEDEP}] is that version 0 of that ebuild is not actually multilib capable at this time:  net-libs/libnsl-0 does not actually provide the libraries itself, but instead depends on <sys-libs/glibc-2.26 to do it.  And since sys-libs/glibc also does not provide abi_* / multilib useflags, but only IUSE=multilib, we somehow need to translate between USE=$MULTLIB_USEDEP and USE=multilib.  I believe that multilib_is_native_abi from multilib-build.eclass cannot be used here, since it probably only works inside multilib_foreach_abi.

I am wildly guessing here, but I would try the following:
if [[ "${MULTILIB_USEDEP}" != "${DEFAULT_ABI}" ]] ; then
  USEDEP=multilib
fi
DEPEND="elibc_glibc? ( <sys-libs/glibc-2.26[${USEDEP}] )"

If someone confirms that is the correct approach, I would hand in a PR.
Comment 1 Davide Pesavento (RETIRED) gentoo-dev 2018-01-01 22:11:00 UTC
I suppose the following would be sufficient:

  DEPEND="|| ( >=net-libs/libnsl-1[${MULTILIB_USEDEP}] <sys-libs/glibc-2.26 )"


OTOH libnsl-0 could maybe gain the ABI_* flags to smooth the transition? Cc'ing libnsl maintainers for advice.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2018-01-03 15:22:50 UTC
*** Bug 643216 has been marked as a duplicate of this bug. ***
Comment 3 Arfrever Frehtes Taifersar Arahesis 2018-01-03 15:27:15 UTC
config.tests/unix/nis/nis.cpp checks for headers of both a RPC implementation (rpc/rpc.h) and a NIS(YP) implementation (rpcsvc/ypclnt.h, rpcsvc/yp_prot.h) and yp_get_default_domain() function from a NIS(YP) implementation.
Since net-libs/libnsl (NIS(YP) implementation) already depends on net-libs/libtirpc, it should suffice to directly depend only on net-libs/libnsl.
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2018-05-01 13:50:08 UTC
net-libs/libnsl:=[${MULTILIB_USEDEP}]

^ this is the way to go, and is also in principle possible now (all libnsl versions have the useflags).

However, we need some keywording on ~amd64-fbsd first.

RepoMan scours the neighborhood...
  dependency.bad [fatal]        2
   dev-qt/qtgui/qtgui-4.8.7.ebuild: DEPEND: ~amd64-fbsd(default/bsd/fbsd/amd64/11.1)
[     'net-libs/libnsl:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]']
   dev-qt/qtgui/qtgui-4.8.7.ebuild: RDEPEND: ~amd64-fbsd(default/bsd/fbsd/amd64/11.1)
[     'net-libs/libnsl:=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]']
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2018-05-01 13:51:46 UTC
... or maybe not, since whatever FBSD is doing with libnsl may well be different...
Comment 6 Larry the Git Cow gentoo-dev 2018-05-01 13:53:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19abcc714eb35c63cbcd4edd167c92ba40795483

commit 19abcc714eb35c63cbcd4edd167c92ba40795483
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2018-05-01 13:52:53 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2018-05-01 13:52:53 +0000

    dev-qt/qtgui: Depend on libnsl (on glibc systems), bug 643052
    
    Closes: https://bugs.gentoo.org/643052
    Package-Manager: Portage-2.3.31, Repoman-2.3.9

 dev-qt/qtgui/qtgui-4.8.7.ebuild | 1 +
 1 file changed, 1 insertion(+)
Comment 7 Arfrever Frehtes Taifersar Arahesis 2018-05-01 20:24:17 UTC
As mentioned in summary, this dependency should be conditional on USE="nis".
Comment 8 Arfrever Frehtes Taifersar Arahesis 2018-05-01 20:24:49 UTC
Created attachment 529300 [details, diff]
Patch
Comment 9 Larry the Git Cow gentoo-dev 2018-05-01 20:38:36 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c33ed3763f7386cad50be12b2c06c47e16f741b

commit 1c33ed3763f7386cad50be12b2c06c47e16f741b
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2018-05-01 20:20:39 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2018-05-01 20:38:31 +0000

    dev-qt/qtgui: Depend on net-libs/libnsl only with USE="nis"
    
    Bug: https://bugs.gentoo.org/643052

 dev-qt/qtgui/qtgui-4.8.7.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 10 Michael Palimaka (kensington) gentoo-dev 2018-06-21 12:22:41 UTC
*** Bug 657042 has been marked as a duplicate of this bug. ***