for git_name in self.build_pkg_list.keys():
for each_file in os.listdir(os.path.join(self.prj_src_root,repo,git_name,'packaging')):
if each_file.endswith('.spec'):
- binary_list += each_file.rstrip('.spec')+','
+ binary_list += each_file.replace('.spec','')+','
binary_list = binary_list.rstrip(',')
print 'build spec file list: %s' %binary_list
for success_pkg in os.listdir(success_log_root):
src_file=success_log_root+'/'+success_pkg+'/log.txt'
print 'success_log_dest: %s ,success_pkg: %s' %(success_log_dest,success_pkg)
- dest_file=success_log_dest+'/'+re.findall('\D*\d*\D+\d*[-]',success_pkg)[0].rstrip('-')+'.buildlog.txt'
+ dest_file=success_log_dest+'/'+re.sub('-\d+|.\d+','',success_pkg)+'.buildlog.txt'
shutil.copy(src_file,dest_file)
#failed packages
for fail_pkg in os.listdir(fail_log_root):
src_file=fail_log_root+'/'+fail_pkg+'/log.txt'
- dest_file=fail_log_dest+'/'+re.findall('\D*\d*\D+\d*[-]',fail_pkg)[0].rstrip('-')+'.buildlog.txt'
+ dest_file=fail_log_dest+'/'+re.sub('-\d+|.\d+','',fail_pkg)+'.buildlog.txt'
shutil.copy(src_file,dest_file)
#Remove folder if there is no file in arch directory
if len(os.walk(success_log_dest).next()[2]) == 0: