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())
|
||||
|
||||
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):
|
||||
"""Generate the metadata.xml file for build source.
|
||||
|
||||
@@ -77,12 +77,15 @@ class PatchInfo:
|
||||
self.filename = getNodeText(node)
|
||||
self.compressionType = getNodeAttribute(node, "compressionType")
|
||||
self.level = getNodeAttribute(node, "level")
|
||||
self.target = getNodeAttribute(node, "target")
|
||||
else:
|
||||
self.compressionType = None
|
||||
if not self.level:
|
||||
self.level = 0
|
||||
else:
|
||||
self.level = int(self.level)
|
||||
if not self.target:
|
||||
self.target = ''
|
||||
|
||||
def elt(self, xml):
|
||||
node = xml.newNode("Patch")
|
||||
@@ -91,6 +94,8 @@ class PatchInfo:
|
||||
node.setAttribute("compressionType", self.compressionType)
|
||||
if self.level:
|
||||
node.setAttribute("level", str(self.level))
|
||||
if self.target:
|
||||
node.setAttribute("target", self.target)
|
||||
return node
|
||||
|
||||
def verify(self):
|
||||
|
||||
+2
-2
@@ -264,14 +264,14 @@ def uncompress(patchFile, compressType="gz", targetDir=None):
|
||||
return filePath
|
||||
|
||||
|
||||
def do_patch(sourceDir, patchFile, level):
|
||||
def do_patch(sourceDir, patchFile, level, target = ''):
|
||||
"""simple function to apply patches.."""
|
||||
cwd = os.getcwd()
|
||||
os.chdir(sourceDir)
|
||||
|
||||
check_file(patchFile)
|
||||
level = int(level)
|
||||
cmd = "patch -p%d < %s" % (level, patchFile)
|
||||
cmd = "patch -p%d %s< %s" % (level, target, patchFile)
|
||||
p = os.popen(cmd)
|
||||
o = p.readlines()
|
||||
retval = p.close()
|
||||
|
||||
Reference in New Issue
Block a user