[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: [OE-core][dunfell v2 08/14] tzdata: remove exit 0 from pkg_postinst
From: "Steve Sakoman" <steve () sakoman ! com>
Date: 2020-04-30 22:30:13
Message-ID: ebf675abd0a077bc9aa71acf62b0477a84e1f536.1588285073.git.steve () sakoman ! com
[Download RAW message or body]
From: Maxime Roussin-B?langer <maxime.roussinbelanger@gmail.com>
Documentation says that if you exit 0 in a pkg_postinst it will marked as
installed.
If you exit 0, before running postinst-intercepts defer_to_first_boot, the
pkg_postinst_ontarget script will not be present on target.
The "exit 0" in tzdata makes it difficult to have a bbappend with a
pkg_postinst_target step when you have `INSTALL_TIMEZONE_FILE = 0`
Signed-off-by: Maxime Roussin-BĂ©langer <maxime.roussinbelanger@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
meta/recipes-extended/timezone/tzdata.bb | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-extended/timezone/tzdata.bb b/meta/recipes-extended/timezone/tzdata.bb
index 1e2d9bd1b9..1e2b440fb0 100644
--- a/meta/recipes-extended/timezone/tzdata.bb
+++ b/meta/recipes-extended/timezone/tzdata.bb
@@ -60,12 +60,8 @@ pkg_postinst_${PN} () {
if [ -e ${src} ] ; then
tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
fi
-
- if [ -z "${tz}" ] ; then
- exit 0
- fi
-
- if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
+
+ if [ ! -z "${tz}" -a ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
echo "You have an invalid TIMEZONE setting in ${src}"
echo "Your ${etc_lt} has been reset to Universal; enjoy!"
tz="Universal"
--
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#137690): \
https://lists.openembedded.org/g/openembedded-core/message/137690 Mute This Topic: \
https://lists.openembedded.org/mt/73386660/4454766 Group Owner: \
openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/leave/8023720/1801066118/xyzzy \
[openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic