Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 669976 - sys-apps/less use dev-libs/libpcre2 instead of dev-libs/libpcre
Summary: sys-apps/less use dev-libs/libpcre2 instead of dev-libs/libpcre
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
Depends on:
Blocks: 837980
  Show dependency tree
Reported: 2018-10-30 16:29 UTC by soundbastlerlive
Modified: 2022-04-12 07:22 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description soundbastlerlive 2018-10-30 16:29:33 UTC
less supports pcre2 using './configure --with-regex=pcre2'

I think a pcre2 USE flag should be added like other ebuild with both pcre and pcre2 support.

Comment 1 Larry the Git Cow gentoo-dev 2018-10-30 16:38:50 UTC
The bug has been closed via the following commit(s):

commit a874eaccf3f560a31559b8d34339439401b89526
Author:     Lars Wendler <>
AuthorDate: 2018-10-30 16:38:27 +0000
Commit:     Lars Wendler <>
CommitDate: 2018-10-30 16:38:42 +0000

    sys-apps/less: Revbump to use pcre2 instead of pcre.
    Signed-off-by: Lars Wendler <>
    Package-Manager: Portage-2.3.51, Repoman-2.3.11

 sys-apps/less/{less-540.ebuild => less-540-r1.ebuild} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 2 soundbastlerlive 2018-10-30 16:45:45 UTC
Wow that was very quick, thanks!
However it seems that USE="pcre" will always pull in libpcre2.
Other packages have both pcre and pcre2 USE flags which are mutually exclusive and I'm not sure pcre will ever pull in libpcre2.

See e.g. net-proxy/haproxy ebuild.

But maybe I am misunderstanding the commit?
I'm unsure because it seems 'usex' will try these in order depending on if the corresponding USE flag is set, however the dependency does not seem reflect this. Also pcre is listed before pcre2.
But again, I'm no ebuild expert.
Comment 3 soundbastlerlive 2018-10-30 18:18:36 UTC
I just tested the new ebuild and found the "usex" docs. So the ordering is not a problem, because it means "if USE contains pcre, use pcre2 otherwise posix".
What remain though is the inconsistency that I believe it should have both pcre and pcre2 USE flags like e.g. haproxy and not have pcre actually mean pcre2.
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-10-30 18:26:58 UTC
pcre2 is the successor of pcre which is now considered deprecated by its upstream. That being said, just because a package can be built with both implementations doesn't mean we have to provide support for both.
In this case it's better to keep the ebuild simple and just switch over to pcre2.
Comment 5 soundbastlerlive 2018-10-30 18:29:56 UTC
Thanks for explaining, Lars!