Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes related to Appstream data installation and ZSTD support #695

Merged
merged 6 commits into from
Mar 4, 2025

Conversation

mcrha
Copy link
Contributor

@mcrha mcrha commented Jan 16, 2025

There is already the ZSTD compression support built in, but it was not extended into the appstream data installation, which is the place the code will reach it first, because the ZSTD can be used in the repositories.

See the respective commits for the various fixes done along the way.

mcrha added 2 commits January 16, 2025 17:11
When the decompression finished, there can still be some data written
to the output buffer. Without passing it over, the output can be cut.
The dash (`-`) is used in the appstream generated files, thus expect it.

Related to ximion#683
Copy link
Owner

@ximion ximion left a comment

Choose a reason for hiding this comment

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

Sorry for the slow review! I found one issue, can you please fix that? Then this PR should be ready to merge :-)

Some parts of the code know of `.yaml*`, but this one knows only about `.yml*`.
The code knows of .yml* and .yaml* variants on various places, this one
was only missing. This fixes also a bug, when the YAML file was not compressed,
it was treated as XML.
The repo data can be compressed with ZSTD, thus teach the as_utils_install_metadata_file()
what to do with these files.
The as_utils_install_metadata_file() can install the .xml* data
re-saved, with added origin reference. When it does so, and the original
file was compressed, then the file name extension does not reflect
the file content anymore (it's a pure XML after re-saving, not
a compressed XML data). That can confuse the Appstream data readers,
thus rename the file to be .xml, to avoid this problem.
@mcrha mcrha force-pushed the wip/various-fixes branch from 13283ab to 710755e Compare February 28, 2025 06:43
@ximion
Copy link
Owner

ximion commented Mar 4, 2025

Thank you for the patch! :-)

@ximion ximion merged commit 1ff3efe into ximion:main Mar 4, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants