[prev in list] [next in list] [prev in thread] [next in thread]
List: libguestfs
Subject: Re: [Libguestfs] [PATCH] appliance: Fix searching for shared libraries on usr-merged Debian systems
From: "Richard W.M. Jones" <rjones () redhat ! com>
Date: 2021-08-31 14:50:17
Message-ID: 20210831145017.GC30099 () redhat ! com
[Download RAW message or body]
On Tue, Aug 31, 2021 at 03:24:08PM +0200, Hilko Bengen wrote:
> If /lib is a symlink to usr/lib, paths to shared libraries as
> determined by ld.so may differ from dpkg's file lists.
>
> We turn the filename search pattern into a glob expression by
> prefixing it with a '*', so the required packages are found again:
>
> $ dpkg -S /lib/x86_64-linux-gnu/libpcre2-8.so.0
> dpkg-query: no path found matching pattern /lib/x86_64-linux-gnu/libpcre2-8.so.0
> $ dpkg -S */lib/x86_64-linux-gnu/libpcre2-8.so.0
> libpcre2-8-0:amd64: /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0
> ---
> appliance/Makefile.am | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/appliance/Makefile.am b/appliance/Makefile.am
> index a213e12be4..6dd1df75a6 100644
> --- a/appliance/Makefile.am
> +++ b/appliance/Makefile.am
> @@ -84,7 +84,7 @@ if HAVE_RPM
> QUERY_FILES_CMD := xargs rpm -qf --qf '%{name}\n'
> endif
> if HAVE_DPKG
> -QUERY_FILES_CMD := xargs dpkg -S | cut -d: -f1
> +QUERY_FILES_CMD := sed -e 's,^/,\*/,' | xargs dpkg -S | cut -d: -f1
> endif
> if HAVE_PACMAN
> QUERY_FILES_CMD := xargs pacman -Qo | sed -r 's/.* is owned by ([^ ]+) .*/\1/'
Thanks, I pushed it.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic