From patchwork Wed Dec 4 18:56:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 296607 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 9A70C2C00B8 for ; Thu, 5 Dec 2013 05:56:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id DE9F832FD1; Wed, 4 Dec 2013 18:56:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wCLUIdrJy4pW; Wed, 4 Dec 2013 18:56:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 6EC57330B0; Wed, 4 Dec 2013 18:56:25 +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 E24E61BF947 for ; Wed, 4 Dec 2013 18:56:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2FCE68C5CD for ; Wed, 4 Dec 2013 18:56:21 +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 krYo86DfP1yc for ; Wed, 4 Dec 2013 18:56:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (top.free-electrons.com [176.31.233.9]) by whitealder.osuosl.org (Postfix) with ESMTP id 6984B8C255 for ; Wed, 4 Dec 2013 18:56:20 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 33E5B79F; Wed, 4 Dec 2013 19:56:20 +0100 (CET) Received: from localhost (AToulouse-651-1-277-143.w109-220.abo.wanadoo.fr [109.220.216.143]) by mail.free-electrons.com (Postfix) with ESMTPSA id DDB9C71B; Wed, 4 Dec 2013 19:56:19 +0100 (CET) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Wed, 4 Dec 2013 19:56:13 +0100 Message-Id: <1386183373-17611-6-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1386183373-17611-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1386183373-17611-1-git-send-email-thomas.petazzoni@free-electrons.com> Subject: [Buildroot] [PATCHv5 5/5] 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 From: Samuel Martin 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 Signed-off-by: Thomas Petazzoni Reviewed-by: "Yann E. MORIN" Tested-by: "Yann E. MORIN" --- 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 0926566..506af05 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)