Accept share/metainfo exports when installing

This is a combination of these two commits from the main branch:

build-finish: Export appstream metainfo into a single directory
(cherry picked from commit 766bf5f08a)
Export to share/metainfo not share/appdata
(cherry picked from commit 3c63cac8f9)

However this commit only allows the exports when deploying an
install/update, not when building a new Flatpak, so we avoid a warning
message but arguably don't add any new features to the stable branch.

Fixes https://github.com/flatpak/flatpak/issues/4800
This commit is contained in:
Guido Günther
2021-07-19 09:19:12 +02:00
committed by Phaedrus Leeds
parent df2c099142
commit f8e400738b
2 changed files with 5 additions and 0 deletions

View File

@@ -7639,6 +7639,7 @@ flatpak_export_dir (GFile *source,
"share/dbus-1/services", "../../..",
"share/gnome-shell/search-providers", "../../..",
"share/mime/packages", "../../..",
"share/metainfo", "../..",
"bin", "..",
};
int i;

View File

@@ -733,6 +733,10 @@ flatpak_get_allowed_exports (const char *source_path,
{
g_ptr_array_add (allowed_extensions, g_strdup (".xml"));
}
else if (strcmp (source_path, "share/metainfo") == 0)
{
g_ptr_array_add (allowed_extensions, g_strdup (".xml"));
}
else
return FALSE;