[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt debug




On 13/10/2025 16:43, fxkl47BF@protonmail.com wrote:
On Mon, 13 Oct 2025, The Wanderer wrote:

On 2025-10-13 at 10:34, fxkl47BF@protonmail.com wrote:

On Mon, 13 Oct 2025, Greg Wooledge wrote:

On Mon, Oct 13, 2025 at 13:07:37 +0000, fxkl47BF@protonmail.com wrote:
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
Well, what details are you interested in getting?
[cut]
i guess that about covers it
from what i've read apt does not provide debug that let you look under the covers
it's read the code or nothing
thanks
Have you considered running apt in a debugger? That would allow you to step through the functions, add watches, breakpoints etc? If you're trying to debug how apt works, then a debugger is the natural choice, isn't it?

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


Reply to: