[maemo-commits] [maemo-commits] r15464 - in projects/haf/trunk/osso-af-startup: debian services

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Apr 22 14:43:19 EEST 2008
Author: schulhof
Date: 2008-04-22 14:43:17 +0300 (Tue, 22 Apr 2008)
New Revision: 15464

Modified:
   projects/haf/trunk/osso-af-startup/debian/changelog
   projects/haf/trunk/osso-af-startup/services/af-defines.sh
Log:
  * Do not create /tmp/.opi.tmp when running inside scratchbox
  * Fixes: NB#77416


Modified: projects/haf/trunk/osso-af-startup/debian/changelog
===================================================================
--- projects/haf/trunk/osso-af-startup/debian/changelog	2008-04-22 10:34:03 UTC (rev 15463)
+++ projects/haf/trunk/osso-af-startup/debian/changelog	2008-04-22 11:43:17 UTC (rev 15464)
@@ -1,3 +1,10 @@
+osso-af-startup (1.54-1) unstable; urgency=low
+
+  * Do not create /tmp/.opi.tmp when running inside scratchbox
+  * Fixes: NB#77416
+
+ -- Gabriel Schulhof <gabriel.schulhof at nokia.com>  Tue, 22 Apr 2008 14:38:23 +0300
+
 osso-af-startup (1.53-3) unstable; urgency=low
 
   * Create user home directory if it's not there already. /I/ shouldn't have to do that

Modified: projects/haf/trunk/osso-af-startup/services/af-defines.sh
===================================================================
--- projects/haf/trunk/osso-af-startup/services/af-defines.sh	2008-04-22 10:34:03 UTC (rev 15463)
+++ projects/haf/trunk/osso-af-startup/services/af-defines.sh	2008-04-22 11:43:17 UTC (rev 15464)
@@ -118,22 +118,24 @@
   source_if_is keyboard.defs
   source_if_is sdl.defs
 
-  if [ ! -e /tmp/.opi.tmp -a -x /usr/bin/osso-product-info ]; then
-    if [ "x$USER" = "xroot" ]; then
-      _SUDO=''
-    else
-      _SUDO='sudo'
+  if [ ! -d /scratchbox ]; then
+    if [ ! -e /tmp/.opi.tmp -a -x /usr/bin/osso-product-info ]; then
+      if [ "x$USER" = "xroot" ]; then
+        _SUDO=''
+      else
+        _SUDO='sudo'
+      fi
+      $_SUDO /usr/bin/osso-product-info 1> /tmp/.opi.tmp.tmp 2> /dev/null
+      $_SUDO /bin/mv -f /tmp/.opi.tmp.tmp /tmp/.opi.tmp 2> /dev/null
+      unset _SUDO
     fi
-    $_SUDO /usr/bin/osso-product-info 1> /tmp/.opi.tmp.tmp 2> /dev/null
-    $_SUDO /bin/mv -f /tmp/.opi.tmp.tmp /tmp/.opi.tmp 2> /dev/null
-    unset _SUDO
+    if [ -r /tmp/.opi.tmp ]; then
+      VNAMES=`awk -F '=' '{print $1}' < /tmp/.opi.tmp`
+      source /tmp/.opi.tmp
+      export $VNAMES
+      unset VNAMES
+    fi
   fi
-  if [ -r /tmp/.opi.tmp ]; then
-    VNAMES=`awk -F '=' '{print $1}' < /tmp/.opi.tmp`
-    source /tmp/.opi.tmp
-    export $VNAMES
-    unset VNAMES
-  fi
 
   export AF_DEFINES_SOURCED=1
 


More information about the maemo-commits mailing list