audk/BaseTools/Source/Python/AutoGen
Kubacki, Michael A 61af5f2494 BaseTools: Fix GenMake multi-workspace failure
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2232

Commit 0075ab2cec introduced an issue that causes an exception
when multiple workspace packages paths are specified. For example,
if edk2-platforms is used, the root directory will contain an edk
and edk2-platforms directory representing the respective
repositories.

In GenMake, the path to the package DEC file for a module is
discovered by getting the relative path of the INF to the
workspace root directory. Each directory in the relative path
is incrementally joined to the WORKSPACE directory. The file
list in the joined path is searched for a DEC file.

As an example, if the build command is used on a package outside
the edk2 repository, the INF file path is relative to the
edk2-platforms directory not edk2. This causes directory paths
to be built that do not exist. Commit 0075ab2cec replaced the
os.path.exists() call with a try except block that always fails
when os.listdir() is invoked to enumerate the list of files in
the built directory path on packages outside edk2.

This commit restores the original conditional statement which
avoids calling os.listdir() with an invalid directory path.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by:  Bob Feng <bob.c.feng@intel.com>
2019-10-04 11:13:37 +08:00
..
AutoGen.py BaseTools: Decouple AutoGen Objects 2019-08-09 23:15:52 +08:00
AutoGenWorker.py BaseTools: remove unnecessary calls of os.exist 2019-09-17 10:19:05 +08:00
BuildEngine.py BaseTools:change some incorrect parameter defaults 2019-09-17 10:18:51 +08:00
CacheIR.py BaseTools: Improve the file saving and copying reliability 2019-08-20 14:06:07 +08:00
DataPipe.py BaseTools: Incorrect error message for library instance not found 2019-08-23 11:26:24 +08:00
GenC.py BaseTools: remove unnecessary calls of os.exist 2019-09-17 10:19:05 +08:00
GenDepex.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
GenMake.py BaseTools: Fix GenMake multi-workspace failure 2019-10-04 11:13:37 +08:00
GenPcdDb.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
GenVar.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
IdfClassObject.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
InfSectionParser.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
ModuleAutoGen.py BaseTools: Fix the lib order in static_library_files.lst 2019-09-29 11:59:31 +08:00
ModuleAutoGenHelper.py BaseTools: Fixed issue for IgnoreAutoGen 2019-09-10 08:39:18 +08:00
PlatformAutoGen.py BaseTools: remove unnecessary calls of os.exist 2019-09-17 10:19:05 +08:00
StrGather.py BaseTools:Add extra debugging message 2019-08-01 15:36:48 +08:00
UniClassObject.py BaseTools: remove unnecessary calls of os.exist 2019-09-17 10:19:05 +08:00
ValidCheckingInfoObject.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
WorkspaceAutoGen.py BaseTools: Enable --genfds-multi-thread to default build 2019-09-11 09:43:59 +08:00
__init__.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00