public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Bob Feng" <bob.c.feng@intel.com>
To: "Chen, Yuwei" <yuwei.chen@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Gao, Liming" <liming.gao@intel.com>
Subject: Re: [PATCH 1/1] BaseTools: Warn user the file not found issue instead of break build.
Date: Fri, 5 Jun 2020 02:26:39 +0000	[thread overview]
Message-ID: <BN6PR11MB0068B77D6624F19D7FC840AAC9860@BN6PR11MB0068.namprd11.prod.outlook.com> (raw)
In-Reply-To: <a360faf9ed7cff8c94d56409cae7dbbecef4d471.1590993111.git.yuwei.chen@intel.com>

Reviewed-by: Bob Feng<bob.c.feng@intel.com>

-----Original Message-----
From: Chen, Yuwei <yuwei.chen@intel.com> 
Sent: Monday, June 1, 2020 2:40 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [PATCH 1/1] BaseTools: Warn user the file not found issue instead of break build.

From: Bob Feng <bob.c.feng@intel.com>

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2770

The Trim.py would break the build process when the file not found issue occures, however sometimes we do not care about this issue.
This patch changes the error with warning in order to solve this kind of break.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
---
 BaseTools/Source/Python/Trim/Trim.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/Trim/Trim.py b/BaseTools/Source/Python/Trim/Trim.py
index c5638376e41a..776474b20349 100644
--- a/BaseTools/Source/Python/Trim/Trim.py
+++ b/BaseTools/Source/Python/Trim/Trim.py
@@ -281,9 +281,11 @@ def DoInclude(Source, Indent='', IncludePathList=[], LocalSearchPath=None, Inclu
                         F = File.readlines()
                 break
         else:
-            EdkLogger.error("Trim", "Failed to find include file %s" % Source)
+            EdkLogger.warn("Trim", "Failed to find include file %s" % Source)
+            return []
     except:
-        EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=Source)
+        EdkLogger.warn("Trim", FILE_OPEN_FAILURE, ExtraData=Source)
+        return []
 
 
     # avoid A "include" B and B "include" A
--
2.26.1.windows.1


      reply	other threads:[~2020-06-05  2:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1590993111.git.yuwei.chen@intel.com>
2020-06-01  6:40 ` [PATCH 1/1] BaseTools: Warn user the file not found issue instead of break build yuwei.chen
2020-06-05  2:26   ` Bob Feng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN6PR11MB0068B77D6624F19D7FC840AAC9860@BN6PR11MB0068.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox