mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-24 22:06:14 +01:00
fix creation of package link, when target project has the package via linked project.
We might have this also in other places, it is not enough anymore to check for the existens of a package _meta file, we need also to check the "project" attribute, if it really comes from this project.
This commit is contained in:
parent
59b19bd012
commit
0042855237
1
NEWS
1
NEWS
@ -3,6 +3,7 @@
|
||||
- --csv/--format options for results command - using format user can explicitly specify what he wants print
|
||||
- support for "unresolvable" state of OBS 2.0
|
||||
- osc branch reads project/package in package directory
|
||||
- fix creation of package link, when target project has the package via linked project
|
||||
|
||||
0.126
|
||||
- added VM autosetup to osc. This requires appropriate OBS version and build script version.
|
||||
|
10
osc/core.py
10
osc/core.py
@ -3176,10 +3176,17 @@ def link_pac(src_project, src_package, dst_project, dst_package, force, rev='',
|
||||
path_args=(quote_plus(dst_project), quote_plus(dst_package)),
|
||||
template_args=None,
|
||||
create_new=False, apiurl=conf.config['apiurl'])
|
||||
root = ET.fromstring(''.join(dst_meta))
|
||||
print root.attrib['project']
|
||||
if root.attrib['project'] != dst_project:
|
||||
# The source comes from a different project via a project link, we need to create this instance
|
||||
meta_change = True
|
||||
except:
|
||||
meta_change = True
|
||||
|
||||
if meta_change:
|
||||
src_meta = show_package_meta(conf.config['apiurl'], src_project, src_package)
|
||||
dst_meta = replace_pkg_meta(src_meta, dst_package, dst_project)
|
||||
meta_change = True
|
||||
|
||||
if disable_publish:
|
||||
meta_change = True
|
||||
@ -3190,6 +3197,7 @@ def link_pac(src_project, src_package, dst_project, dst_package, force, rev='',
|
||||
elm.clear()
|
||||
ET.SubElement(elm, 'disable')
|
||||
dst_meta = ET.tostring(root)
|
||||
|
||||
if meta_change:
|
||||
edit_meta('pkg',
|
||||
path_args=(dst_project, dst_package),
|
||||
|
Loading…
Reference in New Issue
Block a user