audk/BaseTools/Source/Python
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 BaseTools: Fix GenMake multi-workspace failure 2019-10-04 11:13:37 +08:00
BPDG BaseTools: Fix various typos 2019-07-08 08:59:29 +08:00
Capsule BaseTools/Capsule: Tool to generate Windows Firmware Update Driver 2019-08-15 20:13:55 +08:00
Common BaseTools: Add more parameter checking for CopyFileOnChange() 2019-09-19 08:48:31 +08:00
CommonDataClass BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
Ecc BaseTools:ECC need to handle lower case 'static' 2019-09-09 11:14:42 +08:00
Eot BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
GenFds BaseTools:change some incorrect parameter defaults 2019-09-17 10:18:51 +08:00
GenPatchPcdTable BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
PatchPcdValue BaseTools: Decouple AutoGen Objects 2019-08-09 23:15:52 +08:00
Pkcs7Sign BaseTools:Updata the output encoding of the Popen function 2019-08-01 15:36:48 +08:00
Rsa2048Sha256Sign BaseTools:Updata the output encoding of the Popen function 2019-08-01 15:36:48 +08:00
Table BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
TargetTool BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
Trim BaseTools: Fixed a typo in Trim.py 2019-08-02 00:18:00 +08:00
UPT BaseTools: Fix various typos 2019-07-08 08:59:29 +08:00
Workspace BaseTools: Sort Pcd settings to make PcdTokenNumber be fixed 2019-09-10 08:39:19 +08:00
build BaseTools:Fix the issue that build report failed 2019-09-19 17:11:57 +08:00
GNUmakefile BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
Makefile BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
sitecustomize.py BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00