mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-29 15:56:17 +01:00
- oops... unbreak copy_pac again (fixes #181)
Got broken in commit ffb37960ff
.
This commit is contained in:
parent
e8783d2501
commit
6a69ecc137
12
osc/core.py
12
osc/core.py
@ -5155,9 +5155,9 @@ def copy_pac(src_apiurl, src_project, src_package,
|
|||||||
# probably a relict from former times (if at all))
|
# probably a relict from former times (if at all))
|
||||||
if entry.get('name').startswith('_service:'):
|
if entry.get('name').startswith('_service:'):
|
||||||
filelist.remove(entry)
|
filelist.remove(entry)
|
||||||
filelist = Package.commit_filelist(dst_apiurl, dst_project,
|
tfilelist = Package.commit_filelist(dst_apiurl, dst_project,
|
||||||
dst_package, filelist, msg=comment)
|
dst_package, filelist, msg=comment)
|
||||||
todo = Package.commit_get_missing(filelist)
|
todo = Package.commit_get_missing(tfilelist)
|
||||||
for filename in todo:
|
for filename in todo:
|
||||||
print(' ', filename)
|
print(' ', filename)
|
||||||
# hmm ideally, we would pass a file-like (that delegates to
|
# hmm ideally, we would pass a file-like (that delegates to
|
||||||
@ -5168,9 +5168,9 @@ def copy_pac(src_apiurl, src_project, src_package,
|
|||||||
path = ['source', dst_project, dst_package, pathname2url(filename)]
|
path = ['source', dst_project, dst_package, pathname2url(filename)]
|
||||||
u = makeurl(dst_apiurl, path, query={'rev': 'repository'})
|
u = makeurl(dst_apiurl, path, query={'rev': 'repository'})
|
||||||
http_PUT(u, file=f.name)
|
http_PUT(u, file=f.name)
|
||||||
filelist = Package.commit_filelist(dst_apiurl, dst_project, dst_package,
|
tfilelist = Package.commit_filelist(dst_apiurl, dst_project, dst_package,
|
||||||
filelist, msg=comment)
|
filelist, msg=comment)
|
||||||
todo = Package.commit_get_missing(filelist)
|
todo = Package.commit_get_missing(tfilelist)
|
||||||
if todo:
|
if todo:
|
||||||
raise oscerr.APIError('failed to copy: %s' % ', '.join(todo))
|
raise oscerr.APIError('failed to copy: %s' % ', '.join(todo))
|
||||||
return 'Done.'
|
return 'Done.'
|
||||||
|
Loading…
Reference in New Issue
Block a user