summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-03-06 18:51:38 +0000
committerRichard Hughes <richard@hughsie.com>2015-03-06 18:51:40 +0000
commit6f985ba035085751f16e0979d1ef864cd9d25719 (patch)
tree52736da12b00693f4f663d9470145c90c86e89a5
parent4c1cf4744f29144093c260f66ff1c25d6cf02709 (diff)
downloadappstream-glib-6f985ba035085751f16e0979d1ef864cd9d25719.tar.gz
Relax validation checks to allow empty release sections
If an project has more than one application, and the NEWS data is encoded in the AppData file then it's entirely possible and valid that one application has no release notes at all. Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=745712
-rw-r--r--data/tests/success.appdata.xml3
-rw-r--r--libappstream-glib/as-app-validate.c6
2 files changed, 4 insertions, 5 deletions
diff --git a/data/tests/success.appdata.xml b/data/tests/success.appdata.xml
index 7794428..9a5c6d6 100644
--- a/data/tests/success.appdata.xml
+++ b/data/tests/success.appdata.xml
@@ -33,6 +33,9 @@
<screenshot type="default" width="355" height="134">https://projects.gnome.org/gnome-power-manager/images/gpm-low-batt.png</screenshot>
<screenshot xml:lang="as" type="default" width="355" height="134">https://projects.gnome.org/gnome-power-manager/images/gpm-low-batt.png</screenshot>
</screenshots>
+ <releases>
+ <release version="2.0.1" timestamp="1424116753"/>
+ </releases>
<url type="homepage">http://www.gnome.org/projects/gnome-power-manager/</url>
<updatecontact>richard_at_hughsie.com</updatecontact>
<project_group>GNOME</project_group>
diff --git a/libappstream-glib/as-app-validate.c b/libappstream-glib/as-app-validate.c
index e219697..5cb9e23 100644
--- a/libappstream-glib/as-app-validate.c
+++ b/libappstream-glib/as-app-validate.c
@@ -849,11 +849,7 @@ as_app_validate_release (AsRelease *release, AsAppValidateHelper *helper, GError
/* check description */
tmp = as_release_get_description (release, "C");
- if (tmp == NULL) {
- ai_app_validate_add (helper->probs,
- AS_PROBLEM_KIND_ATTRIBUTE_MISSING,
- "<release> has no description");
- } else {
+ if (tmp != NULL) {
if (as_app_validate_has_hyperlink (tmp)) {
ai_app_validate_add (helper->probs,
AS_PROBLEM_KIND_STYLE_INCORRECT,