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

Bug 669976

Summary: sys-apps/less use dev-libs/libpcre2 instead of dev-libs/libpcre
Product: Gentoo Linux Reporter: soundbastlerlive
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 837980    

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.

Thanks!
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):

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

commit a874eaccf3f560a31559b8d34339439401b89526
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2018-10-30 16:38:27 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2018-10-30 16:38:42 +0000

    sys-apps/less: Revbump to use pcre2 instead of pcre.
    
    Closes: https://bugs.gentoo.org/669976
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
    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!