libtool problemleri ve her paketin buna uymaması sebebi ile target attribute'i Patch tagına eklendi.
This commit is contained in:
+1
-1
@@ -233,7 +233,7 @@ class PisiBuild:
|
|||||||
targetDir=config.tmp_dir())
|
targetDir=config.tmp_dir())
|
||||||
|
|
||||||
ui.action("* Applying patch: %s\n" % patch.filename)
|
ui.action("* Applying patch: %s\n" % patch.filename)
|
||||||
util.do_patch(self.srcDir, patchFile, level=patch.level)
|
util.do_patch(self.srcDir, patchFile, level=patch.level, target=patch.target)
|
||||||
|
|
||||||
def genMetaDataXml(self, package):
|
def genMetaDataXml(self, package):
|
||||||
"""Generate the metadata.xml file for build source.
|
"""Generate the metadata.xml file for build source.
|
||||||
|
|||||||
@@ -77,12 +77,15 @@ class PatchInfo:
|
|||||||
self.filename = getNodeText(node)
|
self.filename = getNodeText(node)
|
||||||
self.compressionType = getNodeAttribute(node, "compressionType")
|
self.compressionType = getNodeAttribute(node, "compressionType")
|
||||||
self.level = getNodeAttribute(node, "level")
|
self.level = getNodeAttribute(node, "level")
|
||||||
|
self.target = getNodeAttribute(node, "target")
|
||||||
else:
|
else:
|
||||||
self.compressionType = None
|
self.compressionType = None
|
||||||
if not self.level:
|
if not self.level:
|
||||||
self.level = 0
|
self.level = 0
|
||||||
else:
|
else:
|
||||||
self.level = int(self.level)
|
self.level = int(self.level)
|
||||||
|
if not self.target:
|
||||||
|
self.target = ''
|
||||||
|
|
||||||
def elt(self, xml):
|
def elt(self, xml):
|
||||||
node = xml.newNode("Patch")
|
node = xml.newNode("Patch")
|
||||||
@@ -91,6 +94,8 @@ class PatchInfo:
|
|||||||
node.setAttribute("compressionType", self.compressionType)
|
node.setAttribute("compressionType", self.compressionType)
|
||||||
if self.level:
|
if self.level:
|
||||||
node.setAttribute("level", str(self.level))
|
node.setAttribute("level", str(self.level))
|
||||||
|
if self.target:
|
||||||
|
node.setAttribute("target", self.target)
|
||||||
return node
|
return node
|
||||||
|
|
||||||
def verify(self):
|
def verify(self):
|
||||||
|
|||||||
+2
-2
@@ -264,14 +264,14 @@ def uncompress(patchFile, compressType="gz", targetDir=None):
|
|||||||
return filePath
|
return filePath
|
||||||
|
|
||||||
|
|
||||||
def do_patch(sourceDir, patchFile, level):
|
def do_patch(sourceDir, patchFile, level, target = ''):
|
||||||
"""simple function to apply patches.."""
|
"""simple function to apply patches.."""
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
os.chdir(sourceDir)
|
os.chdir(sourceDir)
|
||||||
|
|
||||||
check_file(patchFile)
|
check_file(patchFile)
|
||||||
level = int(level)
|
level = int(level)
|
||||||
cmd = "patch -p%d < %s" % (level, patchFile)
|
cmd = "patch -p%d %s< %s" % (level, target, patchFile)
|
||||||
p = os.popen(cmd)
|
p = os.popen(cmd)
|
||||||
o = p.readlines()
|
o = p.readlines()
|
||||||
retval = p.close()
|
retval = p.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user