I've reviewed Packaging:AppData https://fedoraproject.org/wiki/Packaging:AppData and have some questions.
When running fedpkg lint, I receive:*copyq.x86_64: E: invalid-appdata-file /usr/share/appdata/copyq.appdata.xml*
I then issue appstream-util validate copyq.appdata.xml and receive: *copyq.appdata.xml: FAILED: • tag-missing : <name> is not present • tag-missing : <summary> is not present Validation of files failed*
However, when I run appstream-util validate-relax, it passes.
The guidelines indicate you MUST follow the AppData Specification Page http://people.freedesktop.org/~hughsient/appdata/; but it doesn't really give an indication of what is required, and what is optional. It only says "should"; however:
If you read the description of <name> and <summary> it says the contents for both of those fields are "usually the same as the desktop file" - which indicates it is known to be a duplicate of what is in the desktop file, but yet implies it is still required - otherwise why bother to point out the correlation to the desktop file.
Upstream response is if they are duplicated in the desktop file, then they aren't needed in the appdata file.
There is also a bug report https://bugzilla.redhat.com/show_bug.cgi?id=1185361 which discusses rpmlint and validate-relax. It touches upon the fact that validate-relax may be missing some things, but doesn't appear to reach any conclusion.
The Fedora guidelines say to use "validate-relax", but rpmlint appears to use "validate". Which is correct? Is <name> and <summary> optional or required?
On 2 June 2015 at 17:17, Gerald B. Cox gbcox@bzb.us wrote:
Upstream response is if they are duplicated in the desktop file, then they aren't needed in the appdata file.
This is old advice and no longer true. One mistake I made when first pushing AppStream was to fall back to the .desktop file Name= and Comment= lines even with AppData. This was bad for two reasons:
* We can't validate the AppData file without the presence of the .desktop file * We rarely want the same desktop comment and the one-line software center summary; it can be and if it is then the translators don't have to do any more work as it's extracted and deduplicated but ideally the summary is a one line "sell line". * It's a bit "magic" and makes things more complicated to explain
The Fedora guidelines say to use "validate-relax", but rpmlint appears to use "validate". Which is correct? Is <name> and <summary> optional or required?
If i was to have my time again, I'd say required, but I don't want to start ignoring AppData files that were once valid. Relaxed validation is probably the right thing to do to also ignore the style guideline which sometimes are false positives in some cases.
Richard.
On Tue, Jun 2, 2015 at 9:33 AM, Richard Hughes hughsient@gmail.com wrote:
If i was to have my time again, I'd say required, but I don't want to start ignoring AppData files that were once valid.
Thanks for the clarification and the quick response. I think it would be a good idea to update the specification page and clearly indicate "required" instead of "should". That would clear up some confusion and encourage people to do the right thing going forward. Relaxed validation would continue to allow the older files to pass.
packaging@lists.fedoraproject.org