From nobody Sun Apr 28 20:26:20 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 150241988464088.324368352379; Thu, 10 Aug 2017 19:51:24 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B4A0C21D490EC; Thu, 10 Aug 2017 19:49:02 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BA93D21D490E4 for ; Thu, 10 Aug 2017 19:49:01 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP; 10 Aug 2017 19:51:21 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by orsmga001.jf.intel.com with ESMTP; 10 Aug 2017 19:51:20 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,356,1498546800"; d="scan'208";a="1161523884" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Fri, 11 Aug 2017 10:51:17 +0800 Message-Id: <1502419877-34960-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [Patch] BaseTools: Support TabSpace between section tag in DEC file X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao , Yanyan Zhang MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Yanyan Zhang Per DEC spec, multiple section tag use to separate, and it can support Tab, so this patch fix the bug to use Tab. ::=3D {} {} ::=3D * Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yanyan Zhang Reviewed-by: Yonghong Zhu =20 --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTool= s/Source/Python/Workspace/MetaFileParser.py index e98352a..b756361 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1752,11 +1752,11 @@ class DecParser(MetaFileParser): self._Scope =3D [] self._SectionName =3D '' self._SectionType =3D [] ArchList =3D set() PrivateList =3D set() - Line =3D self._CurrentLine.replace("%s%s" % (TAB_COMMA_SPLIT, TAB_= SPACE_SPLIT), TAB_COMMA_SPLIT) + Line =3D re.sub(',[\s]*', TAB_COMMA_SPLIT, self._CurrentLine) for Item in Line[1:-1].split(TAB_COMMA_SPLIT): if Item =3D=3D '': EdkLogger.error("Parser", FORMAT_UNKNOWN_ERROR, "section name can NOT be empty or incorrec= tly use separator comma", self.MetaFile, self._LineIndex + 1, self._= CurrentLine) --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel