Hi,

On 7/8/23 22:55, Eric de Ruiter wrote:

The idea is simple: if you specify you want to match on realpath (for
now by prefixing the path with "realpath:"); it will search for files
matching the basename of the given path and does an extra check to
only return matches where the realpath of the given path will match
the realpath of the partial match it found.

We mostly need to define an API here. The interesting callers do stuff like

$ dpkg -S /lib/x86_64-linux-gnu/libselinux.so.1 /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libpcre2-8.so.0
libselinux1:amd64: /lib/x86_64-linux-gnu/libselinux.so.1
libc6:amd64: /lib/x86_64-linux-gnu/libc.so.6
dpkg-query: no path found matching pattern /lib/x86_64-linux-gnu/libpcre2-8.so.0

so multiple file names in a single call, and probably expect the same file name to be returned to match the response back to the query.

We'd need a new format, for example like

libc6:amd64: /usr/lib/x86_64-linux-gnu/libc.so.6 (/lib/x86_64-linux-gnu/libc.so.6)

and a flag to enable that format, for clients to use. I haven't invested much time into that yet, my expectation is that the aliasing infrastructure I've put into the backend handles this nicely, but the frontend is something that needs to be coordinated.

   Simon

Reply via email to