[Pkg-ocaml-maint-commits] r2993 - in /trunk/packages/mldonkey/trunk/debian: changelog utils/mldonkey_create_chroot utils/purify_mldonkey utils/test.sh

smimram at users.alioth.debian.org smimram at users.alioth.debian.org
Fri Jul 28 16:30:37 UTC 2006


Author: smimram
Date: Fri Jul 28 16:30:35 2006
New Revision: 2993

URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/?sc=1&rev=2993
Log:
Correct bashisms in mldonkey_create_chroot.

Removed:
    trunk/packages/mldonkey/trunk/debian/utils/test.sh
Modified:
    trunk/packages/mldonkey/trunk/debian/changelog
    trunk/packages/mldonkey/trunk/debian/utils/mldonkey_create_chroot   (contents, props changed)
    trunk/packages/mldonkey/trunk/debian/utils/purify_mldonkey

Modified: trunk/packages/mldonkey/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/mldonkey/trunk/debian/changelog?rev=2993&op=diff
==============================================================================
--- trunk/packages/mldonkey/trunk/debian/changelog (original)
+++ trunk/packages/mldonkey/trunk/debian/changelog Fri Jul 28 16:30:35 2006
@@ -1,3 +1,9 @@
+mldonkey (2.7.7-7) UNRELEASED; urgency=low
+
+  * Correct bashisms in mldonkey_create_chroot, closes: #380222.
+
+ -- Samuel Mimram <smimram at debian.org>  Fri, 28 Jul 2006 18:29:28 +0200
+
 mldonkey (2.7.7-6) unstable; urgency=low
 
   * Use POSIX way of defining functions for init_error, closes: #379142.

Modified: trunk/packages/mldonkey/trunk/debian/utils/mldonkey_create_chroot
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/mldonkey/trunk/debian/utils/mldonkey_create_chroot?rev=2993&op=diff
==============================================================================
--- trunk/packages/mldonkey/trunk/debian/utils/mldonkey_create_chroot (original)
+++ trunk/packages/mldonkey/trunk/debian/utils/mldonkey_create_chroot Fri Jul 28 16:30:35 2006
@@ -44,7 +44,8 @@
 
 ###############################################################################
 #### VARS
-function setDefaults {
+setDefaults ()
+{
   LOG=/dev/null
   DEFAULT_SETTINGS=/etc/default/mldonkey-server
   ##SETTINGS WHICH SHOULD BE IN $DEFAULT_SETTINGS
@@ -71,9 +72,10 @@
 
 #==========================================#
 ## Usage
-function usage() {
+usage ()
+{
   local progname=$0
-  progname=${progname/*\/}
+  progname=`basename $progname`
   setDefaults   #(re)set the defaults for correct (??) output
 
   cat <<EOF
@@ -96,11 +98,12 @@
 
 #==========================================#
 ## Get options
-function getOptions {
+getOptions ()
+{
   local argC=$#
   local argNr=0
 
-  function increment { eval $1=$(($1+1)); }
+  increment () { eval $1=$(($1+1)); }
 
   while getopts "f:u:g:r:d:l:cyh" arg; do
     increment argNr
@@ -117,7 +120,7 @@
       *)  usage; myExit     ;;
     esac
   done
-  
+
   if [ "x$argC" != "x$argNr" ]; then 
     eval "faultArg=\$$OPTIND";
     echo
@@ -131,7 +134,8 @@
 
 #==========================================#
 ##exit function with message
-function myExit() {
+myExit ()
+{
   echo -e "   $@"
   exit 1
 }
@@ -139,7 +143,8 @@
 
 #==========================================#
 ## myTrap
-function myTrap(){
+myTrap ()
+{
   trap - $TRAPPED;               #reset traps
   runAtExit;                     #run commands added with: runAtexit add comand args
   #now exit with a nice message
@@ -148,7 +153,8 @@
 
 #==========================================#
 ## Functions run at exit
-function runAtExit() {
+runAtExit ()
+{
   case "$1" in
     "add")
       shift;
@@ -157,9 +163,9 @@
       ;;
     "run"|"")
       runCount=${#functionsRunAtExit[*]};
-      for((i=0;  $i < $runCount  ; i=$(($i+1)) )) ; do 
+      for i in `seq 0 $(($runCount - 1))`; do
         ${functionsRunAtExit[$i]}
-      done      
+      done
       ;;
     *)
       myExit "Error: Wrong arg given to runAtExit. This is a bug!!"
@@ -169,7 +175,8 @@
 
 #==========================================#
 ## Extend PRESERVE variable, takes a path to a dir or file as argument
-function addToPreserve() {
+addToPreserve ()
+{
   if [ "x$PRESERVE" = "x" ] ; then
     PRESERVE=\"$@\"
   else
@@ -181,7 +188,8 @@
 ##umount and remove proc if proc already in CHROOT_DIR
 ##(???Bug in makejail? If cleanJailFirst=1 and proc in preserve list, makejail
 ## results in an OSerror (no 17).  (Not reported yet) ???)
-function manageProc() {
+manageProc ()
+{
   if [ -e $CHROOT_DIR/proc ] ; then
     umount  $CHROOT_DIR/proc 2> /dev/null 
     rmdir $CHROOT_DIR/proc
@@ -191,7 +199,8 @@
 #==========================================#
 ##create configuration file for makejail
 ##(the config file is a python script!)
-function create_configfile_makejail () {
+create_configfile_makejail ()
+{
   cat >$PYTHON_SCRIPT <<EOB
 ##
 # Tmp makejail configuration file for mldonkey

Propchange: trunk/packages/mldonkey/trunk/debian/utils/mldonkey_create_chroot
------------------------------------------------------------------------------
    svn:executable = *

Modified: trunk/packages/mldonkey/trunk/debian/utils/purify_mldonkey
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/mldonkey/trunk/debian/utils/purify_mldonkey?rev=2993&op=diff
==============================================================================
--- trunk/packages/mldonkey/trunk/debian/utils/purify_mldonkey (original)
+++ trunk/packages/mldonkey/trunk/debian/utils/purify_mldonkey Fri Jul 28 16:30:35 2006
@@ -1,12 +1,12 @@
 #!/bin/sh
-
 
 MLDONKEY_VERSION=$2
 ORIG=$1
 
-set -e 
+set -e
 
-function safe_remove () {
+safe_remove ()
+{
   rm -rf $1 || echo $1 not found
 }
 
@@ -14,7 +14,6 @@
   echo "Directory mldonkey-$MLDONKEY_VERSION exists"
   exit 1
 fi
-  
 
 tar xjf $ORIG
 




More information about the Pkg-ocaml-maint-commits mailing list