flatpak-info: Move the instance specific data to a separate group

We don't want to confuse whats in the metadata file with this
runtime instance info.
tingping/wmclass
Alexander Larsson 2016-09-08 14:10:18 +02:00
parent 894df2ffb6
commit 96f383198d
2 changed files with 6 additions and 7 deletions

View File

@ -2609,15 +2609,14 @@ flatpak_run_add_app_info_args (GPtrArray *argv_array,
keyfile = g_key_file_new ();
g_key_file_set_string (keyfile, "Application", "name", app_id);
if (app_branch != NULL)
g_key_file_set_string (keyfile, "Application", "branch", app_branch);
g_key_file_set_string (keyfile, "Application", "runtime", runtime_ref);
app_path = g_file_get_path (app_files);
g_key_file_set_string (keyfile, "Application", "app-path", app_path);
g_key_file_set_string (keyfile, "Instance", "app-path", app_path);
runtime_path = g_file_get_path (runtime_files);
g_key_file_set_string (keyfile, "Application", "runtime-path", runtime_path);
g_key_file_set_string (keyfile, "Instance", "runtime-path", runtime_path);
if (app_branch != NULL)
g_key_file_set_string (keyfile, "Instance", "branch", app_branch);
flatpak_context_save_metadata (final_app_context, TRUE, keyfile);

View File

@ -418,8 +418,8 @@ validate_fd (int fd,
/* For apps we translate /app and /usr to the installed locations.
Also, we need to rewrite to drop the /newroot prefix added by
bubblewrap for other files to work. */
app_path = g_key_file_get_string (app_info, "Application", "app-path", NULL);
runtime_path = g_key_file_get_string (app_info, "Application", "runtime-path", NULL);
app_path = g_key_file_get_string (app_info, "Instance", "app-path", NULL);
runtime_path = g_key_file_get_string (app_info, "Instance", "runtime-path", NULL);
if (app_path != NULL || runtime_path != NULL)
{
if (app_path != NULL &&