spymemcached package is FTBFS because a test expects a reverse lookup of
127.0.0.1 to return localhost, but current /etc/hosts configuration
returns the hostname instead.

Let's move this `hostname/ip` entry to the end of /etc/hosts so the
reverse lookup of 127.0.0.1 returns localhost, which makes sense to be
the default case usually.

Signed-off-by: Ariel D'Alessandro <ariel.dalessan...@collabora.com>
---
 init_buildsystem | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/init_buildsystem b/init_buildsystem
index 23e1c40..62b7966 100755
--- a/init_buildsystem
+++ b/init_buildsystem
@@ -1077,11 +1077,7 @@ fi
 test -e $BUILD_ROOT/.build/init_buildsystem.data || HOST=`hostname`
 test -e $BUILD_ROOT/etc/hosts || echo "127.0.0.1 localhost" > 
$BUILD_ROOT/etc/hosts
 if ! grep -F "127.0.0.1 $HOST" $BUILD_ROOT/etc/hosts > /dev/null ; then
-    # this makes a reverse lookup on 127.0.0.1 return the host name,
-    # which is bad, but 127.0.0.2 does not work on all unix systems
-    echo "127.0.0.1 $HOST" > $BUILD_ROOT/etc/hosts.new
-    test -f $BUILD_ROOT/etc/hosts && cat $BUILD_ROOT/etc/hosts >> 
$BUILD_ROOT/etc/hosts.new
-    mv $BUILD_ROOT/etc/hosts.new $BUILD_ROOT/etc/hosts
+    echo "127.0.0.1 $HOST" >> $BUILD_ROOT/etc/hosts
 fi
 
 # XXX: still needed?
-- 
2.30.2

Reply via email to