Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 697796 - sys-apps/man-db should use REQUIRED_USE to explicitly depend only on sys-libs/db or on sys-libs/gdbm
Summary: sys-apps/man-db should use REQUIRED_USE to explicitly depend only on sys-libs...
Status: CONFIRMED
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: PullRequest
Depends on:
Blocks:
 
Reported: 2019-10-15 21:02 UTC by Bertrand Jacquin
Modified: 2021-02-06 22:02 UTC (History)
2 users (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 Bertrand Jacquin 2019-10-15 21:02:24 UTC
sys-apps/man-db has 2 USE flags that can be used to specify the database engine to use, berkdb or gdbm. Both have dynamic dependency that influence the dependency tree. If none is explicitly set in the USE flag list, gdbm is used as a fallback.

REQUIRED_USE is supported since EAPI 4 and offer the ability to explicitly require a USE flag to be enabled. berkdb is enabled by default in profiles/default/linux/make.defaults while gdbm is enabled by default in no profile.

https://github.com/gentoo/gentoo/pull/13263 removes the warning made in pkg_setup and defer berkdb vs gdbm USE flag handling to the package manager. This change also move the default to berkdb to align with defaults in profile.


Reproducible: Always
Comment 1 Lars Wendler (Polynomial-C) gentoo-dev 2019-10-16 08:13:59 UTC
I do not really understand what you are trying to solve here. Using REQUIRED_USE here could interrupt emerge runs while using a sane fallback does not.
Comment 2 Bertrand Jacquin 2019-10-16 22:32:45 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #1)
> I do not really understand what you are trying to solve here. Using
> REQUIRED_USE here could interrupt emerge runs while using a sane fallback
> does not.

REQUIRED_USE does not interrupt while it runs, it interrupts the dependency tree calculation.

berkdb being enabled by default in profiles/default/linux/make.defaults and gdbm being not enable by default, the only package requiring gdbm becomes man-db, without an explicit choice made by the user.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2019-10-22 08:01:15 UTC
I think that REQUIRED_USE="^^ ( berkdb gdbm )" is a good idea.


(In reply to Bertrand Jacquin from comment #0)
> This change also move the default to berkdb to align with defaults in
> profile.

This is rather bad idea, since >=sys-libs/db-6 has potentially problematic license.
sys-libs/gdbm has no problems with license.
So I suggest to continue defaulting to USE="gdbm".


It would be better if berkdb was dropped from profiles/default/linux/make.defaults and added to profiles/default/linux/package.use for only these packages where enabling it by default makes sense, but until such changes happen, profiles/default/linux/package.use could have this entry:
sys-apps/man-db -berkdb
Comment 4 Bertrand Jacquin 2019-10-22 20:54:42 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #3)
> I think that REQUIRED_USE="^^ ( berkdb gdbm )" is a good idea.
> 
> 
> (In reply to Bertrand Jacquin from comment #0)
> > This change also move the default to berkdb to align with defaults in
> > profile.
> 
> This is rather bad idea, since >=sys-libs/db-6 has potentially problematic
> license.
> sys-libs/gdbm has no problems with license.
> So I suggest to continue defaulting to USE="gdbm".
> 
> It would be better if berkdb was dropped from
> profiles/default/linux/make.defaults and added to
> profiles/default/linux/package.use for only these packages where enabling it
> by default makes sense, but until such changes happen,
> profiles/default/linux/package.use could have this entry:
> sys-apps/man-db -berkdb

Yeah, changing the default db from berkdb to gdbm seems fine to me as long there is no automagic dependencies coming into play.

Do you want me to provide a patch to address this ?
Comment 5 jospezial 2020-03-29 02:09:06 UTC
strange dependency output for man-db:

equery d gdbm
 * These packages depend on gdbm:
dev-lang/perl-5.30.1 (gdbm ? >=sys-libs/gdbm-1.8.3)
dev-lang/python-2.7.17-r1 (gdbm ? sys-libs/gdbm[berkdb])
dev-lang/python-3.7.7 (gdbm ? sys-libs/gdbm[berkdb])
dev-lang/python-3.8.2 (gdbm ? sys-libs/gdbm[berkdb])
dev-lang/ruby-2.6.5 (gdbm ? sys-libs/gdbm)
dev-lang/ruby-2.7.0 (gdbm ? sys-libs/gdbm)
dev-libs/apr-util-1.6.1-r3 (gdbm ? sys-libs/gdbm)
media-sound/pulseaudio-13.99.1 (gdbm ? sys-libs/gdbm)
sys-apps/man-db-2.9.1 (gdbm ? sys-libs/gdbm)
                      (!gdbm ? sys-libs/gdbm)