delete=False) as tmpSpecFile:
tmpSpecFile.write(currentSpecString)
tmp_package_spec_path=tmpSpecFile.name
+
+ patternUrlPatchFile = r'Patch[\d]*[\s]*:[\s]*([http,ftp].*/)(.*)'
+
+ with open(tmp_package_spec_path,'r') as currentSpecFile:
+ currentSpecString=currentSpecFile.read()
+
+ resUrlPatchFile=re.findall(patternUrlPatchFile,currentSpecString)
+
+ if len(resUrlPatchFile)>0:
+ for r in resUrlPatchFile:
+ currentSpecString=currentSpecString.replace(r[0]+r[1],r[1])
+
+ with tempfile.NamedTemporaryFile(mode='w',
+ suffix='tmp',
+ prefix=os.path.basename(tmp_package_spec_path),
+ delete=False) as tmpSpecFile:
+ tmpSpecFile.write(currentSpecString)
+ tmp_package_spec_path=tmpSpecFile.name
+
+
if pkgName in ["attr","acl"]:
currentSpecString=currentSpecString.replace('make configure','%configure')