Tribler / tribler

Privacy enhanced BitTorrent client with P2P content discovery
https://www.tribler.org
GNU General Public License v3.0
4.86k stars 451 forks source link

AppData file invalid due to duplicate release #8255

Closed qstokkink closed 1 week ago

qstokkink commented 1 week ago

I created a test build for Flatpak and I got the following error when using 8.0.3_x64.deb:

Processing application org.tribler.Tribler
org.tribler.Tribler:               AppData problem: tag-invalid : <release> version was duplicated
Error loading AppData file: AppData file /app/share/appdata/org.tribler.Tribler.appdata.xml was not valid

I extracted org.tribler.Tribler.metainfo.xml and found the following:

  <releases><release version="8.0.3" date="2024-11-04" /><release version="8.0.3" date="2024-11-04" /></releases>

This should be written here:

https://github.com/Tribler/tribler/blob/42a8ac190f8f9f8bc4733c34c8092dd1375dd746/build/debian/update_metainfo.py#L5-L12

However, I don't think the script is being called twice and I only see one write() being called.

UPDATE: I can reproduce this by calling update_metainfo.py once. UPDATE2: The problem is that SubElement already appends itself and then is appended again.