From patchwork Thu Apr 20 02:10:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Ryazanov X-Patchwork-Id: 752603 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w7j6f59SVz9s3s for ; Thu, 20 Apr 2017 12:11:54 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mZs4tdy5"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="qCw1vvjb"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Yv3CH91Y89fLAUspkaqayXzZ3r/9JiCvNR8xKa5U7rw=; b=mZs4tdy5LbpARP 3/tK3m44IfgLq0XZWdaXrjoxb9WUyOH2K03NpTWOOrJZ5F9pTcr22EshwMuMbYvyhLHZnLSpTwL+0 nFTWYx45dgr8dKweOczY4TGn8b3MQz9yp5wOr1R9p+X0G4ZVqj9sdP3mbGgxNCtugUsdw5SSc+XBL vqTaIW5HzkGt2OelBNZwZvKFpVopnUJY3x+chGJ0Wvlz69oe9SHTkomOXl4RL7NqLLvJqBHKjahDP UkjhwTFxblcPsD2XOwIkx8Nd80IqFEavdJEAzF85PMzdIAnOPgbK5+b46ndwq9XUu7dTp57RoGX4y Ui/Hl+ivvCOTp1nGKCVg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d11ZQ-0007jW-Tk; Thu, 20 Apr 2017 02:11:44 +0000 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d11ZN-0007hw-8z for lede-dev@lists.infradead.org; Thu, 20 Apr 2017 02:11:43 +0000 Received: by mail-lf0-x243.google.com with SMTP id 75so4182840lfs.3 for ; Wed, 19 Apr 2017 19:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=WAND9lHnYP96oYb/5Qwl4OYqQ2iTOkGVQ9eMhxNwrUs=; b=qCw1vvjb3tzVPsXevRnBRvn/NLUNcTfpchmrNbiJzeRzB11mVbNPRSnKQuqwqDSCg3 Er9yjqFx5/+rOUCg4ib5LtJyyX33UW1XAqx5bxC3WCoxqW638I8Ysoer+kboIr9I0p13 xl7qtdB10Pq8NOvEzKFfYZrcYXIgPz+QMprQdzpgC0BqbD0yits+vieIJiACQ++W9PaB c47/7oLUEB57Nu2sYywT6G9qy9EbgMDxDu+JBm9QvpLgoI2MdNkS1XGpjghOffOinIe2 Ur/tpdaIC5qogoaZN4XOxTIy2mJdf829/ckRWYIPSFob4nTsGC/MAhX3QoE3qpikBIXp Gh+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WAND9lHnYP96oYb/5Qwl4OYqQ2iTOkGVQ9eMhxNwrUs=; b=aaaBhQkdWyU8Ev07wC3cojpdPltcRW3rGiSq1gumS6j7eIojRh34cfs6I0rlkW6Se6 OmZ5lXmHww2gNjRqOqpAjbMXXhGJue3lLO0SKQY1LrwUk1jUaFVGEksqiO0mOL+w5xcq AiS/iUVSbnosCaFGH2t/ztfuG6H0RcZPSG9kMt9HQZGp1nowWv1sR8btjWPymhlwA45O 3Q7y7fjg2CDdTsbwVHZvv5zZ+Iseqf8It6imMZjM8vMaRmcHltmEj5nAMRvSJlgm1EXz YASgBq35lXvaaVXZFrXN4rCU5RfHkaVmV7Dri3vGD6PB+dvNKsg3yFYlksgcF6Ox5PlR N63w== X-Gm-Message-State: AN3rC/4PD0/iljhMG72RrmzV4sZmcLI2SAT6zv9iHmehEB4cLLNJoq55 PEYm6Q2/sXXcDQ== X-Received: by 10.25.145.27 with SMTP id t27mr1951209lfd.137.1492654278605; Wed, 19 Apr 2017 19:11:18 -0700 (PDT) Received: from rsa-laptop.internal.lan ([217.25.229.52]) by smtp.gmail.com with ESMTPSA id c5sm748062lfk.51.2017.04.19.19.11.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Apr 2017 19:11:17 -0700 (PDT) From: Sergey Ryazanov To: Felix Fietkau Date: Thu, 20 Apr 2017 05:10:45 +0300 Message-Id: <20170420021045.485-1-ryazanov.s.a@gmail.com> X-Mailer: git-send-email 2.10.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170419_191141_523477_F897FA2F X-CRM114-Status: GOOD ( 10.24 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ryazanov.s.a[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [LEDE-DEV] [PATCH] build: fix symlinked .config handling X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: LEDE Development List MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org When running "make menuconfig" with symlinked .config (e.g. to env/.config) it renames symlink to .config.old, creates new .config file and writes updated configuration here. This breaks the desired workflow when changes in the configuration could be checked using "scripts/env diff" and commited with "scripts/env save". Since the env/.config file is not updated. Fix this issue by exporting KCONFIG_OVERWRITECONFIG=1, which forces mconf to overwrite the .config content, instead of renaming it and creating a new file. This variable is set only if .config is a symlink, otherwise the variable is not exported and the old behaviour is preserved. Signed-off-by: Sergey Ryazanov --- include/toplevel.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/toplevel.mk b/include/toplevel.mk index ceafffb..4b63e8a 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -129,7 +129,7 @@ menuconfig: scripts/config/mconf prepare-tmpinfo FORCE if [ \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then \ cp $(HOME)/.openwrt/defconfig .config; \ fi - $< Config.in + [ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; $< Config.in prepare_kernel_conf: .config FORCE