Skip to content
Snippets Groups Projects
Commit 71612d65 authored by Simon McVittie's avatar Simon McVittie
Browse files

Revert "bind_runtime: Use the "goto out" pattern"


This reverts commit 0d801cd9,
which turns out to be unnecessary with a bit of restructuring.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 6be52296
Branches
Tags
No related merge requests found
......@@ -488,7 +488,6 @@ bind_runtime (FlatpakBwrap *bwrap,
gboolean any_libc_from_host = FALSE;
gboolean all_libc_from_host = TRUE;
g_autofree gchar *localedef = NULL;
gboolean ret = FALSE;
g_return_val_if_fail (tools_dir != NULL, FALSE);
g_return_val_if_fail (runtime != NULL, FALSE);
......@@ -499,7 +498,7 @@ bind_runtime (FlatpakBwrap *bwrap,
usr = g_build_filename (runtime, "usr", NULL);
if (!pv_bwrap_bind_usr (bwrap, runtime, "/", error))
goto out;
return FALSE;
flatpak_bwrap_add_args (bwrap,
"--setenv", "XDG_RUNTIME_DIR", xrd,
......@@ -629,7 +628,7 @@ bind_runtime (FlatpakBwrap *bwrap,
NULL);
if (!pv_bwrap_bind_usr (temp_bwrap, runtime, "/", error))
goto out;
return FALSE;
flatpak_bwrap_add_args (temp_bwrap,
"readlink", "-e", ld_so,
......@@ -665,7 +664,7 @@ bind_runtime (FlatpakBwrap *bwrap,
NULL);
if (!pv_bwrap_bind_usr (mount_runtime_on_scratch, runtime, scratch,
error))
goto out;
return FALSE;
temp_bwrap = flatpak_bwrap_new (NULL);
/* mount_runtime_on_scratch can't own any fds, because if it did,
......@@ -684,7 +683,7 @@ bind_runtime (FlatpakBwrap *bwrap,
flatpak_bwrap_finish (temp_bwrap);
if (!pv_bwrap_run_sync (temp_bwrap, NULL, error))
goto out;
return FALSE;
g_clear_pointer (&temp_bwrap, flatpak_bwrap_free);
......@@ -709,7 +708,7 @@ bind_runtime (FlatpakBwrap *bwrap,
NULL);
if (!pv_bwrap_bind_usr (temp_bwrap, runtime, "/", error))
goto out;
return FALSE;
flatpak_bwrap_add_args (temp_bwrap,
"readlink", "-f", ld_so,
......@@ -739,7 +738,7 @@ bind_runtime (FlatpakBwrap *bwrap,
flatpak_bwrap_finish (temp_bwrap);
if (!pv_bwrap_run_sync (temp_bwrap, NULL, error))
goto out;
return FALSE;
g_clear_pointer (&temp_bwrap, flatpak_bwrap_free);
......@@ -767,7 +766,7 @@ bind_runtime (FlatpakBwrap *bwrap,
if (!try_bind_dri (bwrap, mount_runtime_on_scratch,
overrides, scratch, tool_path, dirs[j],
libdir_on_host, error))
goto out;
return FALSE;
}
}
else
......@@ -795,7 +794,7 @@ bind_runtime (FlatpakBwrap *bwrap,
"the host system and the container (tried: %s)",
archs->str);
g_string_free (archs, TRUE);
goto out;
return FALSE;
}
if (any_libc_from_host && !all_libc_from_host)
......@@ -855,7 +854,7 @@ bind_runtime (FlatpakBwrap *bwrap,
}
if (!pv_bwrap_bind_usr (bwrap, "/", "/run/host", error))
goto out;
return FALSE;
ensure_locales (any_libc_from_host, tools_dir, bwrap, overrides);
......@@ -926,10 +925,7 @@ bind_runtime (FlatpakBwrap *bwrap,
NULL);
}
ret = TRUE;
out:
return ret;
return TRUE;
}
/* Order matters here: root, steam and steambeta are or might be symlinks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment