1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-01 04:36:13 +01:00

Merge pull request #1494 from adrianschroeter/fix_linkpac_on_scmsync

Support package linking of packages from scmsync projects
This commit is contained in:
Daniel Mach 2024-02-26 09:30:07 +01:00 committed by GitHub
commit f164258fb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5835,12 +5835,17 @@ def link_pac(
elm.clear() elm.clear()
ET.SubElement(elm, 'disable') ET.SubElement(elm, 'disable')
root.remove('scmsync')
dst_meta = ET.tostring(root, encoding=ET_ENCODING) dst_meta = ET.tostring(root, encoding=ET_ENCODING)
if meta_change: if meta_change:
root = ET.fromstring(''.join(dst_meta))
for scmsync in root.findall('scmsync'):
root.remove(scmsync)
edit_meta('pkg', edit_meta('pkg',
path_args=(dst_project, dst_package), path_args=(dst_project, dst_package),
data=dst_meta) data=ET.tostring(root, encoding=ET_ENCODING))
# 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
if '_link' in meta_get_filelist(apiurl, dst_project, dst_package): if '_link' in meta_get_filelist(apiurl, dst_project, dst_package):