Cc'ing xdotool-users, as upstream might be interested here.

for those just now seeing it, the bug discussed is:

  http://bugs.debian.org/590827

xdotool: FTBFS on GNU/kFreeBSD (due to unsatisfied Build-Depends on lsof)

On 07/29/2010 01:54 PM, Petr Salinger wrote:
> But it looks like the usage of lsof can be avoided.
> Wouldn'be possible to use lsof when available and otherwise use simply
> "test -S" ?

test -S just checks for the presence of the socket, not whether anyone
is actively listening on it.  It is possible (at least with a Linux
kernel -- haven't tested other kernels) for a socket to exist in the
filesystem with no processes bound to it.

So i don't think test -S $FOO a semantic equivalent to lsof $FOO in this
case.

Getting lsof working for GNU/kFreeBSD seems to have other good
consequences (like having lsof available!), and would solve this problem
directly.

I'd rather not disable test suites for xdotool if possible, though i'd
be happy to entertain other suggestions for resolving this.

        --dkg

> --- t/ephemeral-x.STD   2010-07-29 15:33:59.000000000 +0000
> +++ t/ephemeral-x.sh    2010-07-29 15:35:17.000000000 +0000
> @@ -66,17 +66,17 @@
>    exit 1
>  fi
> 
> -if ! which lsof > /dev/null 2>&1 ; then
> -  echo "Unable to find lsof. This is a required tool."
> -  cleanup
> -  exit 1
> -fi
> +#if ! which lsof > /dev/null 2>&1 ; then
> +#  echo "Unable to find lsof. This is a required tool."
> +#  cleanup
> +#  exit 1
> +#fi
> 
>  while true; do
>    num=$(expr $num + 1)
>    xsocket=/tmp/.X11-unix/X$num
>    quiet || echo "Trying :$num"
> -  lsof $xsocket > /dev/null 2>&1 && continue
> +  test -S $xsocket > /dev/null 2>&1 && continue
>    (
>      if quiet ; then
>        exec > /dev/null
> @@ -97,7 +97,7 @@
> 
>      # See if the xserver got a hold of the display socket.
>      # If so, the server is up and healthy.
> -    if lsof -p $xpid | grep -qF $xsocket ; then
> +    if test -S $xsocket ; then
>        quiet || echo "$XSERVERNAME looks healthy. Moving on."
>        healthy=1
>        break
> 
> 
> 
> 
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to