Группа :: Разработка/Прочее
Пакет: fakeroot
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: fakeroot-1.2-alt-script-fixes.patch
--- fakeroot-1.2/scripts/fakeroot.in.orig 2004-09-02 17:44:09 +0000
+++ fakeroot-1.2/scripts/fakeroot.in 2005-06-13 00:29:09 +0000
@@ -61,7 +61,7 @@ while test "X$1" != "X--"; do
-i)
shift
if test -f "$1"; then
- FAKEDOPTS=$FAKEDOPTS" --load"
+ FAKEDOPTS="$FAKEDOPTS --load"
PIPEIN="<$1"
else
echo 1>&2 "fakeroot: database file \`$1' does not exist."
@@ -69,11 +69,11 @@ while test "X$1" != "X--"; do
;;
-s)
shift
- FAKEDOPTS=$FAKEDOPTS" --save-file $1"
+ FAKEDOPTS="$FAKEDOPTS --save-file $1"
WAITINTRAP=1
;;
-u|--unknown-is-real)
- FAKEDOPTS=$FAKEDOPTS" --unknown-is-real"
+ FAKEDOPTS="$FAKEDOPTS --unknown-is-real"
FAKED_MODE="unknown-is-real"
;;
-b|--fd-base)
@@ -96,7 +96,7 @@ shift #get rid of the '--'
# make sure the preload is available
if [ -n "$PATHS" ]
then
- for dir in `echo $PATHS | sed 's/:/ /g'`
+ for dir in `echo $PATHS |tr : ' '`
do
if test -r "$dir/$LIB"
then
@@ -121,13 +121,18 @@ KEY_PID=`eval $FAKED $FAKEDOPTS $PIPEIN`
FAKEROOTKEY=`echo $KEY_PID|cut -d: -f1`
PID=`echo $KEY_PID|cut -d: -f2`
+if test -z "$PID"; then
+ echo >&2 "fakeroot: error while starting the \`faked' daemon."
+ exit 1
+fi
+
if [ "$WAITINTRAP" -eq 0 ]; then
- trap "kill -s TERM $PID" EXIT INT
+ trap "kill -s TERM $PID" EXIT INT QUIT TERM
else
- trap "kill -s TERM $PID ; wait $PID >/dev/null 2>&1" EXIT INT
+ trap "kill -s TERM $PID ; while kill -s 0 $PID 2>/dev/null; do wait $PID 2>/dev/null; done" EXIT INT QUIT TERM
fi
-if test -z "$FAKEROOTKEY" || test -z "$PID"; then
+if test -z "$FAKEROOTKEY"; then
echo >&2 "fakeroot: error while starting the \`faked' daemon."
exit 1
fi