Skip to content

Don't attempt to export metainfo releases.xml files twice - #6698

Merged
swick merged 2 commits into
flatpak:mainfrom
electricbrass:bugfix/metainfo-export
Jun 16, 2026
Merged

swick merged 2 commits into
flatpak:mainfrom
electricbrass:bugfix/metainfo-export

Conversation

@electricbrass

Copy link
Copy Markdown
Contributor

Fixes #6695

Removes unnecessary duplicate directories from export steps that would cause errors when trying to export the same file multiple times.

I'm not very familiar with how all the tests are set up, so hopefully I did it right. It seems to work at least.

Comment thread tests/test-metainfo-export.sh Outdated
Comment thread tests/test-metainfo-export.sh
Comment thread tests/test-metainfo-export.sh Outdated
Comment thread tests/test-metainfo-export.sh Outdated
Comment thread tests/meson.build
@bbhtt

bbhtt commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Seems fine, thanks.

@electricbrass
electricbrass force-pushed the bugfix/metainfo-export branch from c1de527 to 0eee933 Compare June 14, 2026 15:11
Comment thread tests/meson.build Outdated
'preinstall': {},
'run-custom': {'wrap': ['user', 'system']},
'upgrade-from-header': {'wrap': ['user', 'system', 'system-norevokefs']},
'metainfo-export': {'wrap': ['user', 'system']},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to run this in user and system context.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw, i suggested this because the install path is going through two different FL_DIRs.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but we're testing exporting properly in other tests already. This seems to be about building and the exporting mechanism is only used to verify the build result.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, if there's tests for that already then it's fine. I didn't notice yesterday.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, took that back out

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based in a very quick look, it does seem like this is the only test checking that releases.xml are exported when installing though. I added that part of the test to make sure that the fix (and future changes ofc) didn't cause a regression to 1.16's behavior where the build export worked but the install export gave a warning and skipped the file.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's important here is that the file ends up in the image at the right location. We already have a test which ensures that those files get exported correctly for user and system installs. If you want to add release.xml to those tests, then go ahead, always appreciated.

Adds a test that verifies releases.xml metainfo files are not duplicated
at any export stage, and that they are not left unexported either.
Both collect exports and flatpak_export_dir recursively export the
directories in their respective directory lists. Because of this,
including share/metainfo/releases when share/metainfo is already in the
lists is unnecessary and can cause exporting to fail because of
duplicate files.
@electricbrass
electricbrass force-pushed the bugfix/metainfo-export branch from 0eee933 to 77dae6f Compare June 15, 2026 20:13
@swick
swick added this pull request to the merge queue Jun 16, 2026
@swick

swick commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

Merged via the queue into flatpak:main with commit 4d3f0bb Jun 16, 2026
11 checks passed
@electricbrass
electricbrass deleted the bugfix/metainfo-export branch June 16, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Appstream releases.xml files are are exported twice, causing an error when building flatpaks

3 participants