mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-11 17:54:06 +02:00
* do not erase package meta data when doing linkpac
* do not anymore implicit add maintainer to package
This commit is contained in:
18
osc/core.py
18
osc/core.py
@@ -2663,9 +2663,6 @@ def replace_pkg_meta(pkgmeta, new_name, new_prj, keep_maintainers = False,
|
|||||||
if not keep_maintainers:
|
if not keep_maintainers:
|
||||||
for person in root.findall('person'):
|
for person in root.findall('person'):
|
||||||
root.remove(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:
|
if not keep_develproject:
|
||||||
for dp in root.findall('devel'):
|
for dp in root.findall('devel'):
|
||||||
root.remove(dp)
|
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
|
- "dst" is the "link" package that we are creating here
|
||||||
"""
|
"""
|
||||||
|
|
||||||
src_meta = show_package_meta(conf.config['apiurl'], src_project, src_package)
|
try: meta_exists(metatype='pkg',
|
||||||
src_meta = replace_pkg_meta(src_meta, dst_package, dst_project)
|
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',
|
edit_meta('pkg',
|
||||||
path_args=(dst_project, dst_package),
|
path_args=(dst_project, dst_package),
|
||||||
data=src_meta)
|
data=src_meta)
|
||||||
|
|
||||||
# create the _link file
|
# create the _link file
|
||||||
# but first, make sure not to overwrite an existing one
|
# but first, make sure not to overwrite an existing one
|
||||||
|
Reference in New Issue
Block a user