[PATCH] configure: check for links to/from libdir in ldconfig output
Tomi Ollila
tomi.ollila at iki.fi
Wed May 30 04:37:09 PDT 2018
On Tue, May 29 2018, David Bremner wrote:
> If e.g. /lib is a link to /usr/lib, then the latter may not show up in
> the way we expect in the output of ldconfig. 'test foo -ef bar' checks
> if foo and bar have the same device and inode numbers. Since (at least
> in bash, ksh, and zsh) the shell dereferences symlinks before applying
i think you have to add 'dash' to this list in this commit message, as it
is default /bin/sh in debian (and many debian-derived distributions);
that is quite common configuration there when the test line in question
is executed
dash and bash are most relevant, ksh, zsh (and at least some versions of
busybox sh ;) are just emphasizing the fact...
Tomi
> the test, this includes both the case where file1 is equal to file2
> and the case where one is a symlink to the other.
> ---
> configure | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 3cefdcc6..ab7e1610 100755
> --- a/configure
> +++ b/configure
> @@ -715,7 +715,7 @@ elif [ $uname = "Linux" ] || [ $uname = "GNU" ] ; then
> IFS="
> "
> for path in $ldconfig_paths; do
> - if [ "$path" = "$libdir_expanded" ]; then
> + if [ "$path" -ef "$libdir_expanded" ]; then
> libdir_in_ldconfig=1
> fi
> done
> --
> 2.17.0
More information about the notmuch
mailing list