From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 07 May 2021 08:43:16 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1leuCi-0003xi-UA for lore@lore.pengutronix.de; Fri, 07 May 2021 08:43:16 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1leuCi-000641-Gr; Fri, 07 May 2021 08:43:16 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1leuCK-00063n-Pg; Fri, 07 May 2021 08:42:53 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1leuCK-0002JM-7u; Fri, 07 May 2021 08:42:52 +0200 Received: from mol by dude03.red.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1leuCK-00GbaT-70; Fri, 07 May 2021 08:42:52 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Fri, 7 May 2021 08:42:41 +0200 Message-Id: <20210507064241.3957557-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210427114904.gl2igfgfxv3ahmas@pengutronix.de> References: <20210427114904.gl2igfgfxv3ahmas@pengutronix.de> MIME-Version: 1.0 Subject: [ptxdist] [PATCH] ptxd_make_world_package_info: improve rev config handling when layers are involved X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Michael Olbrich Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false If a config is found in a base layer then this is used to calculate the diff. So the ref config is only used if no lower layer has a config. Improve the package-info output to take this into account: - print the ref config only if it is actually used - otherwise print the used base config from a lower layer Signed-off-by: Michael Olbrich --- On Tue, Apr 27, 2021 at 01:49:04PM +0200, Roland Hieber wrote: > Michael, do you have an idea how to improve this? What about this? Michael scripts/lib/ptxd_make_world_kconfig.sh | 9 +++++++-- scripts/lib/ptxd_make_world_package_info.sh | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/scripts/lib/ptxd_make_world_kconfig.sh b/scripts/lib/ptxd_make_world_kconfig.sh index 52005191633b..0aea5316856b 100644 --- a/scripts/lib/ptxd_make_world_kconfig.sh +++ b/scripts/lib/ptxd_make_world_kconfig.sh @@ -16,12 +16,17 @@ ptxd_make_world_kconfig_mode() { } export -f ptxd_make_world_kconfig_mode -ptxd_make_kconfig_setup() { +ptxd_make_kconfig_init() { if [ -n "${ref_file_dotconfig}" ]; then file_dotconfig="${ref_file_dotconfig}" ptxd_normalize_config && relative_ref_file_dotconfig="${relative_file_dotconfig}" fi && - ptxd_normalize_config && + ptxd_normalize_config +} +export -f ptxd_make_kconfig_init + +ptxd_make_kconfig_setup() { + ptxd_make_kconfig_init && ptxd_kconfig_setup_config "${ptx_config_mode}" "${pkg_build_dir}/.config" \ "${relative_file_dotconfig}" "${file_dotconfig}" "${relative_ref_file_dotconfig}" if [ ${?} -ne 0 ]; then diff --git a/scripts/lib/ptxd_make_world_package_info.sh b/scripts/lib/ptxd_make_world_package_info.sh index 4d17f3d2c976..48b7b21dacc1 100644 --- a/scripts/lib/ptxd_make_world_package_info.sh +++ b/scripts/lib/ptxd_make_world_package_info.sh @@ -7,6 +7,8 @@ # ptxd_make_world_package_info() { + local last_config base_config ref_config + # use patchin_init for pkg_patch_dir ptxd_make_world_patchin_init || return do_echo() { @@ -26,8 +28,22 @@ ptxd_make_world_package_info() { do_echo "image:" "$(ptxd_print_path "${image_image}")" echo + if [ -n "${pkg_config}" ]; then + local file_dotconfig="${pkg_config}" + local ref_file_dotconfig="${pkg_ref_config}" + ptxd_make_kconfig_init + ptxd_kconfig_find_config "update" "${relative_file_dotconfig}" "${relative_ref_file_dotconfig}" + if [ "${base_config}" = "${pkg_ref_config}" ]; then + base_config= + fi + if [ -z "${base_config}" ]; then + ref_config="${pkg_ref_config}" + fi + fi + do_echo "config:" "$(ptxd_print_path "${pkg_config}")" - do_echo "ref config:" "$(ptxd_print_path "${pkg_ref_config}")" + do_echo "base config:" "$(ptxd_print_path "${base_config}")" + do_echo "ref config:" "$(ptxd_print_path "${ref_config}")" do_echo "${pkg_config}" do_echo "license:" "${pkg_license}" -- 2.29.2 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de