From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [ptxdist] [PATCH] ptxd_make_world_package_info: improve rev config handling when layers are involved
Date: Fri, 7 May 2021 08:42:41 +0200 [thread overview]
Message-ID: <20210507064241.3957557-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20210427114904.gl2igfgfxv3ahmas@pengutronix.de>
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 <m.olbrich@pengutronix.de>
---
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
next prev parent reply other threads:[~2021-05-07 6:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 21:59 [ptxdist] [PATCH] doc: add section about kconfig diffs Roland Hieber
2021-04-27 8:30 ` [ptxdist] [PATCH v2] " Roland Hieber
2021-04-27 11:49 ` Roland Hieber
2021-05-07 6:42 ` Michael Olbrich [this message]
2021-05-07 6:07 ` [ptxdist] [APPLIED] " Michael Olbrich
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=20210507064241.3957557-1-m.olbrich@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/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