From patchwork Sun Apr 10 09:02:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: venkata.pyla@toshiba-tsip.com X-Patchwork-Id: 1667 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3) with LMTPA; Sun, 10 Apr 2022 19:02:43 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pj1-f63.google.com (mail-pj1-f63.google.com [209.85.216.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPS id 23AH2fAj022433 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 10 Apr 2022 19:02:42 +0200 Received: by mail-pj1-f63.google.com with SMTP id n17-20020a17090ac69100b001c77ebd900fsf8578019pjt.8 for ; Sun, 10 Apr 2022 10:02:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649610156; cv=pass; d=google.com; s=arc-20160816; b=OSEiyiVDnoQLHaErRWWRCJrY/utnjkSq6/wjlUbYoqSyFMaI4oMCjXFuf4Ty4F33Qj fAMh+Ve71mRqdAP9qgN7MTig/X/3jYLBCqmhgDVsdnT6uir/34yN4Vfbh0/EGVlBcaTH 5OFDbFKVC09ip1DbIfJ7H/fY0zOJZ6vo7bioqNwNoDQNq+JbQhMKxEPtxc1s6OMM0HYv Mqh28LSZFQw8d5UFv/AkyQE6VBtkztQQPWxhhMsQAkXpm6qkNA1XlQhlEL9MiFk9OT75 9IpZvbZf+efzhuqs0wBMoMRhXD41YzYoliPWrzjDjRDujybFK83usCc9m7qziailR53O y6zQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=KcilWRodt5HF7bIO5gPrXdbVI0M+0oO+8v6IhD7n3hI=; b=Z4KSO6Fh4cm9WLmoY9MUXQROmR0fy4K5SCqax3daKw7LCRwCAgMM/zqG407ylFQ+sx 2I6j7VxJiRu0C/zdzZepR0yzx8RUhScHS8ILeIEbysx6wuoBvHyMl7ApEfjw7RVuAbf4 BIc2I7MkUmryh65oxE//7lSSGf90O23+oiKXZbetDu1ffIRuJ2qd4Xe9S6DqegwrNFOV N4eDWP5J1uKonvfqguIjccNWczSCeftnwCf5j7PKINYbeRxV2zrIDskuNvZUVYxWN0gP Wj8AnerBZkRV7t1+44eb6xJUWLmLMfbSf+hwiVQhZDU8rkaS5uCsGKbtuCuFOHmxjlL5 1aMg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.156 as permitted sender) smtp.mailfrom=venkata.pyla@toshiba-tsip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=KcilWRodt5HF7bIO5gPrXdbVI0M+0oO+8v6IhD7n3hI=; b=dad2nnB3De7Q4ceCXJ4etSWWiIAd+0uu1PyuPfcbSHQ/SPrWIC3o0UIeWYvfKqUXsi G+hn6J7RUrVCGMl4oHeShEQxTAeD1DnSVkBMGXfOnlHsLyY1zS7zARlNukdfYOb/D7V/ ySAdbiPbWJMnDh0YF3jrjetwtqSmm+kKdMWf75sjpkkDQgp4oRWmV4NzwPs86DQiv5YP pri1H1Hty3NEGAogn1lB1ezlRb1nXNIPiB7gOfujhCZUPGMqG14kL8g2wUb6+wn3J5iJ 3cAGlTYg/86By+Rom8CDnNU2k1F11V+N/o5pA9LNgDCiiNULrCMyuWMGMJfj5uIbYFJ3 zi+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=KcilWRodt5HF7bIO5gPrXdbVI0M+0oO+8v6IhD7n3hI=; b=rr2+2YSic1/mtZcXjsvXIp9jxChq7QWbr1ipyTMePi5o2RLDWNJM+fKnjNTJreXuxj VswzfHWdb9Hw5WNCIa3CrrZAe9i1O9AzlkQYAcsBgjdfME+AxIRfCgkzkV4zkkre54rA 5eMp8GbMiOWGG7uvdX9Pg6ksak2z5nKY3OfNXs02a3DPWDDvX3kUzZ5SUR+iN98XNtox TVsNq5n/0yipD4oMCLO6SCbycz+uKHSwwuMGx7VuBR9vzwThyYyBneIkTjWwWXQTrUZl pwvieC9Qfd6PeS6WgDE85dIv10Vwc92fMBwc2/ISuHiPRDh0i9nK2M3BXDEpEJ1CRJR4 ilHA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532L4MCERUmQGpUr9cS/Ii2c5BpEFJNtCsiLPDeTVYoVfdENF4sM H8o+sj3vK+vXmhMW9ROlcps= X-Google-Smtp-Source: ABdhPJyEGNbf6nziWPgWtvnheoyTO7AJLoiPY7j9qmFtnmSRmTBPQmaInvvMtRhKh9wdizdZxCCNrQ== X-Received: by 2002:a17:902:d4c6:b0:156:78c:8486 with SMTP id o6-20020a170902d4c600b00156078c8486mr29139750plg.85.1649610155729; Sun, 10 Apr 2022 10:02:35 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6a00:23c2:b0:4fa:698b:ecd with SMTP id g2-20020a056a0023c200b004fa698b0ecdls4586621pfc.8.gmail; Sun, 10 Apr 2022 10:02:34 -0700 (PDT) X-Received: by 2002:a63:3586:0:b0:39c:c5e9:a657 with SMTP id c128-20020a633586000000b0039cc5e9a657mr15200000pga.3.1649610154797; Sun, 10 Apr 2022 10:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649610154; cv=none; d=google.com; s=arc-20160816; b=hUNt89C8Jv7q8z2lIk21qIdnkAObdEfNinLhtmb0jlwc0uMf9iGI1A+IGLnVyWA9vg kmz9YEk5PRZOtr5VXuzq7+TlnZZLadinC4z4TVQEua9eWsZAMrYbNHhqyTpTQYjke+j8 Pi7Ke5u44cmoRKW7MBqV2TciqDl3fAcwqch5JjOc54VQPzTeFPBoBRx0BrFnQGuxFVtq +RMTkyke8epXXq5ms0UCXBhO/Fio6T1ARmHxDJ/O/bhPr4JPOEpphU9NHDufOJme0y// iMwSbRvKU/jxkd+Zf2Kk6RS6Xb3HBx3VEVHX2H+IdZIByGRR271a4cHsMH6QZk3zjmLW xIXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=zqNM+eLOELRLwO8g1nNOAVHCiXmoiNRNWbk30pRVco0=; b=xJZKNaVztMW0hwtBlrIgdMS/V5/XOs5v/1vh6loby511JCBXBoerlKI6yrtWAbKyqE Xnm1UkRtYXeLRkg74+OJNcXGfLMbGHP9e3U5vXGAombusdOhPeMpPkrvaNHbv3w6kqzD 1SZWnlQYtWNjF2l0BTzhgUtGDH48TFsj6XPm8hEcUBxtJNq/pmXfKMDcKCW5FKL+53wx ip3Spsb+jwrnaCk/KBI0V/qIyu01va8xyO+WPnzSI+wRqJS76fbhBnnllpnPJpEqz+4e 3+4FlZtZsGlSE95tCPsO+eXRB78BCGJxZG5+awJMLv4Wey7NXwSm4DyQZGSnK/q3IrO+ i9Zw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.156 as permitted sender) smtp.mailfrom=venkata.pyla@toshiba-tsip.com Received: from mo-csw.securemx.jp (mo-csw1114.securemx.jp. [210.130.202.156]) by gmr-mx.google.com with ESMTPS id b18-20020a056a000a9200b004f6fe5417cesi894846pfl.2.2022.04.10.10.02.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Apr 2022 10:02:34 -0700 (PDT) Received-SPF: pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.156 as permitted sender) client-ip=210.130.202.156; Received: by mo-csw.securemx.jp (mx-mo-csw1114) id 23AH2Wjj028417; Mon, 11 Apr 2022 02:02:32 +0900 X-Iguazu-Qid: 2wHHJRDF5pSQUOua80 X-Iguazu-QSIG: v=2; s=0; t=1649610152; q=2wHHJRDF5pSQUOua80; m=RGweG4ttransOkjw7S5p3MheKHhjXLcwaaFHxgdwab8= Received: from imx12-a.toshiba.co.jp (imx12-a.toshiba.co.jp [61.202.160.135]) by relay.securemx.jp (mx-mr1113) id 23AH2VUh003729 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 11 Apr 2022 02:02:32 +0900 From: venkata.pyla@toshiba-tsip.com To: isar-users@googlegroups.com Cc: venkata pyla , 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 X-TSB-HOP2: ON Message-Id: <20220410170229.6369-2-venkata.pyla@toshiba-tsip.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220410170229.6369-1-venkata.pyla@toshiba-tsip.com> References: <20220410170229.6369-1-venkata.pyla@toshiba-tsip.com> MIME-Version: 1.0 X-OriginalArrivalTime: 10 Apr 2022 17:02:29.0927 (UTC) FILETIME=[C3497370:01D84CFC] X-Original-Sender: venkata.pyla@toshiba-tsip.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of venkata.pyla@toshiba-tsip.com designates 210.130.202.156 as permitted sender) smtp.mailfrom=venkata.pyla@toshiba-tsip.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: INBOX From: venkata pyla 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 --- 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 }