Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] tzdata: fix postinst
@ 2015-04-08 12:40 Martin Jansa
  2015-04-08 12:40 ` [PATCH 2/2] pango: " Martin Jansa
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Jansa @ 2015-04-08 12:40 UTC (permalink / raw)
  To: openembedded-core

* 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@gmail.com>
---
 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
-- 
2.3.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-08 12:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-08 12:40 [PATCH 1/2] tzdata: fix postinst Martin Jansa
2015-04-08 12:40 ` [PATCH 2/2] pango: " Martin Jansa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox