From: yuwei.chen@intel.com
To: devel@edk2.groups.io
Cc: Bob Feng <bob.c.feng@intel.com>, Liming Gao <liming.gao@intel.com>
Subject: [PATCH 1/1] BaseTools: Warn user the file not found issue instead of break build.
Date: Mon, 1 Jun 2020 14:40:10 +0800 [thread overview]
Message-ID: <a360faf9ed7cff8c94d56409cae7dbbecef4d471.1590993111.git.yuwei.chen@intel.com> (raw)
In-Reply-To: <cover.1590993111.git.yuwei.chen@intel.com>
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
next parent reply other threads:[~2020-06-01 6:40 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 ` yuwei.chen [this message]
2020-06-05 2:26 ` [PATCH 1/1] BaseTools: Warn user the file not found issue instead of break build Bob Feng
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=a360faf9ed7cff8c94d56409cae7dbbecef4d471.1590993111.git.yuwei.chen@intel.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