[SM-2008100310022915938] Added by stf
submaster@rocklinux.org
submaster at rocklinux.org
Fri Oct 3 10:02:29 CEST 2008
SubMaster Action:
Added by stf
On Patch [2008100310022915938]:
Stefan Fiedler:
scripts/Build-Pkg: start and stop find, strace and
flwrapper file detection at the same time
+++ /home/user/Build-Pkg 2008-10-02 14:00:38.000000000 +0200
@@ -360,14 +360,6 @@
exit $returncode
fi
-if [ "$ROCKCFG_FLIST" = "flwrapper" -a -z "$FLWRAPPER" ] ; then
- export FLWRAPPER_WLOG="$builddir/fl_wrapper.wlog"
- export FLWRAPPER_RLOG="$builddir/fl_wrapper.rlog"
- export FLWRAPPER_BASEPID=$$
- [ "$LD_PRELOAD" ] && LD_PRELOAD="${LD_PRELOAD}:"
- export FLWRAPPER="$base/build/$ROCKCFG_ID/ROCK/$toolsdir/lib/fl_wrapper.so"
- export LD_PRELOAD="${LD_PRELOAD}$FLWRAPPER"
-fi
export INSTALL_WRAPPER_LOGFILE="$builddir/install_wrapper.log"
export CMD_WRAPPER_LOGFILE="$builddir/cmd_wrapper.log"
@@ -431,9 +423,6 @@
build_root="$build_root" build_rock="$build_rock" \
build_logs="$build_logs" build_pkgs="$build_pkgs" \
ROCK_THIS_IS_CHROOT="$ROCK_THIS_IS_CHROOT" \
- FLWRAPPER_WLOG="$FLWRAPPER_WLOG" FLWRAPPER_RLOG="$FLWRAPPER_RLOG" \
- FLWRAPPER_BASEPID="$FLWRAPPER_BASEPID" FLWRAPPER="$FLWRAPPER" \
- LD_PRELOAD="${LD_PRELOAD}" \
$0 $options
returncode=$?
[ ! -e "$root/var/adm/cache/$xpkg.tm" ] && exit $returncode
@@ -505,9 +494,6 @@
build_root="$build_root" build_rock="$build_rock" \
build_logs="$build_logs" build_pkgs="$build_pkgs" \
ROCK_THIS_IS_CHROOT="$ROCK_THIS_IS_CHROOT" \
- FLWRAPPER_WLOG="$FLWRAPPER_WLOG" FLWRAPPER_RLOG="$FLWRAPPER_RLOG" \
- FLWRAPPER_BASEPID="$FLWRAPPER_BASEPID" FLWRAPPER="$FLWRAPPER" \
- LD_PRELOAD="${LD_PRELOAD}" \
$0 $options
fi
fi
@@ -767,14 +753,6 @@
fi
fi
-if [ "$ROCKCFG_FLIST" = "flwrapper" ] ; then
- rm -f "$builddir/"fl_wrapper.{r,w}log
- touch "$builddir/"fl_wrapper.{r,w}log
-elif [ "$ROCKCFG_FLIST" = "find" ] ; then
- touch "$builddir/temp.time_stamp"
- sleep 2
-fi
-
if [ $stagelevel -gt 1 -a "$autoso2a" = 1 ]; then
export AUTOSO2A_DIR="$builddir/autoso2a"
export AUTOSO2A_AR="$AR" AUTOSO2A_RANLIB="$RANLIB"
@@ -918,10 +896,10 @@
# Create PID file
#
# The builtin variable '$$' is not this pid because this proc
- # is just a sub-proc of $$. That's why the $builddir/strace.tmp
+ # is just a sub-proc of $$. That's why the $builddir/build.pid
# hack is required to get the right pid to trace.
#
- # We also connect file descriptor 3 with the pid file. So the command
+ # We also connect file descriptor 200 with the pid file. So the command
# 'fuser' can be used to create a list of all processes which are part
# of this build process.
#
@@ -938,7 +916,10 @@
exit
fi
- if [ "$ROCKCFG_FLIST" = "strace" ] ; then
+ if [ "$ROCKCFG_FLIST" = "find" ] ; then
+ touch "$builddir/temp.time_stamp"
+ sleep 2
+ elif [ "$ROCKCFG_FLIST" = "strace" ] ; then
if [ "$(uname -m)" = "ppc" ]; then
SYSEXIT="exit"
else
@@ -949,6 +930,14 @@
`fork,clone,vfork,`
`$SYSEXIT,exit_group -p `cat "$builddir/build.pid"` &
strace_pid=$! ; sleep 1 ; cd $base
+ elif [ "$ROCKCFG_FLIST" = "flwrapper" ] ; then
+ export FLWRAPPER="$base/build/$ROCKCFG_ID/ROCK/$toolsdir/lib/fl_wrapper.so"
+ export FLWRAPPER_BASEPID=$$
+ export FLWRAPPER_RLOG="$builddir/fl_wrapper.rlog"
+ export FLWRAPPER_WLOG="$builddir/fl_wrapper.wlog"
+ rm -f "$FLWRAPPER_RLOG" "$FLWRAPPER_WLOG"
+ touch "$FLWRAPPER_RLOG" "$FLWRAPPER_WLOG"
+ export LD_PRELOAD="${LD_PRELOAD}${LD_PRELOAD:+:}$FLWRAPPER"
fi
echo "Running main build function '$mainfunction' ..."
@@ -964,8 +953,11 @@
sleep 1 ; kill -INT $strace_pid ; sleep 1
fl_stparse -w "$builddir/fl_wrapper.wlog" \
-r "$builddir/fl_wrapper.rlog" < "$builddir/strace.out"
-
+ elif [ "$ROCKCFG_FLIST" = "flwrapper" ] ; then
+ export LD_PRELOAD="${LD_PRELOAD//${FLWRAPPER}/}"
+ export LD_PRELOAD="${LD_PRELOAD//::/:}"
fi
+
if [ "$ROCKCFG_FLIST" = "flwrapper" -o \
"$ROCKCFG_FLIST" = "strace" ] ; then
if [ "$stagelevel" -le 2 ]
@@ -1393,11 +1385,6 @@
rm -f $base/build/$ROCKCFG_ID/pseudonative_handler
fi
-if [ "$ROCKCFG_FLIST" = "flwrapper" ] ; then
- export LD_PRELOAD="${LD_PRELOAD//${FLWRAPPER}/}"
- export LD_PRELOAD="${LD_PRELOAD//::/:}"
-fi
-
if [ "$ROCKCFG_SRC_TMPFS" = 1 ]; then
umount -l "$builddir"
fi
--
https://www.rocklinux.net/submaster/?mode=patch&uid=2008100310022915938
More information about the rock-sm
mailing list