/usr/lib/python2.3/tabnanny.py specfile.py
This commit is contained in:
+18
-18
@@ -60,27 +60,27 @@ class SpecFile(XmlFile):
|
|||||||
|
|
||||||
self.source = SourceInfo()
|
self.source = SourceInfo()
|
||||||
self.source.name = self.getChildText("Source/Name")
|
self.source.name = self.getChildText("Source/Name")
|
||||||
archiveNode = self.getNode("Source/Archive")
|
archiveNode = self.getNode("Source/Archive")
|
||||||
self.source.archiveUri = getNodeText(archiveNode).strip()
|
self.source.archiveUri = getNodeText(archiveNode).strip()
|
||||||
self.source.archiveName = basename(self.source.archiveUri)
|
self.source.archiveName = basename(self.source.archiveUri)
|
||||||
self.source.archiveType = getNodeAttribute(archiveNode, "archType")
|
self.source.archiveType = getNodeAttribute(archiveNode, "archType")
|
||||||
self.source.archiveSHA1 = getNodeAttribute(archiveNode, "sha1sum")
|
self.source.archiveSHA1 = getNodeAttribute(archiveNode, "sha1sum")
|
||||||
patchElts = self.getChildElts("Source/Patches")
|
patchElts = self.getChildElts("Source/Patches")
|
||||||
if patchElts:
|
if patchElts:
|
||||||
self.source.patches = [PatchInfo(p) for p in patchElts]
|
self.source.patches = [PatchInfo(p) for p in patchElts]
|
||||||
|
|
||||||
buildDepElts = self.getChildElts("Source/BuildDependencies")
|
buildDepElts = self.getChildElts("Source/BuildDependencies")
|
||||||
if buildDepElts:
|
if buildDepElts:
|
||||||
self.source.buildDeps = [DepInfo(d) for d in buildDepElts]
|
self.source.buildDeps = [DepInfo(d) for d in buildDepElts]
|
||||||
|
|
||||||
historyElts = self.getAllNodes("History/Update")
|
historyElts = self.getAllNodes("History/Update")
|
||||||
self.source.history = [HistoryInfo(x) for x in historyElts]
|
self.source.history = [HistoryInfo(x) for x in historyElts]
|
||||||
|
|
||||||
# As we have no Source/Version tag we need to get
|
# As we have no Source/Version tag we need to get
|
||||||
# the last version and release information
|
# the last version and release information
|
||||||
# from the first child of History/Update. And it works :)
|
# from the first child of History/Update. And it works :)
|
||||||
self.source.version = self.source.history[0].version
|
self.source.version = self.source.history[0].version
|
||||||
self.source.release = self.source.history[0].release
|
self.source.release = self.source.history[0].release
|
||||||
|
|
||||||
# find all binary packages
|
# find all binary packages
|
||||||
packageElts = self.getAllNodes("Package")
|
packageElts = self.getAllNodes("Package")
|
||||||
@@ -102,11 +102,11 @@ class MetaData(SpecFile):
|
|||||||
"""This is a superset of the source spec definition"""
|
"""This is a superset of the source spec definition"""
|
||||||
|
|
||||||
def read(self, filename):
|
def read(self, filename):
|
||||||
super(MetaData, self).read(filename)
|
super(MetaData, self).read(filename)
|
||||||
distribution = self.getNodeText("Source/Distribution")
|
distribution = self.getNodeText("Source/Distribution")
|
||||||
distributionRelease = self.getNodeText("Source/DistributionRelease")
|
distributionRelease = self.getNodeText("Source/DistributionRelease")
|
||||||
architecture = self.getNodeText("Source/Architecture")
|
architecture = self.getNodeText("Source/Architecture")
|
||||||
installSize = int(self.getNodeText("Source/InstallSize"))
|
installSize = int(self.getNodeText("Source/InstallSize"))
|
||||||
|
|
||||||
def write(self, filename):
|
def write(self, filename):
|
||||||
ui.info("METADATA WRITE NOT IMPLEMENTED\n")
|
ui.info("METADATA WRITE NOT IMPLEMENTED\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user