Gentoo Archives: gentoo-portage-dev

From: "M. J. Everitt" <m.j.everitt@×××.org>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] emerge --search: use slash to auto-detect category (bug 647940)
Date: Mon, 19 Feb 2018 11:18:23
Message-Id: b0f431b5-81ca-4c38-eb4e-770acf4f138f@iee.org
In Reply to: [gentoo-portage-dev] [PATCH] emerge --search: use slash to auto-detect category (bug 647940) by Zac Medico
1 On 18/02/18 21:27, Zac Medico wrote:
2 > Since search strings containing a slash do no work unless category
3 > match mode is enabled, use slash to auto-detect category match mode,
4 > so that users do not have to prefix the search string with the special
5 > @ symbol.
6 >
7 > Bug: https://bugs.gentoo.org/647940
8 > ---
9 > pym/_emerge/search.py | 4 ++++
10 > 1 file changed, 4 insertions(+)
11 >
12 > diff --git a/pym/_emerge/search.py b/pym/_emerge/search.py
13 > index 36897fb15..eb52b2ca3 100644
14 > --- a/pym/_emerge/search.py
15 > +++ b/pym/_emerge/search.py
16 > @@ -256,6 +256,10 @@ class search(object):
17 > if self.searchkey.startswith('@'):
18 > match_category = 1
19 > self.searchkey = self.searchkey[1:]
20 > + # Auto-detect category match mode (@ symbol can be deprecated
21 > + # after this is available in a stable version of portage).
22 > + if '/' in self.searchkey:
23 > + match_category = 1
24 > fuzzy = False
25 > if regexsearch:
26 > self.searchre=re.compile(self.searchkey,re.I)
27 +1 long overdue! :D

Attachments

File name MIME type
signature.asc application/pgp-signature