From 3296c9e61965d9e5b51fe48241fd0bc79bc9d6ef Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Tue, 14 Apr 2026 21:17:08 +0200 Subject: [PATCH] system-helper: Fix checking if the reinstall flag was passed in Fixes: 919d2922 ("common: support reinstall option on bundle installations") --- system-helper/flatpak-system-helper.c | 2 +- tests/test-bundle.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system-helper/flatpak-system-helper.c b/system-helper/flatpak-system-helper.c index 648c5262..81c08016 100644 --- a/system-helper/flatpak-system-helper.c +++ b/system-helper/flatpak-system-helper.c @@ -961,7 +961,7 @@ handle_install_bundle (FlatpakSystemHelper *object, return G_DBUS_METHOD_INVOCATION_HANDLED; } - reinstall = !!(arg_flags & FLATPAK_HELPER_INSTALL_BUNDLE_FLAGS_NO_INTERACTION); + reinstall = (arg_flags & FLATPAK_HELPER_INSTALL_BUNDLE_FLAGS_REINSTALL) != 0; if (!flatpak_dir_install_bundle (system, reinstall, bundle_file, arg_remote, &ref, NULL, &error)) { flatpak_invocation_return_error (invocation, error, "Error installing bundle"); diff --git a/tests/test-bundle.sh b/tests/test-bundle.sh index c2cd2069..73b04469 100755 --- a/tests/test-bundle.sh +++ b/tests/test-bundle.sh @@ -49,7 +49,7 @@ ${FLATPAK} uninstall ${U} -y org.test.Hello >&2 ${FLATPAK} install ${U} -y --bundle bundles/hello.flatpak >&2 # Installing again without reinstall option should fail... -! ${FLATPAK} install ${U} -y --bundle bundles/hello.flatpak >&2 +assert_fail ${FLATPAK} install ${U} -y --bundle bundles/hello.flatpak >&2 # Now with reinstall option it should pass... ${FLATPAK} install ${U} -y --bundle bundles/hello.flatpak --reinstall >&2