+ if fdb.HasPlatform(GetFpdGuidVersion(fpd, 0)):
+ if not flags.reinstall:
+ print "Error: This platform is already installed: ", fpdfile
+ installError = True
+
+ # Now we need to check that all the Platforms (and modules?) that are
+ # referenced by this fpd are installed in the workspace or are in this far.
+ packagesNeeded = set()
+
+ # Go through the dependencies
+ for dependency in XmlList(fpd, "/PlatformSurfaceArea/FrameworkModules/ModuleSA") + \
+ XmlList(fpd, "/PlatformSurfaceArea/FrameworkModules/ModuleSA/Libraries/Instance"):
+ packagesNeeded.add((Guid(dependency.getAttribute("PackageGuid")),
+ dependency.getAttribute("PackageVersion")))
+
+ # Let's see if all the packages are in the workspace
+ for guid, version in packagesNeeded:
+ # Does anyone provide this package?
+ if not fdb.HasPackage((guid, version)) and not (guid, version) in farSpds:
+ print ("Error: The fpd %s depends on the package guid %s version %s, which " + \
+ "is not installed in the workspace, nor is it provided by this far.") \
+ % (fpdfile, guid, version)
+ installError = True