From patchwork Fri Oct 19 22:58:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nasser Afshin X-Patchwork-Id: 987096 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="l9ALfGaN"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42cLv14LQsz9s4s for ; Sat, 20 Oct 2018 09:58:53 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A59DB8805B; Fri, 19 Oct 2018 22:58:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZRgrjM3pQ63e; Fri, 19 Oct 2018 22:58:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 71AB887E8F; Fri, 19 Oct 2018 22:58:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 825EF1BF3B9 for ; Fri, 19 Oct 2018 22:58:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7FA7087E8F for ; Fri, 19 Oct 2018 22:58:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ivC+toKvlwmI for ; Fri, 19 Oct 2018 22:58:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8E2DC87E64 for ; Fri, 19 Oct 2018 22:58:45 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id r63-v6so5022312wma.4 for ; Fri, 19 Oct 2018 15:58:45 -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=yzf8vFL+d1KCtUhI00QdbrxFa8gSeGJlT2+aYxPHquE=; b=l9ALfGaNxV934elsc1KvBS4uQ78t2sTsNJsiVuueVcq97jljtZ6HGXPKuEXEah17P4 g8bh+zQguueypRNDJofsziVzmwQdk7+zcjoVyeWAE3Ey/GL+7bvlTPyaClBz3w13JD/x dP6Sx/4yYlYMSxnb+QFkhvLfOIy1jpwelIuAaGluUP/HjFfzbYxflvugVrb5eMOL/4SI 5lgNcV1tKsgSOXF5n7V9KW85y1bqzrlpwyUkkOOTykLUng4q7VL3m9uHAl8VowN1otvH OopZyJG/SpkR9CqBmk1KvbdoqCgCPD4w+MP60z65auhY8If1+X8E/fdDqNVeJTW4gIPa kyZA== 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=yzf8vFL+d1KCtUhI00QdbrxFa8gSeGJlT2+aYxPHquE=; b=d+cqS0bsv9Sl/EBGEP71m3anRDF+uoTtWnPlAOxBBIK81gJNX4N4jW5Ko3/c2AFG7u LvV98Jmj6YwdSypKgcNeyC4h3i5VySL/ycGSGhfZCtktL/hKdyHFOkEHmJ7uXI81Oeh9 3d9/apoTJE/0Z5Pxnn645EGcF2y14wRIrfx2+kQre549LrRPN5/ok9NswBbd1zt9gV8k UgVcfoifcFMYUPMi0DWJkWMuLY4xvbxxN2iV3PdBV3H35pBc+2CFnajFbWAtloWaFGep Z/2HuCuGKFlfjOdn6q8rs2njrOclNPQCNUbk8ODDMRDEs1dCaGAdroaVBBkJapTrCQRJ B6Wg== X-Gm-Message-State: AGRZ1gLUDt8LMGywKM0znHb7Dm1BltYNdeFvSXEWjrULhSKzy0j8ylLP iyUezHt3xHOEzhaK/HHjheZ5lGEZ X-Google-Smtp-Source: ACcGV61QvE25Vufwb/rTCDQeLhKjv5YS2qkXdZJ1blCQMvP/3vtHa9XtAK+YIgEa0i86GCxXKSAHfw== X-Received: by 2002:a1c:a851:: with SMTP id r78-v6mr2129296wme.97.1539989923755; Fri, 19 Oct 2018 15:58:43 -0700 (PDT) Received: from localhost.localdomain ([151.239.92.136]) by smtp.gmail.com with ESMTPSA id h12-v6sm2885946wrs.36.2018.10.19.15.58.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Oct 2018 15:58:43 -0700 (PDT) From: Nasser X-Google-Original-From: Nasser To: buildroot@buildroot.org Date: Sat, 20 Oct 2018 02:28:23 +0330 Message-Id: <1539989903-19803-1-git-send-email-Afshin.Nasser@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH] merge_config.sh: Fix finding redundant config mechanism X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nasser MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" We use BR2_* style for configuration variables in buildroot so we should use this style when extracting configuration options. Otherwise CFG_LIST will almost always be empty. The CONFIG_* style has been taken form the Linux kernel and is not appropriate in this context. Signed-off-by: Nasser --- If you add 'set -x' in the beginning of the script you can see that $CFG_LIST is always empty. When having redundancy in the configuration fragments, you can see that the $TMP_FILE file has redundant configuration options when calling 'make'. Note that after applying this patch, calling 'make' in this script, will not produce any warnings due to redundancy issues anymore. This is because now repeated options are all properly omitted before calling 'make'. After applying this patch '-r -m' options work as expected. Further more, note that without this patch, any inconsistent re-assignment is not reported by this script. Although there are some warnings if you did not specify -m option. They are all 'make' reports. support/kconfig/merge_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/kconfig/merge_config.sh b/support/kconfig/merge_config.sh index 67d1314..87a8d02 100755 --- a/support/kconfig/merge_config.sh +++ b/support/kconfig/merge_config.sh @@ -99,7 +99,7 @@ if [ ! -r "$INITFILE" ]; then fi MERGE_LIST=$* -SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p" +SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(BR2_[a-zA-Z0-9_]*\)[= ].*/\2/p" TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX) echo "Using $INITFILE as base"