if Match:\r
IncludeFilePath = Match.group(1)\r
IncludeFilePath = self.ExpandMacros(IncludeFilePath)\r
- try:\r
- IncludeDsc = open(IncludeFilePath, "r")\r
- except:\r
+ PackagesPath = os.getenv("PACKAGES_PATH")\r
+ for PackagePath in PackagesPath.split(os.pathsep):\r
+ IncludeFilePathAbs = os.path.join(os.path.normpath(PackagePath), os.path.normpath(IncludeFilePath))\r
+ if os.path.exists(IncludeFilePathAbs):\r
+ IncludeDsc = open(IncludeFilePathAbs, "r")\r
+ break\r
+ if IncludeDsc == None:\r
print("ERROR: Cannot open file '%s'" % IncludeFilePath)\r
raise SystemExit\r
NewDscLines = IncludeDsc.readlines()\r