]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Python/ListWorkspace.py
3 """List the contents of the Framework Database to the screen in a readble
6 import os
, sys
, getopt
, string
, xml
.dom
.minidom
, zipfile
, md5
7 from XmlRoutines
import *
8 from WorkspaceRoutines
import *
12 print "Dumping the contents of %s workspace database file." % f
14 db
= xml
.dom
.minidom
.parse(inWorkspace(f
))
20 print "--------\nPackages\n--------"
22 for spdFile
in XmlList(db
, "/FrameworkDatabase/PackageList/Filename"):
23 spdFileName
= XmlElementData(spdFile
)
24 spd
= xml
.dom
.minidom
.parse(inWorkspace(spdFileName
))
25 spdName
= XmlElement(spd
, "/PackageSurfaceArea/SpdHeader/PackageName")
27 print " %-24s %-10s" % (spdName
, spdFileName
)
31 print "--------\nPlatforms\n--------"
33 for fpdFile
in XmlList(db
, "/FrameworkDatabase/PlatformList/Filename"):
34 fpdFileName
= XmlElementData(fpdFile
)
35 fpd
= xml
.dom
.minidom
.parse(inWorkspace(fpdFileName
))
36 fpdName
= XmlElement(fpd
, "/PlatformSurfaceArea/PlatformHeader/PlatformName")
38 print " %-24s %-10s" % (fpdName
, fpdFileName
)
40 # This acts like the main() function for the script, unless it is 'import'ed
41 # into another script.
42 if __name__
== '__main__':
44 db
= openDatabase("Tools/Conf/FrameworkDatabase.db")