1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-28 09:00:46 +02:00

- do not overwrite package meta on "copypac" by default

This commit is contained in:
2012-01-09 14:30:52 +01:00
parent 94a670e067
commit 67be93e1a4

View File

@@ -4391,6 +4391,7 @@ def copy_pac(src_apiurl, src_project, src_package,
expand = False, expand = False,
revision = None, revision = None,
comment = None, comment = None,
force_meta_update = None,
keep_link = None): keep_link = None):
""" """
Create a copy of a package. Create a copy of a package.
@@ -4407,9 +4408,16 @@ def copy_pac(src_apiurl, src_project, src_package,
src_meta = replace_pkg_meta(src_meta, dst_package, dst_project, keep_maintainers, src_meta = replace_pkg_meta(src_meta, dst_package, dst_project, keep_maintainers,
dst_userid, keep_develproject) dst_userid, keep_develproject)
print 'Sending meta data...' url = make_meta_url('pkg', (quote_plus(dst_project),) + (quote_plus(dst_package),), dst_apiurl)
u = makeurl(dst_apiurl, ['source', dst_project, dst_package, '_meta']) found = None
http_PUT(u, data=src_meta) try:
found = http_GET(url).readlines()
except urllib2.HTTPError, e:
pass
if force_meta_update or not found:
print 'Sending meta data...'
u = makeurl(dst_apiurl, ['source', dst_project, dst_package, '_meta'])
http_PUT(u, data=src_meta)
print 'Copying files...' print 'Copying files...'
if not client_side_copy: if not client_side_copy: