Skip to content

Show a warning if using the Flatpak on Ubuntu#1685

Open
AlexanderVanhee wants to merge 2 commits into
bazaar-org:mainfrom
AlexanderVanhee:ubuntu-check
Open

Show a warning if using the Flatpak on Ubuntu#1685
AlexanderVanhee wants to merge 2 commits into
bazaar-org:mainfrom
AlexanderVanhee:ubuntu-check

Conversation

@AlexanderVanhee

@AlexanderVanhee AlexanderVanhee commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

I made sure to only check it the first time, so users who manually fixed it can still use the app without constant warnings. This also makes it so the check isn't ran every time on all distros, saving a precious 20ms.

I made sure to only check the first time, so users that manually fixed it can still use the app. And that it hasn't need to add like 20ms to every boot.
@AlexanderVanhee AlexanderVanhee requested a review from kolunmi as a code owner June 30, 2026 16:31
@AlexanderVanhee AlexanderVanhee marked this pull request as draft June 30, 2026 16:49
@AlexanderVanhee AlexanderVanhee marked this pull request as ready for review June 30, 2026 16:58
@AlexanderVanhee AlexanderVanhee added the enhancement New feature or request label Jun 30, 2026
@kolunmi

kolunmi commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

awesome, but could you use the libdex subprocess spawning function since you are in a fiber? example:

bazaar/src/bz-hooks.c

Lines 408 to 433 in bd1a49c

result = dex_await (
dex_subprocess_wait_check (subprocess),
&local_error);
if (!result)
{
g_warning ("Hook failed to exit cleanly, abandoning it now: %s", local_error->message);
return dex_future_new_for_int (BZ_HOOK_RETURN_STATUS_CONTINUE);
}
stdout_pipe = g_subprocess_get_stdout_pipe (subprocess);
stdout_bytes = g_input_stream_read_bytes (stdout_pipe, 1024, NULL, &local_error);
if (!stdout_bytes)
{
g_warning ("Failed to read stdout pipe of hook, abandoning it now: %s", local_error->message);
return dex_future_new_for_int (BZ_HOOK_RETURN_STATUS_CONTINUE);
}
stdout_data = g_bytes_get_data (stdout_bytes, &stdout_size);
stdout_str = g_malloc (stdout_size + 1);
memcpy (stdout_str, stdout_data, stdout_size);
stdout_str[stdout_size] = '\0';
stdout_newline = strchr (stdout_str, '\n');
if (stdout_newline != NULL)
*stdout_newline = '\0';

@renner0e

renner0e commented Jul 1, 2026

Copy link
Copy Markdown
Member

CC: #583

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants