Commit 75a73658 authored by Christian Hergert's avatar Christian Hergert
Browse files

flatpak: work around flatpak-builder --state-dir bug

It appears that if we don't want updates, flatpak-builder will still query
the remote peer because it fails to find a local mirror directory for the
peer. However, if we specify --extra-sources, we can make it find it as
expected.

We probably need to fix builder_context_find_in_sources_dirs_va() to check
the specified --state-dir.
parent bc79e0d7
......@@ -109,12 +109,20 @@ gbp_flatpak_download_stage_query (IdeBuildStage *stage,
ide_subprocess_launcher_push_argv (launcher, "--download-only");
if (!self->force_update)
if (self->state_dir != NULL)
{
ide_subprocess_launcher_push_argv (launcher, "--disable-updates");
ide_subprocess_launcher_push_argv (launcher, "--disable-download");
/*
* We need to specify to flatpak-builder the location for the sources
* so that it doesn't try to ping the remote host. This should
* _probably_ be fixed in upstream flatpak-builder.
*/
ide_subprocess_launcher_push_argv (launcher, "--extra-sources");
ide_subprocess_launcher_push_argv (launcher, self->state_dir);
}
if (!self->force_update)
ide_subprocess_launcher_push_argv (launcher, "--disable-updates");
stop_at_option = g_strdup_printf ("--stop-at=%s", primary_module);
ide_subprocess_launcher_push_argv (launcher, stop_at_option);
......
......@@ -344,6 +344,14 @@ register_dependencies_stage (GbpFlatpakPipelineAddin *self,
{
ide_subprocess_launcher_push_argv (launcher, "--state-dir");
ide_subprocess_launcher_push_argv (launcher, self->state_dir);
/*
* We need to specify to flatpak-builder the location for the sources
* so that it doesn't try to ping the remote host. This should
* _probably_ be fixed in upstream flatpak-builder.
*/
ide_subprocess_launcher_push_argv (launcher, "--extra-sources");
ide_subprocess_launcher_push_argv (launcher, self->state_dir);
}
stop_at_option = g_strdup_printf ("--stop-at=%s", primary_module);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment