[oe-commits] Martin Jansa : navit: restore old value in /proc/sys/vm/ overcommit_memory after successfull exit, switch to INC_PR
git version control
git at git.openembedded.org
Tue Nov 24 12:42:43 UTC 2009
Module: openembedded.git
Branch: shr/merge
Commit: e230298e9eec67e57ef7d50867b9076a3c199228
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=e230298e9eec67e57ef7d50867b9076a3c199228
Author: Martin Jansa <Martin.Jansa at gmail.com>
Date: Tue Nov 24 13:36:56 2009 +0100
navit: restore old value in /proc/sys/vm/overcommit_memory after successfull exit, switch to INC_PR
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
recipes/navit/files/navit.launcher | 6 ++++--
recipes/navit/files/shr/navit.launcher | 25 ++++++++++++++-----------
recipes/navit/navit.inc | 1 +
recipes/navit/navit_0.0.4.bb | 2 +-
recipes/navit/navit_0.1.0.bb | 2 +-
recipes/navit/navit_svn.bb | 2 +-
6 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/recipes/navit/files/navit.launcher b/recipes/navit/files/navit.launcher
index b95aadb..74d5675 100644
--- a/recipes/navit/files/navit.launcher
+++ b/recipes/navit/files/navit.launcher
@@ -19,12 +19,14 @@ then
if test "$USER" = "root"
then
echo "Enabling low-mem workaround..."
+ OLD=`cat /proc/sys/vm/overcommit_memory`
echo 1 > /proc/sys/vm/overcommit_memory
+ navit.real $*
+ echo ${OLD} > /proc/sys/vm/overcommit_memory
+ exit
else
echo "I need root-privs to enable the low-mem workaround!"
fi
fi
navit.real $*
-
-
diff --git a/recipes/navit/files/shr/navit.launcher b/recipes/navit/files/shr/navit.launcher
index de6e7c4..68baaeb 100644
--- a/recipes/navit/files/shr/navit.launcher
+++ b/recipes/navit/files/shr/navit.launcher
@@ -20,17 +20,6 @@
# This can be worked around by doing
# "echo 1 > /proc/sys/vm/overcommit_memory"
-if test "`cat /proc/meminfo | grep ^MemTotal | awk '{print $2}'`" -lt "500000"
-then
- if test "$USER" = "root"
- then
- echo "Enabling low-mem workaround..."
- echo 1 > /proc/sys/vm/overcommit_memory
- else
- echo "I need root-privs to enable the low-mem workaround!"
- fi
-fi
-
# check if navit already running:
pgrep '^navit$'
not_running=$?
@@ -50,5 +39,19 @@ else
# HINT: that should be set in illume, but atm its not
# export LANG=de_AT.utf8
+ if test "`cat /proc/meminfo | grep ^MemTotal | awk '{print $2}'`" -lt "500000"
+ then
+ if test "$USER" = "root"
+ then
+ echo "Enabling low-mem workaround..."
+ OLD=`cat /proc/sys/vm/overcommit_memory`
+ echo 1 > /proc/sys/vm/overcommit_memory
+ navit.real $*
+ echo ${OLD} > /proc/sys/vm/overcommit_memory
+ exit
+ else
+ echo "I need root-privs to enable the low-mem workaround!"
+ fi
+ fi
navit.real $*
fi
diff --git a/recipes/navit/navit.inc b/recipes/navit/navit.inc
index 839e869..fdb9813 100644
--- a/recipes/navit/navit.inc
+++ b/recipes/navit/navit.inc
@@ -5,6 +5,7 @@ DEPENDS = "glib-2.0 gtk+"
RRECOMMENDS = "gpsd espeak flite"
PE = "1"
+INC_PR = "r3"
inherit autotools
diff --git a/recipes/navit/navit_0.0.4.bb b/recipes/navit/navit_0.0.4.bb
index dbb83d9..75d63be 100644
--- a/recipes/navit/navit_0.0.4.bb
+++ b/recipes/navit/navit_0.0.4.bb
@@ -1,6 +1,6 @@
require navit.inc
-PR = "r2"
+PR = "${INC_PR}.0"
SRC_URI = "${SOURCEFORGE_MIRROR}/navit/navit-${PV}.tar.gz"
diff --git a/recipes/navit/navit_0.1.0.bb b/recipes/navit/navit_0.1.0.bb
index 5162fa0..9ad0948 100644
--- a/recipes/navit/navit_0.1.0.bb
+++ b/recipes/navit/navit_0.1.0.bb
@@ -1,5 +1,5 @@
require navit.inc
-PR = "r1"
+PR = "${INC_PR}.0"
SRC_URI = "${SOURCEFORGE_MIRROR}/navit/navit-${PV}.tar.gz"
diff --git a/recipes/navit/navit_svn.bb b/recipes/navit/navit_svn.bb
index e174597..b17ae51 100644
--- a/recipes/navit/navit_svn.bb
+++ b/recipes/navit/navit_svn.bb
@@ -1,5 +1,5 @@
PV = "0.1.0+svnr${SRCPV}"
-PR = "r0"
+PR = "${INC_PR}.0"
DEPENDS_shr += " librsvg-native"
More information about the Openembedded-commits
mailing list