public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] BaseTools: Warn user the file not found issue instead of break build.
       [not found] <cover.1590993111.git.yuwei.chen@intel.com>
@ 2020-06-01  6:40 ` yuwei.chen
  2020-06-05  2:26   ` Bob Feng
  0 siblings, 1 reply; 2+ messages in thread
From: yuwei.chen @ 2020-06-01  6:40 UTC (permalink / raw)
  To: devel; +Cc: Bob Feng, Liming Gao

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] BaseTools: Warn user the file not found issue instead of break build.
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Bob Feng @ 2020-06-05  2:26 UTC (permalink / raw)
  To: Chen, Yuwei, devel@edk2.groups.io; +Cc: Gao, Liming

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-05  2:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox