From 66b845ae06f1e48c693158ee0b8b4f610d5ada4a Mon Sep 17 00:00:00 2001 From: Michael D Kinney Date: Thu, 21 Mar 2019 17:27:20 -0700 Subject: BaseTools: Fix private includes for FILE_GUID override BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1648 When a module in a DSC file uses a FILE_GUID override in the module scoped section, a copy of the modified INF file is placed in the Conf/.cache directory. The check for private includes uses the INF path to determine if the module is allowed to use the private includes. Since the INF path in this case is not in any package, this check always fails, and no private include paths are possible. The fix is to keep both the OriginalPath and the new Path in the PathClass object, and always use the OriginalPath to see if the module INF is in the package with private includes. Signed-off-by: Michael D Kinney Cc: Bob Feng Cc: Liming Gao Reviewed-by: Liming Gao Reviewed-by: Bob Feng --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/AutoGen/AutoGen.py') diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 31721a6f9f..c174b5a0bb 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -3416,7 +3416,7 @@ class ModuleAutoGen(AutoGen): RetVal.append(PackageDir) IncludesList = Package.Includes if Package._PrivateIncludes: - if not self.MetaFile.Path.startswith(PackageDir): + if not self.MetaFile.OriginalPath.Path.startswith(PackageDir): IncludesList = list(set(Package.Includes).difference(set(Package._PrivateIncludes))) for Inc in IncludesList: if Inc not in RetVal: -- cgit v1.2.3