Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 601764 - tinfo USE flag
Summary: tinfo USE flag
Status: RESOLVED DUPLICATE of bug 457530
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-06 06:11 UTC by konsolebox
Modified: 2019-10-01 22:02 UTC (History)
1 user (show)

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 konsolebox 2016-12-06 06:11:28 UTC
Please consider promoting the use of tinfo flag in packages that
depend on sys-libs/ncurses so that they would synchronize properly
with sys-libs/ncurses[tinfo].

It could be as simple as:

IUSE="tinfo"

RDEPEND="sys-libs/ncurses[tinfo=]"

pkg_setup() {
	use tinfo && export LDFLAGS="-ltinfo ${LDFLAGS}" LIBS="-ltinfo ${LIBS}"
}

The last line can be changed/enhanced, depending on the package.

It helps keep binaries consistent even if sys-libs/ncurses[-tinfo]
gets recompiled to sys-libs/ncurses[tinfo], because they are forced to
be recompiled.  This is better than hard-coded dynamic workarounds.
Comment 1 SpanKY gentoo-dev 2016-12-06 14:02:36 UTC
that solution is a bad idea and is why we're stuck in this situation as it is.  the right answer is to query pkg-config for ncurses libs and then it always works regardless of USE=tinfo setting.

usually as we fix ebuilds that mishandle tinfo linkage, the fix is to use make that change at the same time.  which is also what we already recommend -- look at comment #0 in the tracking bug 457530.

*** This bug has been marked as a duplicate of bug 457530 ***
Comment 2 konsolebox 2016-12-06 16:02:24 UTC
(In reply to SpanKY from comment #1)
> that solution is a bad idea and is why we're stuck in this situation as it
> is.  the right answer is to query pkg-config for ncurses libs and then it
> always works regardless of USE=tinfo setting.
> 
> usually as we fix ebuilds that mishandle tinfo linkage, the fix is to use
> make that change at the same time.  which is also what we already recommend
> -- look at comment #0 in the tracking bug 457530.
> 
> *** This bug has been marked as a duplicate of bug 457530 ***

That doesn't automatically fix packages linked against libncurses that requires relinking against libtinfo. That implies always relying on revdep-rebuild.

That which could even cause breakage during a world install, because would that needs rebuilds would be detected immediately.

If you're talking about 'export LDFLAGS="-ltinfo ${LDFLAGS}" LIBS="-ltinfo ${LIBS}"' being a bad idea over relying on pkg-config, then you can incorporate the pkg-config method over this.
Comment 3 konsolebox 2016-12-06 16:04:08 UTC
* because packages that need rebuilds wouldn't be detected immediately.
Comment 4 SpanKY gentoo-dev 2016-12-07 16:34:30 UTC
(In reply to konsolebox from comment #2)

there is no breakage at runtime.  forcing packages that don't need or care about USE=tinfo to now carry the flag makes sense.  the whole reason we allowed the flag in the first place is because you can rebuild ncurses with it on or off and the runtime stays stable.

the breakage only shows up at build time, and that's because the packages in question don't handle subdeps of ncurses correctly.  it's always been a problem, but it's shown up more because of tinfo.  fixing the leaf packages is a one time penalty, and it fixes it not just for tinfo but for future build changes with ncurses.
Comment 5 konsolebox 2016-12-08 13:30:15 UTC
(In reply to SpanKY from comment #4)

Are you implying that symbols are kept even when ncurses is built from [-tinfo] to [tinfo]?  Can you explain how depending packages can dynamically adapt even if they aren't rebuilt?

Or are you implying that people rely on revdep-rebuild?