]> code.ossystems Code Review - openembedded-core.git/commitdiff
tzdata: fix postinst
authorMartin Jansa <martin.jansa@gmail.com>
Wed, 8 Apr 2015 12:40:44 +0000 (14:40 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 15 May 2015 17:12:05 +0000 (18:12 +0100)
* 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"

(From OE-Core master rev: 87429d37e72b1fd2f329d693b4d1b1229a90e0a2)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/tzdata/tzdata.inc

index 37ae92647cd3c1dece01a0a5bae5d5976e1e18c8..ee56d36395e93cec76231fb178d8c3cc8857ca68 100644 (file)
@@ -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