]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/UPT: Support Multiple Installation
authorHess Chen <hesheng.chen@intel.com>
Thu, 10 Aug 2017 08:36:47 +0000 (16:36 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Sat, 12 Aug 2017 04:38:26 +0000 (12:38 +0800)
Add a new feature to UPT to support installing
multiple DIST packages in one time.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/UPT/Core/DependencyRules.py
BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py
BaseTools/Source/Python/UPT/InstallPkg.py
BaseTools/Source/Python/UPT/Library/GlobalData.py
BaseTools/Source/Python/UPT/Logger/StringTable.py
BaseTools/Source/Python/UPT/ReplacePkg.py
BaseTools/Source/Python/UPT/TestInstall.py
BaseTools/Source/Python/UPT/UPT.py

index 57f7b40da553ee95927080ed3122de288d6e4560..909c584e4ec2a93eefdb6dfa71abae60eb1c2549 100644 (file)
@@ -44,12 +44,24 @@ DEPEX_CHECK_PACKAGE_NOT_FOUND, DEPEX_CHECK_DP_NOT_FOUND) = (0, 1, 2, 3)
 # @param object:      Inherited from object class\r
 #\r
 class DependencyRules(object):\r
-    def __init__(self, Datab):\r
+    def __init__(self, Datab, ToBeInstalledPkgList=None):\r
         self.IpiDb = Datab\r
         self.WsPkgList = GetWorkspacePackage()\r
         self.WsModuleList = GetWorkspaceModule()\r
-        self.PkgsToBeDepend = []\r
+\r
+        self.PkgsToBeDepend = [(PkgInfo[1], PkgInfo[2]) for PkgInfo in self.WsPkgList]\r
+\r
+        # Add package info from the DIST to be installed.\r
+        self.PkgsToBeDepend.extend(self.GenToBeInstalledPkgList(ToBeInstalledPkgList))\r
         \r
+    def GenToBeInstalledPkgList(self, ToBeInstalledPkgList):\r
+        RtnList = []\r
+        for Dist in ToBeInstalledPkgList:\r
+            for Package in Dist.PackageSurfaceArea:\r
+                RtnList.append((Package[0], Package[1]))\r
+\r
+        return RtnList\r
+\r
     ## Check whether a module exists by checking the Guid+Version+Name+Path combination\r
     #\r
     # @param Guid:  Guid of a module\r
@@ -182,7 +194,6 @@ class DependencyRules(object):
     #          False else\r
     #\r
     def CheckInstallDpDepexSatisfied(self, DpObj):\r
-        self.PkgsToBeDepend = [(PkgInfo[1], PkgInfo[2]) for PkgInfo in self.WsPkgList]\r
         return self.CheckDpDepexSatisfied(DpObj)\r
 \r
     # # Check whether multiple DP depex satisfied by current workspace for Install\r
@@ -192,7 +203,6 @@ class DependencyRules(object):
     #          False else\r
     #\r
     def CheckTestInstallPdDepexSatisfied(self, DpObjList):\r
-        self.PkgsToBeDepend = [(PkgInfo[1], PkgInfo[2]) for PkgInfo in self.WsPkgList]\r
         for DpObj in DpObjList:\r
             if self.CheckDpDepexSatisfied(DpObj):\r
                 for PkgKey in DpObj.PackageSurfaceArea.keys():\r
index 3c6c9ee2907e7dc0cd7244fc2595daf146b0b78c..ae8dc85e3e64576127d06b040f8b28068e6b9779 100644 (file)
@@ -79,6 +79,10 @@ def AddExternToDefineSec(SectionDict, Arch, ExternList):
 # Using TokenSpaceGuidValue and Token to obtain PcdName from DEC file\r
 #\r
 def ObtainPcdName(Packages, TokenSpaceGuidValue, Token):\r
+    TokenSpaceGuidName = ''\r
+    PcdCName = ''\r
+    TokenSpaceGuidNameFound = False\r
+\r
     for PackageDependency in Packages:\r
         #\r
         # Generate generic comment\r
@@ -86,6 +90,7 @@ def ObtainPcdName(Packages, TokenSpaceGuidValue, Token):
         Guid = PackageDependency.GetGuid()\r
         Version = PackageDependency.GetVersion()\r
 \r
+        Path = None\r
         #\r
         # find package path/name\r
         # \r
@@ -95,41 +100,58 @@ def ObtainPcdName(Packages, TokenSpaceGuidValue, Token):
                     Path = PkgInfo[3]\r
                     break\r
 \r
-        DecFile = None\r
-        if Path not in GlobalData.gPackageDict:\r
-            DecFile = Dec(Path)\r
-            GlobalData.gPackageDict[Path] = DecFile\r
-        else:\r
-            DecFile = GlobalData.gPackageDict[Path]\r
-\r
-        DecGuidsDict = DecFile.GetGuidSectionObject().ValueDict\r
-        DecPcdsDict = DecFile.GetPcdSectionObject().ValueDict\r
-\r
-        TokenSpaceGuidName = ''\r
-        PcdCName = ''\r
-        TokenSpaceGuidNameFound = False\r
-\r
-        #\r
-        # Get TokenSpaceGuidCName from Guids section \r
-        #\r
-        for GuidKey in DecGuidsDict:\r
-            GuidList = DecGuidsDict[GuidKey]\r
-            for GuidItem in GuidList:\r
-                if TokenSpaceGuidValue.upper() == GuidItem.GuidString.upper():\r
-                    TokenSpaceGuidName = GuidItem.GuidCName\r
-                    TokenSpaceGuidNameFound = True\r
+        # The dependency package in workspace\r
+        if Path:\r
+            DecFile = None\r
+            if Path not in GlobalData.gPackageDict:\r
+                DecFile = Dec(Path)\r
+                GlobalData.gPackageDict[Path] = DecFile\r
+            else:\r
+                DecFile = GlobalData.gPackageDict[Path]\r
+\r
+            DecGuidsDict = DecFile.GetGuidSectionObject().ValueDict\r
+            DecPcdsDict = DecFile.GetPcdSectionObject().ValueDict\r
+\r
+            TokenSpaceGuidName = ''\r
+            PcdCName = ''\r
+            TokenSpaceGuidNameFound = False\r
+\r
+            #\r
+            # Get TokenSpaceGuidCName from Guids section\r
+            #\r
+            for GuidKey in DecGuidsDict:\r
+                GuidList = DecGuidsDict[GuidKey]\r
+                for GuidItem in GuidList:\r
+                    if TokenSpaceGuidValue.upper() == GuidItem.GuidString.upper():\r
+                        TokenSpaceGuidName = GuidItem.GuidCName\r
+                        TokenSpaceGuidNameFound = True\r
+                        break\r
+                if TokenSpaceGuidNameFound:\r
                     break\r
-            if TokenSpaceGuidNameFound:\r
-                break\r
-        #\r
-        # Retrieve PcdCName from Pcds Section\r
-        #\r
-        for PcdKey in DecPcdsDict:\r
-            PcdList = DecPcdsDict[PcdKey]\r
-            for PcdItem in PcdList:\r
-                if TokenSpaceGuidName == PcdItem.TokenSpaceGuidCName and Token == PcdItem.TokenValue:\r
-                    PcdCName = PcdItem.TokenCName\r
-                    return TokenSpaceGuidName, PcdCName\r
+            #\r
+            # Retrieve PcdCName from Pcds Section\r
+            #\r
+            for PcdKey in DecPcdsDict:\r
+                PcdList = DecPcdsDict[PcdKey]\r
+                for PcdItem in PcdList:\r
+                    if TokenSpaceGuidName == PcdItem.TokenSpaceGuidCName and Token == PcdItem.TokenValue:\r
+                        PcdCName = PcdItem.TokenCName\r
+                        return TokenSpaceGuidName, PcdCName\r
+\r
+        # The dependency package in ToBeInstalledDist\r
+        else:\r
+            for Dist in GlobalData.gTO_BE_INSTALLED_DIST_LIST:\r
+                for Package in Dist.PackageSurfaceArea.values():\r
+                    if Guid == Package.Guid:\r
+                        for GuidItem in Package.GuidList:\r
+                            if TokenSpaceGuidValue.upper() == GuidItem.Guid.upper():\r
+                                TokenSpaceGuidName = GuidItem.CName\r
+                                TokenSpaceGuidNameFound = True\r
+                                break\r
+                        for PcdItem in Package.PcdList:\r
+                            if TokenSpaceGuidName == PcdItem.TokenSpaceGuidCName and Token == PcdItem.Token:\r
+                                PcdCName = PcdItem.CName\r
+                                return TokenSpaceGuidName, PcdCName\r
 \r
     return TokenSpaceGuidName, PcdCName\r
 \r
index 0e99d2f01f2651ccc1da9ddd37835782eee9d00f..a8d0e1ec440a8bcfd05ed157560cafe6cc060c6e 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # Install distribution package.\r
 #\r
-# Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available \r
 # under the terms and conditions of the BSD License which accompanies this \r
@@ -133,16 +133,16 @@ def InstallNewFile(WorkspaceDir, File):
 #\r
 # UnZipDp\r
 #\r
-def UnZipDp(WorkspaceDir, DpPkgFileName):\r
+def UnZipDp(WorkspaceDir, DpPkgFileName, Index=1):\r
     ContentZipFile = None\r
     Logger.Quiet(ST.MSG_UZIP_PARSE_XML)\r
     DistFile = PackageFile(DpPkgFileName)\r
     \r
     DpDescFileName, ContentFileName = GetDPFile(DistFile.GetZipFile())\r
     \r
-    GlobalData.gUNPACK_DIR = os.path.normpath(os.path.join(WorkspaceDir, ".tmp"))\r
-    DistPkgFile = DistFile.UnpackFile(DpDescFileName,\r
-        os.path.normpath(os.path.join(GlobalData.gUNPACK_DIR, DpDescFileName)))\r
+    TempDir = os.path.normpath(os.path.join(WorkspaceDir, "Conf/.tmp%s" % str(Index)))\r
+    GlobalData.gUNPACK_DIR.append(TempDir)\r
+    DistPkgFile = DistFile.UnpackFile(DpDescFileName, os.path.normpath(os.path.join(TempDir, DpDescFileName)))\r
     if not DistPkgFile:\r
         Logger.Error("InstallPkg", FILE_NOT_FOUND, ST.ERR_FILE_BROKEN %DpDescFileName)\r
     \r
@@ -159,23 +159,15 @@ def UnZipDp(WorkspaceDir, DpPkgFileName):
     #\r
     # unzip contents.zip file\r
     #\r
-    ContentFile = DistFile.UnpackFile(ContentFileName,\r
-        os.path.normpath(os.path.join(GlobalData.gUNPACK_DIR, ContentFileName)))\r
+    ContentFile = DistFile.UnpackFile(ContentFileName, os.path.normpath(os.path.join(TempDir, ContentFileName)))\r
     if not ContentFile:\r
         Logger.Error("InstallPkg", FILE_NOT_FOUND,\r
             ST.ERR_FILE_BROKEN % ContentFileName)\r
 \r
-    FilePointer = __FileHookOpen__(ContentFile, "rb")\r
-    #\r
-    # Assume no archive comment.\r
-    #\r
-    FilePointer.seek(0, SEEK_SET)\r
-    FilePointer.seek(0, SEEK_END)\r
     #\r
     # Get file size\r
     #                \r
-    FileSize = FilePointer.tell()\r
-    FilePointer.close()\r
+    FileSize = os.path.getsize(ContentFile)\r
                \r
     if FileSize != 0:        \r
         ContentZipFile = PackageFile(ContentFile)\r
@@ -202,8 +194,8 @@ def GetPackageList(DistPkg, Dep, WorkspaceDir, Options, ContentZipFile, ModuleLi
         PackagePath = Path\r
         Package = DistPkg.PackageSurfaceArea[Guid, Version, Path]\r
         Logger.Info(ST.MSG_INSTALL_PACKAGE % Package.GetName())\r
-        if Dep.CheckPackageExists(Guid, Version):\r
-            Logger.Info(ST.WRN_PACKAGE_EXISTED %(Guid, Version))\r
+        if Dep.CheckPackageExists(Guid, Version):\r
+            Logger.Info(ST.WRN_PACKAGE_EXISTED %(Guid, Version))\r
         if Options.UseGuidedPkgPath:\r
             GuidedPkgPath = "%s_%s_%s" % (Package.GetName(), Guid, Version)\r
             NewPackagePath = InstallNewPackage(WorkspaceDir, GuidedPkgPath, Options.CustomPath)\r
@@ -509,29 +501,40 @@ def GenToolMisc(DistPkg, WorkspaceDir, ContentZipFile):
 # @param  Options: command Options\r
 #\r
 def Main(Options = None):\r
-    ContentZipFile, DistFile = None, None\r
-\r
     try:\r
         DataBase = GlobalData.gDB\r
         WorkspaceDir = GlobalData.gWORKSPACE\r
         if not Options.PackageFile:\r
             Logger.Error("InstallPkg", OPTION_MISSING, ExtraData=ST.ERR_SPECIFY_PACKAGE)\r
         \r
-        #\r
-        # unzip dist.pkg file\r
-        #\r
-        DistPkg, ContentZipFile, DpPkgFileName, DistFile = UnZipDp(WorkspaceDir, Options.PackageFile)\r
+        # Get all Dist Info\r
+        DistInfoList = []\r
+        DistPkgList = []\r
+        Index = 1\r
+        for ToBeInstalledDist in Options.PackageFile:\r
+            #\r
+            # unzip dist.pkg file\r
+            #\r
+            DistInfoList.append(UnZipDp(WorkspaceDir, ToBeInstalledDist, Index))\r
+            DistPkgList.append(DistInfoList[-1][0])\r
+            Index += 1\r
 \r
-        #\r
-        # check dependency\r
-        #\r
-        Dep = DependencyRules(DataBase)\r
-        CheckInstallDpx(Dep, DistPkg)\r
+            #\r
+            # Add dist\r
+            #\r
+            GlobalData.gTO_BE_INSTALLED_DIST_LIST.append(DistInfoList[-1][0])\r
 \r
-        #\r
-        # Install distribution\r
-        #\r
-        InstallDp(DistPkg, DpPkgFileName, ContentZipFile, Options, Dep, WorkspaceDir, DataBase)\r
+        # Check for dependency\r
+        Dep = DependencyRules(DataBase, DistPkgList)\r
+\r
+        for ToBeInstalledDist in DistInfoList:\r
+            CheckInstallDpx(Dep, ToBeInstalledDist[0], ToBeInstalledDist[2])\r
+\r
+            #\r
+            # Install distribution\r
+            #\r
+            InstallDp(ToBeInstalledDist[0], ToBeInstalledDist[2], ToBeInstalledDist[1],\r
+                      Options, Dep, WorkspaceDir, DataBase)\r
         ReturnCode = 0\r
         \r
     except FatalError, XExcept:\r
@@ -556,16 +559,16 @@ def Main(Options = None):
         Logger.Quiet(ST.MSG_PYTHON_ON % (python_version(),\r
             platform) + format_exc())\r
     finally:\r
-        if ReturnCode != UPT_ALREADY_INSTALLED_ERROR:\r
-            Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_STARTED)\r
-            if DistFile:\r
-                DistFile.Close()\r
-            if ContentZipFile:\r
-                ContentZipFile.Close()\r
-            if GlobalData.gUNPACK_DIR:\r
-                rmtree(GlobalData.gUNPACK_DIR)\r
-                GlobalData.gUNPACK_DIR = None\r
-            Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_DONE)\r
+        Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_STARTED)\r
+        for ToBeInstalledDist in DistInfoList:\r
+            if ToBeInstalledDist[3]:\r
+                ToBeInstalledDist[3].Close()\r
+            if ToBeInstalledDist[1]:\r
+                ToBeInstalledDist[1].Close()\r
+        for TempDir in GlobalData.gUNPACK_DIR:\r
+            rmtree(TempDir)\r
+        GlobalData.gUNPACK_DIR = []\r
+        Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_DONE)\r
     if ReturnCode == 0:\r
         Logger.Quiet(ST.MSG_FINISH)\r
     return ReturnCode\r
@@ -609,14 +612,15 @@ def BackupDist(DpPkgFileName, Guid, Version, WorkspaceDir):
 #   @param  Dep: the DependencyRules instance that used to check dependency\r
 #   @param  DistPkg: the distribution object\r
 #\r
-def CheckInstallDpx(Dep, DistPkg):\r
+def CheckInstallDpx(Dep, DistPkg, DistPkgFileName):\r
     #\r
     # Check distribution package installed or not\r
     #\r
     if Dep.CheckDpExists(DistPkg.Header.GetGuid(),\r
         DistPkg.Header.GetVersion()):\r
-        Logger.Error("InstallPkg", UPT_ALREADY_INSTALLED_ERROR,\r
-            ST.WRN_DIST_PKG_INSTALLED)\r
+        Logger.Error("InstallPkg",\r
+                     UPT_ALREADY_INSTALLED_ERROR,\r
+                     ST.WRN_DIST_PKG_INSTALLED % os.path.basename(DistPkgFileName))\r
     #\r
     # Check distribution dependency (all module dependency should be\r
     # satisfied)\r
index 8f446d48883d4611470e6f3aa99e5a9ef1260abf..1ae2417c2fbe3dabc3c1d4a90ff77e1ea9490d95 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to define common static strings and global data used by UPT\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available \r
 # under the terms and conditions of the BSD License which accompanies this \r
@@ -87,7 +87,7 @@ gWARNING_AS_ERROR = False
 #\r
 # Used to specify the temp directory to hold the unpacked distribution files\r
 #\r
-gUNPACK_DIR = None\r
+gUNPACK_DIR = []\r
 \r
 #\r
 # Flag used to mark whether the INF file is Binary INF or not.\r
@@ -109,3 +109,8 @@ gPackageDict = {}
 # {FilePath: FileObj}\r
 #\r
 gLIBINSTANCEDICT = {}\r
+\r
+#\r
+# Store the list of DIST\r
+#\r
+gTO_BE_INSTALLED_DIST_LIST = []\r
index 4c42661ea2e4f94bfef715f32b5c9c4f3ed7a251..83ae0ae2f3e089366d6bbd394c2657333f6321b8 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to define strings used in the UPT tool\r
 #\r
-# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available \r
 # under the terms and conditions of the BSD License which accompanies this \r
@@ -785,7 +785,7 @@ WRN_MODULE_EXISTED        = _("This module already exists: %s")
 WRN_FILE_EXISTED          = _("This file already exists: %s")\r
 WRN_FILE_NOT_OVERWRITTEN  = \\r
 _("This file already exist and cannot be overwritten: %s")\r
-WRN_DIST_PKG_INSTALLED = _("This distribution package has previously been installed.")\r
+WRN_DIST_PKG_INSTALLED = _("This distribution package %s has previously been installed.")\r
 WRN_DIST_NOT_FOUND         = _(\r
     "Distribution is not found at location %s")\r
 WRN_MULTI_PCD_RANGES      = _(\r
index 9f231f9bcd5ba6b391ef52bdac5478d7b5d7a866..efbf68a4ecc638a6b350d1c5268be9dfd672fe27 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # Replace distribution package.\r
 #\r
-# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available \r
 # under the terms and conditions of the BSD License which accompanies this \r
@@ -99,9 +99,9 @@ def Main(Options = None):
             DistFile.Close()\r
         if ContentZipFile:\r
             ContentZipFile.Close()\r
-        if GlobalData.gUNPACK_DIR:\r
-            rmtree(GlobalData.gUNPACK_DIR)\r
-            GlobalData.gUNPACK_DIR = None\r
+        for TempDir in GlobalData.gUNPACK_DIR:\r
+            rmtree(TempDir)\r
+        GlobalData.gUNPACK_DIR = []\r
         Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_DONE)        \r
 \r
     if ReturnCode == 0:\r
index dae4415026519e5488ff8f30d18c36d598095fd2..899cae56aa8790035e75726f4ecaabb08e936d10 100644 (file)
@@ -1,7 +1,7 @@
 # # @file\r
 # Test Install distribution package\r
 #\r
-# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available\r
 # under the terms and conditions of the BSD License which accompanies this\r
@@ -90,9 +90,9 @@ def Main(Options=None):
             DistFile.Close()\r
         if ContentZipFile:\r
             ContentZipFile.Close()\r
-        if GlobalData.gUNPACK_DIR:\r
-            shutil.rmtree(GlobalData.gUNPACK_DIR)\r
-            GlobalData.gUNPACK_DIR = None\r
+        for TempDir in GlobalData.gUNPACK_DIR:\r
+            shutil.rmtree(TempDir)\r
+        GlobalData.gUNPACK_DIR = []\r
         Logger.Quiet(ST.MSG_REMOVE_TEMP_FILE_DONE)\r
     if ReturnCode == 0:\r
         Logger.Quiet(ST.MSG_FINISH)\r
index d98b469640d85fcfc67c699d92dd1ce080b45be2..325b96bf560dc497e2dcc71ccb080509f984f0cf 100644 (file)
@@ -120,7 +120,7 @@ def Main():
 \r
     Parser.add_option("-q", "--quiet", action="store_true", dest="opt_quiet", help=ST.HLP_RETURN_AND_DISPLAY)\r
 \r
-    Parser.add_option("-i", "--install", action="store", type="string", dest="Install_Distribution_Package_File",\r
+    Parser.add_option("-i", "--install", action="append", type="string", dest="Install_Distribution_Package_File",\r
                       help=ST.HLP_SPECIFY_PACKAGE_NAME_INSTALL)\r
 \r
     Parser.add_option("-c", "--create", action="store", type="string", dest="Create_Distribution_Package_File",\r
@@ -228,12 +228,14 @@ def Main():
             RunModule = MkPkg.Main\r
 \r
         elif Opt.PackFileToInstall:\r
-            if not Opt.PackFileToInstall.endswith('.dist'):\r
-                Logger.Error("InstallPkg", FILE_TYPE_MISMATCH, ExtraData=ST.ERR_DIST_EXT_ERROR % Opt.PackFileToInstall)\r
-\r
-            AbsPath = GetFullPathDist(Opt.PackFileToInstall, WorkspaceDir)\r
-            if not AbsPath:\r
-                Logger.Error("InstallPkg", FILE_NOT_FOUND, ST.ERR_INSTALL_DIST_NOT_FOUND % Opt.PackFileToInstall)\r
+            AbsPath = []\r
+            for Item in Opt.PackFileToInstall:\r
+                if not Item.endswith('.dist'):\r
+                    Logger.Error("InstallPkg", FILE_TYPE_MISMATCH, ExtraData=ST.ERR_DIST_EXT_ERROR % Item)\r
+\r
+                AbsPath.append(GetFullPathDist(Item, WorkspaceDir))\r
+                if not AbsPath:\r
+                    Logger.Error("InstallPkg", FILE_NOT_FOUND, ST.ERR_INSTALL_DIST_NOT_FOUND % Item)\r
 \r
             Opt.PackFileToInstall = AbsPath\r
             setattr(Opt, 'PackageFile', Opt.PackFileToInstall)\r