On Mon, 13 Oct 2025, Greg Wooledge wrote:

> On Mon, Oct 13, 2025 at 13:07:37 +0000, [email protected] wrote:
>> On Mon, 13 Oct 2025, Greg Wooledge wrote:
>>
>>> On Mon, Oct 13, 2025 at 12:43:13 +0000, [email protected] wrote:
>>>> apt list ~e^science
>>>>
>>>> how can i see the details of what is being searched and how
>>>
>>> man apt-patterns
>>>
>>>       ?source-package(REGEX), ~eREGEX
>>>           Selects versions where the source package name matches the 
>>> specified
>>>           regular expression.
>>>
>>> man 7 regex
>>>
>>>       '^'  (matching the null string at the beginning of a line)
>>>
>>
>>
>> i've read that several times
>> i don't see anything that tells me the details of how apt is performing the 
>> search
>
> I don't understand what you're asking.
>
> ~e means the rest of it is a regex (regular expression) which is matched
> against the source package name.  (It would be nice if it specified
> which flavor of regex it's using, because there are many.)
>
> ^science is a regex that matches any string/line beginning with the
> substring "science".  (At least in BRE, ERE and PCRE flavors.)
>
> So, putting it together, it should match all packages whose source package
> name begins with "science".
>
> When I run it on my system, I get the following result:
>
> hobbit:~$ apt list '~e^science'
> ESC[32mlibjs-sciencejsESC[0m/stable,stable 1.9.3+dfsg-4 all
>
> This package is not installed, so it seems it's looking at available
> packages.  This is the package it's referring to:
>
> hobbit:~$ apt-cache show libjs-sciencejs
> Package: libjs-sciencejs
> Source: science.js
> Version: 1.9.3+dfsg-4
> [...]
>
> As you can see, its source package name is "science.js" which does in
> fact begin with "science".  So, it looks like it's working as documented.
>

apt list ~e^science is an example
not what i'm interested in
i'm interested in the details of how apt go about doing whatever it's doing

Reply via email to