From: venkata.pyla@toshiba-tsip.com
To: isar-users@googlegroups.com
Cc: venkata pyla <venkata.pyla@toshiba-tsip.com>,
henning.schild@siemens.com, jan.kiszka@siemens.com,
dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp
Subject: [isar 1/1] image-locales-extension: Do localepurge configuration after installation
Date: Sun, 10 Apr 2022 22:32:29 +0530 [thread overview]
Message-ID: <20220410170229.6369-2-venkata.pyla@toshiba-tsip.com> (raw)
In-Reply-To: <20220410170229.6369-1-venkata.pyla@toshiba-tsip.com>
From: venkata pyla <venkata.pyla@toshiba-tsip.com>
The current seqence of copying the localepurge configuration first and
then installing localepurge package is causing the debconf cache entry,
that is because the package postinstall script assume the configuration
is already present and checks for configuration change and updates the
debconf cache entry.
With the above sequence of steps it is causing unnecessary debconf cache
entry and which is causing non-reproducible system image creation.
To avoid this, the sequence is altered to install the package first and
then configure necessary locales to remove.
Signed-off-by: venkata pyla <venkata.pyla@toshiba-tsip.com>
---
meta/classes/image-locales-extension.bbclass | 33 ++++++++++----------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/meta/classes/image-locales-extension.bbclass b/meta/classes/image-locales-extension.bbclass
index 25af540..2db6d4a 100644
--- a/meta/classes/image-locales-extension.bbclass
+++ b/meta/classes/image-locales-extension.bbclass
@@ -60,6 +60,16 @@ __EOF__
# Install configuration into image:
sudo -E -s <<'EOSUDO'
set -e
+ localepurge_state='i'
+ if chroot '${ROOTFSDIR}' dpkg -s localepurge 2>/dev/null >&2
+ then
+ echo 'localepurge was installed (leaving it installed later)'
+ else
+ localepurge_state='p'
+ echo 'localepurge was not installed (removing it later)'
+ chroot '${ROOTFSDIR}' apt-get ${ROOTFS_APT_ARGS} localepurge
+ fi
+
cat '${WORKDIR}/locale.gen' >> '${ROOTFSDIR}/etc/locale.gen'
cat '${WORKDIR}/locale.default' > '${ROOTFSDIR}/etc/default/locale'
cat '${WORKDIR}/locale.nopurge' > '${ROOTFSDIR}/etc/locale.nopurge'
@@ -67,15 +77,6 @@ __EOF__
# Enter image and trigger locales config and localepurge:
chroot '${ROOTFSDIR}' /bin/sh <<'EOSH'
- localepurge_state='i'
- if dpkg -s localepurge 2>/dev/null >&2
- then
- echo 'localepurge was installed (leaving it installed later)'
- else
- localepurge_state='p'
- echo 'localepurge was not installed (removing it later)'
- apt-get ${ROOTFS_APT_ARGS} localepurge
- fi
echo 'running locale debconf-set-selections'
debconf-set-selections /tmp/locale.debconf
@@ -86,13 +87,13 @@ __EOF__
echo 'running localepurge'
localepurge
-
- if [ "$localepurge_state" = 'p' ]
- then
- echo removing localepurge...
- apt-get purge --yes localepurge
- apt-get autoremove --purge --yes
- fi
EOSH
+
+ if [ "$localepurge_state" = 'p' ]
+ then
+ echo removing localepurge...
+ chroot '${ROOTFSDIR}' apt-get purge --yes localepurge
+ chroot '${ROOTFSDIR}' apt-get autoremove --purge --yes
+ fi
EOSUDO
}
--
2.20.1
next prev parent reply other threads:[~2022-04-10 17:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-10 17:02 [isar 0/1] Fix non-reproducible issue due to localepurge venkata.pyla
2022-04-10 17:02 ` venkata.pyla [this message]
2022-04-11 10:53 ` Henning Schild
2022-04-11 13:14 ` Jan Kiszka
2022-04-13 12:15 ` Venkata.Pyla
2022-04-14 8:08 ` Henning Schild
2022-04-14 15:38 ` Jan Kiszka
2022-05-06 9:45 ` [isar][RFC] rootfs: clean debconf cache files venkata.pyla
2022-05-10 7:19 ` Venkata.Pyla
2022-06-08 14:40 ` Venkata.Pyla
2022-06-10 7:41 ` Anton Mikanovich
2022-06-16 3:54 ` Venkata.Pyla
2022-06-16 4:36 ` [PATCH] " venkata.pyla
2022-09-26 9:03 ` Anton Mikanovich
2022-06-09 6:04 ` [isar][RFC] " Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220410170229.6369-2-venkata.pyla@toshiba-tsip.com \
--to=venkata.pyla@toshiba-tsip.com \
--cc=dinesh.kumar@toshiba-tsip.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=kazuhiro3.hayashi@toshiba.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox