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
news-to-metainfo: --limit=N should parse only N release notes #360
Comments
|
Please test the |
|
Thanks for the quick fix! I have a patch ready to test it, but the binary I compiled in my ~/.local prefix has some problems: I'm working in a toolbox container because I'm on Fedora Silverblue (immutable OS). These are the commands I used to build appstream: Any suggestions? |
|
Ok, I got it: |
|
It's not working. You can use this branch for testing: The error I get is: Version 3.9.1 is the 7th-last release and I'm using --limit=6, so it shouldn't be parsed. |
|
If I change to |
Yes, this is expected behavior. In order to know when a previous release block has been completed (and to add the data as release) we need to be able to parse the next header, which signals termination of the release entry. There really is no good way around that... |
|
Ok, it makes sense. Do you know if you'll make a new release soon? |
|
Possibly tomorrow. |
|
It may actually also make sense to give appstreamcli a pkg-config file, so people can require a certain minimum version in their Meson/Automake/CMake/whatever build scripts... |
AFAICS the command
appstreamcli news-to-metainfo --limit=2 NEWS METAINFO.in METAINFO.xmlparses the whole NEWS file and then uses only the information retrieved in the latest two release entries to copy them in the metainfo file.As a result, when you try to introduce this script in a project with a long history and a long NEWS file (not compliant with the format appstreamcli expects to find), it seems the best solution is moving the old NEWS to NEWS.old and then write a new NEWS file from scratch. Fixing all the old release entries is not worth the effort.
I'm wondering if my analysis is correct or if I'm missing something.
What if
--limitmay be adjusted to parse only the first N occurencies ofVersionin the NEWS file so we can fix the format of the latest releases only and keep the history in a single file?The text was updated successfully, but these errors were encountered: