summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalev Lember <klember@redhat.com>2019-03-29 14:31:07 +0100
committerRichard Hughes <richard@hughsie.com>2019-03-29 09:47:56 -0400
commitf9acd7b4f2362402f5a23f80e0a27552ea76e3e6 (patch)
tree9678983fc250119b6277dff4b6edc233b8fab191
parent7640ddc29fb1f7c852162d57d94e606f97f99711 (diff)
downloadappstream-glib-f9acd7b4f2362402f5a23f80e0a27552ea76e3e6.tar.gz
Only require <release> for validate, but not validate-relax
The plan was to require <release> for validate, so that we would be able to require a version number for flathub, but it accidentally got enabled for validate-relax as well.
-rw-r--r--libappstream-glib/as-app-validate.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libappstream-glib/as-app-validate.c b/libappstream-glib/as-app-validate.c
index 945771b..248e9b6 100644
--- a/libappstream-glib/as-app-validate.c
+++ b/libappstream-glib/as-app-validate.c
@@ -941,10 +941,13 @@ as_app_validate_releases (AsApp *app, AsAppValidateHelper *helper, GError **erro
as_format_get_kind (format) != AS_FORMAT_KIND_METAINFO)
return TRUE;
- /* only for desktop and console apps */
- if (as_app_get_kind (app) == AS_APP_KIND_DESKTOP ||
- as_app_get_kind (app) == AS_APP_KIND_CONSOLE) {
- require_release = TRUE;
+ /* make the requirements more strict */
+ if ((helper->flags & AS_APP_VALIDATE_FLAG_RELAX) == 0) {
+ /* only for desktop and console apps */
+ if (as_app_get_kind (app) == AS_APP_KIND_DESKTOP ||
+ as_app_get_kind (app) == AS_APP_KIND_CONSOLE) {
+ require_release = TRUE;
+ }
}
/* require releases */