r36224 - in /packages/scilab/trunk/debian: changelog control rules watcher.sh

c_korn-guest at users.alioth.debian.org c_korn-guest at users.alioth.debian.org
Wed Feb 24 17:42:09 UTC 2010


Author: c_korn-guest
Date: Wed Feb 24 17:42:08 2010
New Revision: 36224

URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=36224
Log:
  * debian/rules, debian/watcher.sh: Add a ticker to the build to prevent
    timeouts on some arches (only use it on Ubuntu because Debian does not
    have a timeout). Thanks to Colin Watson and Iain Lane for this idea.
    The watcher has been copied from the agda package.

Added:
    packages/scilab/trunk/debian/watcher.sh
Modified:
    packages/scilab/trunk/debian/changelog
    packages/scilab/trunk/debian/control
    packages/scilab/trunk/debian/rules

Modified: packages/scilab/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/debian-science/packages/scilab/trunk/debian/changelog?rev=36224&op=diff
==============================================================================
--- packages/scilab/trunk/debian/changelog (original)
+++ packages/scilab/trunk/debian/changelog Wed Feb 24 17:42:08 2010
@@ -1,3 +1,12 @@
+scilab (5.2.1-4) unstable; urgency=low 
+ 
+  * debian/rules, debian/watcher.sh: Add a ticker to the build to prevent 
+    timeouts on some arches (only use it on Ubuntu because Debian does not 
+    have a timeout). Thanks to Colin Watson and Iain Lane for this idea. 
+    The watcher has been copied from the agda package. 
+ 
+ -- Christoph Korn <christoph.korn at getdeb.net>  Tue, 23 Feb 2010 13:14:33 +0100
+
 scilab (5.2.1-3) unstable; urgency=low
 
   * Support of Renesas SH(sh4) thanks to Nobuhiro Iwamatsu for the patch

Modified: packages/scilab/trunk/debian/control
URL: http://svn.debian.org/wsvn/debian-science/packages/scilab/trunk/debian/control?rev=36224&op=diff
==============================================================================
--- packages/scilab/trunk/debian/control (original)
+++ packages/scilab/trunk/debian/control Wed Feb 24 17:42:08 2010
@@ -6,7 +6,7 @@
 Build-Depends: autoconf, automake, cdbs, debhelper (>= 7), cdbs, gfortran, 
  default-jdk, chrpath, ocaml-nox,
  tcl8.5-dev, tk8.5-dev, libxml2-dev, libpcre3-dev, 
- gettext, libreadline-dev, pkg-config,
+ gettext, libreadline-dev, pkg-config, lsb-release,
 # numerical libraries
  libblas-dev | librefblas3-dev | libatlas-base-dev, liblapack-dev, 
 # Java deps

Modified: packages/scilab/trunk/debian/rules
URL: http://svn.debian.org/wsvn/debian-science/packages/scilab/trunk/debian/rules?rev=36224&op=diff
==============================================================================
--- packages/scilab/trunk/debian/rules (original)
+++ packages/scilab/trunk/debian/rules Wed Feb 24 17:42:08 2010
@@ -158,3 +158,6 @@
 	[ -s modules/scilab2fortran/locales/fr_FR/scilab2fortran.po ] || rm -f modules/scilab2fortran/locales/fr_FR/scilab2fortran.po
 	[ -s modules/arnoldi/locales/fr_FR/arnoldi.po ] || rm -f modules/arnoldi/locales/fr_FR/arnoldi.po
 	[ -s modules/scipad/locales/fr_FR/scipad.po ] || rm -f modules/scipad/locales/fr_FR/scipad.po
+
+pre-build:: 
+	if [ "$$(lsb_release --id -s)" = "Ubuntu" ] ; then sh debian/watcher.sh "$$PPID" "$(CURDIR)" "$(CURDIR)/build-stamp" 'scilab' ; fi &

Added: packages/scilab/trunk/debian/watcher.sh
URL: http://svn.debian.org/wsvn/debian-science/packages/scilab/trunk/debian/watcher.sh?rev=36224&op=file
==============================================================================
--- packages/scilab/trunk/debian/watcher.sh (added)
+++ packages/scilab/trunk/debian/watcher.sh Wed Feb 24 17:42:08 2010
@@ -1,0 +1,44 @@
+#!/bin/sh
+
+if [ "$#" -ne 4 ]
+then
+    echo "Watcher: Bad args: $#"
+    exit 1
+fi
+
+CHECK_PID=$1
+DIR="$2"
+FILE="$3"
+GREP_FOR="$4"
+
+echo "Watcher: Check PID: $CHECK_PID"
+echo "Watcher: Directory: $DIR"
+echo "Watcher: File: $FILE"
+echo "Watcher: Grep for: $GREP_FOR"
+
+if [ -d "$DIR" ]; then
+    if [ -f "$DIR/watcher-lock" ]; then
+        echo "Watcher: not spawning as lock in place"
+        exit 1
+    else
+        echo "Watcher: creating lock"
+        touch $DIR/watcher-lock
+    fi
+fi
+
+# If the PID we are told still exists (our caller is still running),
+# the directory we are told (the working directory still exists) and
+# the file we are told doesn't exist (the build stamp hasn't been created)
+# keep going
+while ps "$CHECK_PID" > /dev/null &&
+      [ -d "$DIR" ] &&
+      [ ! -f "$FILE" ]
+do
+    sleep 600
+    echo "Watcher: Tick."
+    ps ux | grep -- "$GREP_FOR" | grep -v grep
+done
+
+echo "Watcher: Terminating."
+echo "Watcher: Removing lock"
+[ -f $DIR/watcher-lock ] && rm $DIR/watcher-lock




More information about the debian-science-commits mailing list