def METHOD_NAME(self, Platform, Arch, TargetName, ToolChainTag):
    self.Platform = Platform
    PackageList = []
    Pa = self.BuildObject[self.Platform, Arch, TargetName, ToolChainTag]
    #
    # Get Package related to Modules
    #
    for Module in Pa.Modules:
        ModuleObj = self.BuildObject[Module, Arch, TargetName, ToolChainTag]
        for Package in ModuleObj.Packages:
            if Package not in PackageList:
                PackageList.append(Package)
    #
    # Get Packages related to Libraries
    #
    for Lib in Pa.LibraryInstances:
        LibObj = self.BuildObject[Lib, Arch, TargetName, ToolChainTag]
        for Package in LibObj.Packages:
            if Package not in PackageList:
                PackageList.append(Package)
    for Package in Pa.Packages:
        if Package in PackageList:
            continue
        PackageList.append(Package)
    return PackageList