From patchwork Sun Dec 1 10:50:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 295645 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 666AF2C007C for ; Sun, 1 Dec 2013 21:53:36 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2F4D6935B6; Sun, 1 Dec 2013 10:53:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5kHKAkSoBuge; Sun, 1 Dec 2013 10:53:32 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 3B67993397; Sun, 1 Dec 2013 10:53:32 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 789871C2DF2 for ; Sun, 1 Dec 2013 10:53:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 718E98935F for ; Sun, 1 Dec 2013 10:53:30 +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 I-nhS2A-HYJE for ; Sun, 1 Dec 2013 10:53:29 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0F6FB89128 for ; Sun, 1 Dec 2013 10:53:28 +0000 (UTC) Received: by mail-wg0-f41.google.com with SMTP id y10so3233518wgg.4 for ; Sun, 01 Dec 2013 02:53:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=2d3ATOqY3q/p0FJ3LfBseRjKTDQI+vQDz6cU1mOZ/Rg=; b=RHLtrlByM2Dzj+bGYHRUQeQvjVthLQamFF2Moh8GqEi7VAz7YYxcfWiaS0Rb/yfkL3 basN1VrRGUuSEIocyiHTX6MI3FB/swVO4CLwovXSepatpOU2bhYKdHJWSmttr2/QZqRW gMfpkNKeyYTGuWjr82Od15hZ6V/tH6yTAcHL8GlnBxouwYe/mHe0dc0DUJIcFYa0M3cl 9FQopNoYXQ1Kll4EAt9jzsqd5CU3Mk3Jbuh5dmXpma5SOncgWp2/JB0kW/v+V2RZf19Q i0zFpgi8couYUORlNUyXuBAjNasxqne8/qIyqAcm1FQbdwCcuunhp+TjvzSGu1HP4Slr rK4Q== X-Received: by 10.194.23.73 with SMTP id k9mr50668968wjf.24.1385895207290; Sun, 01 Dec 2013 02:53:27 -0800 (PST) Received: from localhost.localdomain (ivr94-4-82-229-165-48.fbx.proxad.net. [82.229.165.48]) by mx.google.com with ESMTPSA id w1sm75284692wib.6.2013.12.01.02.53.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Dec 2013 02:53:26 -0800 (PST) From: Samuel Martin To: buildroot@busybox.net Date: Sun, 1 Dec 2013 11:50:35 +0100 Message-Id: <1385895035-3380-1-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 1.8.4.2 Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH v5] manual: fix manual generation with BR2_EXTERNAL support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This patch fixes 2 issues that occur during the manual build process: * In manual.mk, it forces BR2_EXTERNAL to the default dummy tree coming within Buildroot tree. This is needed to not include the packages from BR2_EXTERNAL because they are not part of Buildroot. * During the package list generation, the python script using kconfiglib module reads and parses the Config.in files. So, symbols, including environment variables, got expanded and/or resolved. In kconfiglib.py, this patch fixes the regex that did not allow to use numbers in the environment variable names, so '$BR2_EXTERNAL' got wrongly expanded like it was '${BR}2_EXTERNAL': >>> Updating the manual lists... Traceback (most recent call last): File "/opt/buildroot/master/support/scripts/gen-manual-lists.py", line 375, in buildroot = Buildroot() File "/opt/buildroot/master/support/scripts/gen-manual-lists.py", line 216, in __init__ self.root_config)) File "/opt/buildroot/master/support/scripts/kconfiglib.py", line 214, in __init__ self.top_block = self._parse_file(filename, None, None, None) File "/opt/src/buildroot/master/support/scripts/kconfiglib.py", line 919, in _parse_file return self._parse_block(line_feeder, None, parent, deps, visible_if_deps, res) File "/opt/buildroot/master/support/scripts/kconfiglib.py", line 1114, in _parse_block self.base_dir)) IOError: /opt/buildroot/master/Config.in:490: sourced file "$BR2_EXTERNAL/Config.in" (expands to "2_EXTERNAL/Config.in") not found. Perhaps base_dir (argument to Config.__init__(), currently "/opt/buildroot/master") is set to the wrong value. docs/manual/manual.mk:2: recipe for target 'manual-update-lists' failed make: *** [manual-update-lists] Error 1 Reported-by: Ryan Barnett Signed-off-by: Samuel Martin Cc: Thomas Petazzoni Tested-by: Ryan Barnett --- @Thomas P.: Please pull this new version of this patch in the series. TIA --- changes v4 -> v5: - extend commit log (Yann) - add comment why BR2_EXTERNAL is forced to the default dummy tree in manual.mk (Arnout) --- docs/manual/manual.mk | 3 +++ support/scripts/kconfiglib.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/manual/manual.mk b/docs/manual/manual.mk index aeafd10..e46f5a4 100644 --- a/docs/manual/manual.mk +++ b/docs/manual/manual.mk @@ -1,6 +1,9 @@ +# Packages included in BR2_EXTERNAL are not part of buildroot, so they +# should not be included in the manual. manual-update-lists: manual-check-dependencies-lists $(Q)$(call MESSAGE,"Updating the manual lists...") $(Q)BR2_DEFCONFIG="" TOPDIR=$(TOPDIR) O=$(O)/docs/manual/.build \ + BR2_EXTERNAL=$(TOPDIR)/support/dummy-external \ $(TOPDIR)/support/scripts/gen-manual-lists.py # we can't use suitable-host-package here because that's not available in diff --git a/support/scripts/kconfiglib.py b/support/scripts/kconfiglib.py index 0704cc0..e40947c 100644 --- a/support/scripts/kconfiglib.py +++ b/support/scripts/kconfiglib.py @@ -2074,7 +2074,7 @@ set_re = re.compile(r"CONFIG_(\w+)=(.*)") unset_re = re.compile(r"# CONFIG_(\w+) is not set") # Regular expression for finding $-references to symbols in strings -sym_ref_re = re.compile(r"\$[A-Za-z_]+") +sym_ref_re = re.compile(r"\$[A-Za-z_][0-9A-Za-z_]*") # Integers representing symbol types UNKNOWN, BOOL, TRISTATE, STRING, HEX, INT = range(0, 6)