[oe-commits] Martin Jansa : tzdata: fix postinst

git at git.openembedded.org git at git.openembedded.org
Thu Apr 9 10:29:14 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: bb1213d75b9649b06c53e7078086799054438648
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=bb1213d75b9649b06c53e7078086799054438648

Author: Martin Jansa <martin.jansa at gmail.com>
Date:   Wed Apr  8 14:40:44 2015 +0200

tzdata: fix postinst

* add quotes around possibly empty tz variable
* use exit instead of return, because we're not in function and postinst
  fails:
  line 9: return: can only `return' from a function or sourced script"

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-extended/tzdata/tzdata.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/tzdata/tzdata.inc b/meta/recipes-extended/tzdata/tzdata.inc
index 37ae926..ee56d36 100644
--- a/meta/recipes-extended/tzdata/tzdata.inc
+++ b/meta/recipes-extended/tzdata/tzdata.inc
@@ -60,8 +60,8 @@ pkg_postinst_${PN} () {
 		tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
 	fi
 	
-	if [ -z ${tz} ] ; then
-		return 0
+	if [ -z "${tz}" ] ; then
+		exit 0
 	fi
 	
 	if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then



More information about the Openembedded-commits mailing list