mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
* do not erase package meta data when doing linkpac
* do not anymore implicit add maintainer to package
This commit is contained in:
parent
4df5334115
commit
0d2e353188
20
osc/core.py
20
osc/core.py
@ -2663,9 +2663,6 @@ def replace_pkg_meta(pkgmeta, new_name, new_prj, keep_maintainers = False,
|
||||
if not keep_maintainers:
|
||||
for person in root.findall('person'):
|
||||
root.remove(person)
|
||||
dst_userid = dst_userid or conf.config['user']
|
||||
ET.SubElement(root, 'person',
|
||||
userid = dst_userid, role = 'maintainer')
|
||||
if not keep_develproject:
|
||||
for dp in root.findall('devel'):
|
||||
root.remove(dp)
|
||||
@ -2678,12 +2675,17 @@ def link_pac(src_project, src_package, dst_project, dst_package, force, rev='',
|
||||
- "dst" is the "link" package that we are creating here
|
||||
"""
|
||||
|
||||
src_meta = show_package_meta(conf.config['apiurl'], src_project, src_package)
|
||||
src_meta = replace_pkg_meta(src_meta, dst_package, dst_project)
|
||||
|
||||
edit_meta('pkg',
|
||||
path_args=(dst_project, dst_package),
|
||||
data=src_meta)
|
||||
try: meta_exists(metatype='pkg',
|
||||
path_args=(quote_plus(dst_project), quote_plus(dst_package)),
|
||||
template_args=None,
|
||||
create_new=False, apiurl=conf.config['apiurl'])
|
||||
except:
|
||||
src_meta = show_package_meta(conf.config['apiurl'], src_project, src_package)
|
||||
src_meta = replace_pkg_meta(src_meta, dst_package, dst_project)
|
||||
|
||||
edit_meta('pkg',
|
||||
path_args=(dst_project, dst_package),
|
||||
data=src_meta)
|
||||
|
||||
# create the _link file
|
||||
# but first, make sure not to overwrite an existing one
|
||||
|
Loading…
Reference in New Issue
Block a user