-
Notifications
You must be signed in to change notification settings - Fork 27
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
Converters don't nest - can't handle .yml.gz #13
Comments
Got a patch handy? I'm just on PTO. Thanks. |
I will attempt to write one but haven't started yet. I figure the best thing is to re-check the mime type after a gzip decode. |
Previously the contents were assumed to be XML, and this didn't work with GZip compressed YAML. The code isn't optimal as it writes decodes the GZipped file to a temporary file. This was done because the converter API uses a GFile instead of a GInputStream. The existing XML case doesn't use the temporary file so shouldn't have a performance hit. Fixes hughsie#13
This is much more flexible than the existing GFile -> GInputStream converter functions. Content types can be "nested" for instance: application/gzip -> application/x-yaml -> application/xml To ensure the content type is always correct when there is no filename info, always add the XML header when building sources. For API compatibility we also have to support the deprecated vfunc too. Fixes #13
Okay, I've had a go at this too; I took what you did and rewrote it -- there is a proper context object we can extend in the future if we need to now. I've also pushed a wip/hughsie/XbBuilderSource-adapter branch in gnome-software which uses this new API -- feedback very welcome. |
This is much more flexible than the existing GFile -> GInputStream converter functions. Content types can be "nested" for instance: application/gzip -> application/x-yaml -> application/xml To ensure the content type is always correct when there is no filename info, always add the XML header when building sources. For API compatibility we also have to support the deprecated vfunc too. Fixes #13
This is much more flexible than the existing GFile -> GInputStream converter functions. Content types can be "nested" for instance: application/gzip -> application/x-yaml -> application/xml To ensure the content type is always correct when there is no filename info, always add the XML header when building sources. For API compatibility we also have to support the deprecated vfunc too. Fixes #13
This is much more flexible than the existing GFile -> GInputStream converter functions. Content types can be "nested" for instance: application/gzip -> application/x-yaml -> application/xml To ensure the content type is always correct when there is no filename info, always add the XML header when building sources. For API compatibility we also have to support the deprecated vfunc too. Fixes #13
libxmlb assumes the result of a gzipped file is XML, instead of checking the MIME type of the decompressed data. This means that .yml.gz files can't be handled by the converter.
The text was updated successfully, but these errors were encountered: