summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-09-16 12:23:12 +0100
committerRichard Hughes <richard@hughsie.com>2015-09-16 12:23:12 +0100
commit35cfd22fb0371fe8eec3a866cda6bfa3741e6bf7 (patch)
tree61a3f9b8a6d025d3e7f3f4dcfed4a99275a164e5
parent8da95ba8cd45b0838a6fb98f3634fdba2601bb45 (diff)
downloadappstream-glib-35cfd22fb0371fe8eec3a866cda6bfa3741e6bf7.tar.gz
Do not overwrite the AppData URL with the one from the package
-rw-r--r--libappstream-builder/asb-self-test.c2
-rw-r--r--libappstream-builder/asb-task.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/libappstream-builder/asb-self-test.c b/libappstream-builder/asb-self-test.c
index 2c163dd..511278a 100644
--- a/libappstream-builder/asb-self-test.c
+++ b/libappstream-builder/asb-self-test.c
@@ -423,7 +423,7 @@ asb_test_context_test_func (AsbTestContextMode mode)
"<category>Fonts</category>\n"
"</categories>\n"
"<project_license>GPL-2.0+</project_license>\n"
- "<url type=\"homepage\">http://people.freedesktop.org/</url>\n"
+ "<url type=\"homepage\">http://fedorahosted.org/liberation-fonts/</url>\n"
"<screenshots>\n"
"<screenshot type=\"default\">\n"
"<caption>Liberation Serif – Regular</caption>\n"
diff --git a/libappstream-builder/asb-task.c b/libappstream-builder/asb-task.c
index 8c98362..57bd192 100644
--- a/libappstream-builder/asb-task.c
+++ b/libappstream-builder/asb-task.c
@@ -362,7 +362,8 @@ asb_task_process (AsbTask *task, GError **error_not_used)
ASB_PACKAGE_ENSURE_URL,
error_not_used))
return FALSE;
- if (asb_package_get_url (priv->pkg) != NULL) {
+ if (asb_package_get_url (priv->pkg) != NULL &&
+ as_app_get_url_item (AS_APP (app), AS_URL_KIND_HOMEPAGE) == NULL) {
as_app_add_url (AS_APP (app),
AS_URL_KIND_HOMEPAGE,
asb_package_get_url (priv->pkg));