From: Dmitry Voytik <voytikd@gmail.com>
To: Nicolas Schier <nsc@kernel.org>, Nathan Chancellor <nathan@kernel.org>
Cc: Rong Zhang <i@rong.moe>,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
Dmitry Voytik <voytikd@gmail.com>
Subject: [PATCH] scripts/config: honor $KBUILD_OUTPUT by default
Date: Sun, 20 Sep 2026 08:43:50 +0200 [thread overview]
Message-ID: <20260920064350.17999-1-voytikd@gmail.com> (raw)
If $KBUILD_OUTPUT is set, use it by default if --file is not passed.
Fix the issue when the script silently updates a stale .config in
the root directory, while the user expects ${KBUILD_OUTPUT}/.config
to be updated.
The problem can be worked around with --file, but this is easy to miss,
and is inconsistent with how the Makefile and other tools work
(e.g., scripts/diffconfig).
Signed-off-by: Dmitry Voytik <voytikd@gmail.com>
---
scripts/config | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/config b/scripts/config
index 32428ea909c2..f52ba5e6e27e 100755
--- a/scripts/config
+++ b/scripts/config
@@ -130,6 +130,11 @@ on_exit() {
trap on_exit EXIT
FN=.config
+if [ -n "${KBUILD_OUTPUT}" ]; then
+ FN=${KBUILD_OUTPUT}/${FN}
+ echo "Using ${FN}"
+fi
+
CMDS=()
while [[ $# -gt 0 ]]; do
if [ "$1" = "--file" ]; then
--
2.55.0
next reply other threads:[~2026-09-20 6:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 6:43 Dmitry Voytik [this message]
2026-09-20 7:41 ` [PATCH v2] " Dmitry Voytik
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=20260920064350.17999-1-voytikd@gmail.com \
--to=voytikd@gmail.com \
--cc=i@rong.moe \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
/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
all inboxes | Powered by JetHome®