95""" create the command to run evalid on each file in the list of files"""
+ 96liste=buildtools.CommandList()
+ 97
+ 98#tools_dir = os.path.join(self.build_area_root, "/epoc32/tools")
+ 99
+100foriinrange(self.nb_split):
+101#liste.addCommand(buildtools.Command("perl -I"+tools_dir, tools_dir, [os.path.join(tools_dir,"evalid_multiple.pl"), "-f", self.__get_partial_input_file_name(i), "> "+self.__get_partial_signature_file_name(i) ]))
+102liste.addCommand(buildtools.Command("evalid",os.sep,["","-f",self.__get_partial_input_file_name(i)+" "+self.build_area_root,self.__get_partial_signature_file_name(i)]))
+103
+104returnliste
+
229"""Create Delta zip and list of file to delete."""
+230
+231self.__fill_signature_dict(self.old_md5_signature,0)
+232self.__fill_signature_dict(self.new_md5_signature,1)
+233
+234#fp_dic = open(zip_file + ".dic.txt", 'w')
+235#fp_dic.write(str(self.sign_dic))
+236#fp_dic.close()
+237
+238delete_list=[]
+239
+240ifnotos.path.exists(os.path.dirname(delete_list_file)):
+241os.mkdir(os.path.dirname(delete_list_file))
+242ifnotos.path.exists(self.temp_path):
+243os.mkdir(self.temp_path)
+244
+245archive_txt=open(os.path.join(self.temp_path,'create_zips.txt'),'w')
+246
+247for_fileinself.sign_dic.keys():
+248filepath=os.path.join(self.build_area_root,_file)
+249
+250signatures=self.sign_dic[_file]
+251
+252(_,rest)=os.path.splitdrive(filepath)
+253(frontpath,rest)=os.path.split(rest)
+254
+255if(signatures[0]!=signatures[1]):#File changed between the 2 BAs
+256if(signatures[0]!="")and(signatures[1]!=""):# File is present in both BAs and has changed
+257ifos.path.exists(filepath):# File could have been deleting after running 'build-md5':
+258archive_txt.write(_file+"\n")
+259else:
+260if(signatures[1]!=""):# New file
+261ifos.path.exists(filepath):
+262archive_txt.write(_file+"\n")
+263else:# Deleted file
+264delete_list.append(filepath)
+265
+266archive_txt.close()
+267
+268splitter=MD5SignatureBuilder('',no_of_zips,self.temp_path,'',os.path.join(self.temp_path,'create_zips.txt'))
+269splitter.split_file_list()
+270
+271os.chdir(self.build_area_root)
+272
+273(frontpath,rest)=os.path.split(zip_file)
+274stages=buildtools.CommandList()
+275
+276foriinrange(no_of_zips):
+277md5_dir=os.path.join(self.temp_path,"md5_temp")
+278path=os.path.join(md5_dir,os.path.join(str(no_of_zips),str(i)+'.txt'))
+279output=os.path.join(frontpath,rest.replace(".zip","_part_%sof%s.zip"%(str(i+1),str(no_of_zips))))
+280
+281cmd=buildtools.Command('7za.exe',self.build_area_root)
+282cmd.addArg('a')
+283# Set the format to be zip-compatible
+284cmd.addArg('-tzip')
+285cmd.addArg(output)
+286cmd.addArg('@'+path)
+287
+288stages.addCommand(cmd)
+289
+290writer=buildtools.AntWriter(ant_file)
+291writer.write(stages)
+292
+293fp_delete=open(delete_list_file,'w')
+294fp_delete.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
+295fp_delete.write("<updateinstructions>\n")
+296foriindelete_list:
+297fp_delete.write("<deletefileaction target=\""+i[2:]+"\"/>\n")
+298fp_delete.write("</updateinstructions>\n")
+299fp_delete.close()
+
309""" compare the tree structures"""
+310string=""
+311#o = OldNewBA()
+312both=False
+313only_old=False
+314only_new=False
+315forfilenameinself.keys():
+316signatures=self[filename]
+317ifsignatures[0]==signatures[1]:#File did not change
+318both=True
+319elif(signatures[0]!="")and(signatures[1]!=""):# File is present in both BAs and has changed
+320both=False
+321else:
+322if(signatures[1]!=""):# New file
+323only_old=True
+324else:# Deleted file
+325only_new=True
+326
+327string=string+filename+" "+str(both)+" "+" "+str(only_old)+" "+str(only_new)+" "+self[filename][0]+" "+self[filename][1]+"\n"
+328
+329returnstring
+