if link_prj == obs_target_prj and link_pkg == pre_package:
build.create_link_pac(obs_pre_prj, pre_package, \
obs_pre_prj, package)
+ if re.search("_aggregate", package):
+ print "Copypac aggregate package: %s/%s" %(obs_pre_prj, package)
+ build.create_copy_pac(obs_target_prj, package, obs_pre_prj,\
+ package)
+ aggregate_file_name="_aggregate"
+ build.get_source_file(obs_target_prj, package, aggregate_file_name)
+ content = ""
+ with open(aggregate_file_name, 'r') as f:
+ content = f.read()
+ content_xml_root = ElementTree.fromstringlist(content)
+ for element in content_xml_root.findall('aggregate'):
+ element.set('project',obs_pre_prj)
+ content = ElementTree.tostring(content_xml_root)
+ with open(aggregate_file_name, 'w') as f:
+ f.write(content)
+ commit_msg="uploaded to copy pac %s/%s from %s" % (obs_pre_prj, package, obs_target_prj)
+ try:
+ build.commit_files(obs_pre_prj, package,
+ [(aggregate_file_name, True)], commit_msg)
+ except ObsError, error:
+ raise UploadError("Unable to upload _aggregate to %s: %s" % \
+ (obs_pre_prj, error))
+ print "Copypac done."
def get_base_project(build, _project):
_meta = build.get_meta(_project)