Compare commits
No commits in common. 'c9' and 'i10c-beta' have entirely different histories.
@ -1 +1 @@
|
|||||||
4516c8954e4daf46a3e7e1003e8105d549884d2f SOURCES/PackageKit-1.2.4.tar.xz
|
4b2ccadd8fe5acac100ab8c6ab715af6ebb92b79 SOURCES/PackageKit-1.2.8.tar.xz
|
||||||
|
@ -1 +1 @@
|
|||||||
SOURCES/PackageKit-1.2.4.tar.xz
|
SOURCES/PackageKit-1.2.8.tar.xz
|
||||||
|
@ -0,0 +1,35 @@
|
|||||||
|
From d8f84f7e0a017e0b4df1e08a2a6be832c9fb3611 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matthias Klumpp <matthias@tenstral.net>
|
||||||
|
Date: Tue, 21 May 2024 02:33:55 +0200
|
||||||
|
Subject: [PATCH] metainfo: Mark PK as compulsory for most desktops
|
||||||
|
|
||||||
|
Ideally, AppStream needs a way to just mark a component as critical for
|
||||||
|
the system to function and prevent its removal. But this is okay as a
|
||||||
|
temporary fix.
|
||||||
|
|
||||||
|
Resolves: #759
|
||||||
|
---
|
||||||
|
data/org.freedesktop.packagekit.metainfo.xml | 10 ++++++++++
|
||||||
|
1 file changed, 10 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/data/org.freedesktop.packagekit.metainfo.xml b/data/org.freedesktop.packagekit.metainfo.xml
|
||||||
|
index 13b7a316d..ce47582a8 100644
|
||||||
|
--- a/data/org.freedesktop.packagekit.metainfo.xml
|
||||||
|
+++ b/data/org.freedesktop.packagekit.metainfo.xml
|
||||||
|
@@ -27,6 +27,16 @@
|
||||||
|
<url type="homepage">https://www.freedesktop.org/software/PackageKit</url>
|
||||||
|
|
||||||
|
<launchable type="service">packagekit.service</launchable>
|
||||||
|
+
|
||||||
|
+ <compulsory_for_desktop>Cinnamon</compulsory_for_desktop>
|
||||||
|
+ <compulsory_for_desktop>GNOME</compulsory_for_desktop>
|
||||||
|
+ <compulsory_for_desktop>KDE</compulsory_for_desktop>
|
||||||
|
+ <compulsory_for_desktop>LXQt</compulsory_for_desktop>
|
||||||
|
+ <compulsory_for_desktop>MATE</compulsory_for_desktop>
|
||||||
|
+ <compulsory_for_desktop>Pantheon</compulsory_for_desktop>
|
||||||
|
+ <compulsory_for_desktop>Unity</compulsory_for_desktop>
|
||||||
|
+ <compulsory_for_desktop>XFCE</compulsory_for_desktop>
|
||||||
|
+
|
||||||
|
<categories>
|
||||||
|
<category>System</category>
|
||||||
|
</categories>
|
@ -0,0 +1,32 @@
|
|||||||
|
From 8914e11968a934faa651311fd98a98a3a19218ae Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Catanzaro <mcatanzaro@gnome.org>
|
||||||
|
Date: Wed, 3 Jun 2020 10:45:12 -0500
|
||||||
|
Subject: [PATCH] Allow admin users to remove packages without password prompt
|
||||||
|
|
||||||
|
A local, active admin user can install packages without a password
|
||||||
|
prompt, but has to enter the admin password to remove packages. This
|
||||||
|
doesn't make much sense. It should be parallel.
|
||||||
|
|
||||||
|
Note that this change has no effect on what users are able to do,
|
||||||
|
because it only applies to admin users. The password only protects
|
||||||
|
against unlocked workstation attackers, where an attacker gains physical
|
||||||
|
access to an unlocked desktop. It's pretty weird to prevent such an
|
||||||
|
attacker from removing software, but allow installing new stuff.
|
||||||
|
|
||||||
|
https://pagure.io/fedora-workstation/issue/233
|
||||||
|
---
|
||||||
|
policy/org.freedesktop.packagekit.rules | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/policy/org.freedesktop.packagekit.rules b/policy/org.freedesktop.packagekit.rules
|
||||||
|
index 6a1c8a701..95d21925f 100644
|
||||||
|
--- a/policy/org.freedesktop.packagekit.rules
|
||||||
|
+++ b/policy/org.freedesktop.packagekit.rules
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
- if (action.id == "org.freedesktop.packagekit.package-install" &&
|
||||||
|
+ if ((action.id == "org.freedesktop.packagekit.package-install" ||
|
||||||
|
+ action.id == "org.freedesktop.packagekit.package-remove") &&
|
||||||
|
subject.active == true && subject.local == true &&
|
||||||
|
subject.isInGroup("wheel")) {
|
||||||
|
return polkit.Result.YES;
|
@ -0,0 +1,460 @@
|
|||||||
|
From 671ef87143c0a68e5f11cfbd0c305caaebecc204 Mon Sep 17 00:00:00 2001
|
||||||
|
From: sid <sidtosh4@gmail.com>
|
||||||
|
Date: Fri, 10 May 2024 21:46:54 +0100
|
||||||
|
Subject: [PATCH] pkcon: Use appropriate callbacks for client / task async
|
||||||
|
calls
|
||||||
|
|
||||||
|
Fixes: #747
|
||||||
|
---
|
||||||
|
client/pk-console.c | 112 ++++++++++++++++++++++++++------------------
|
||||||
|
1 file changed, 66 insertions(+), 46 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/client/pk-console.c b/client/pk-console.c
|
||||||
|
index 056e37e65..ad42c3b49 100644
|
||||||
|
--- a/client/pk-console.c
|
||||||
|
+++ b/client/pk-console.c
|
||||||
|
@@ -637,7 +637,7 @@ pk_console_progress_cb (PkProgress *progress, PkProgressType type, gpointer data
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
-pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
|
||||||
|
+pk_console_process_results (PkResults *results, PkConsoleCtx *ctx, const GError *finish_error)
|
||||||
|
{
|
||||||
|
const gchar *filename;
|
||||||
|
gboolean ret;
|
||||||
|
@@ -645,11 +645,8 @@ pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
|
||||||
|
PkPackageSack *sack;
|
||||||
|
PkRestartEnum restart;
|
||||||
|
PkRoleEnum role;
|
||||||
|
- PkConsoleCtx *ctx = (PkConsoleCtx *) data;
|
||||||
|
- g_autoptr(GError) error = NULL;
|
||||||
|
g_autoptr(GFile) file = NULL;
|
||||||
|
g_autoptr(PkError) error_code = NULL;
|
||||||
|
- g_autoptr(PkResults) results = NULL;
|
||||||
|
|
||||||
|
/* no more progress */
|
||||||
|
if (ctx->is_console) {
|
||||||
|
@@ -659,13 +656,11 @@ pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
|
||||||
|
g_print ("%s\n", _("Results:"));
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* get the results */
|
||||||
|
- results = pk_task_generic_finish (PK_TASK (ctx->task), res, &error);
|
||||||
|
if (results == NULL) {
|
||||||
|
/* TRANSLATORS: we failed to get any results, which is pretty
|
||||||
|
* fatal in my book */
|
||||||
|
- g_print ("%s: %s\n", _("Fatal error"), error->message);
|
||||||
|
- switch (error->code - 0xff) {
|
||||||
|
+ g_print ("%s: %s\n", _("Fatal error"), finish_error->message);
|
||||||
|
+ switch (finish_error->code - 0xff) {
|
||||||
|
case PK_ERROR_ENUM_ALL_PACKAGES_ALREADY_INSTALLED:
|
||||||
|
case PK_ERROR_ENUM_REPO_NOT_AVAILABLE:
|
||||||
|
ctx->retval = PK_EXIT_CODE_NOTHING_USEFUL;
|
||||||
|
@@ -821,6 +816,7 @@ pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
|
||||||
|
|
||||||
|
/* write the sack to disk */
|
||||||
|
if (role == PK_ROLE_ENUM_GET_PACKAGES && filename != NULL) {
|
||||||
|
+ g_autoptr(GError) error = NULL;
|
||||||
|
file = g_file_new_for_path (filename);
|
||||||
|
ret = pk_package_sack_to_file (sack, file, &error);
|
||||||
|
if (!ret) {
|
||||||
|
@@ -833,6 +829,30 @@ pk_console_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
|
||||||
|
g_main_loop_quit (ctx->loop);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void
|
||||||
|
+pk_console_client_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
|
||||||
|
+{
|
||||||
|
+ g_autoptr(GError) error = NULL;
|
||||||
|
+ g_autoptr(PkResults) results = NULL;
|
||||||
|
+ PkConsoleCtx *ctx = (PkConsoleCtx *) data;
|
||||||
|
+
|
||||||
|
+ results = pk_client_generic_finish (PK_CLIENT (ctx->task), res, &error);
|
||||||
|
+
|
||||||
|
+ pk_console_process_results (results, ctx, error);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+pk_console_task_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
|
||||||
|
+{
|
||||||
|
+ g_autoptr(GError) error = NULL;
|
||||||
|
+ g_autoptr(PkResults) results = NULL;
|
||||||
|
+ PkConsoleCtx *ctx = (PkConsoleCtx *) data;
|
||||||
|
+
|
||||||
|
+ results = pk_task_generic_finish (PK_TASK (ctx->task), res, &error);
|
||||||
|
+
|
||||||
|
+ pk_console_process_results (results, ctx, error);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static gchar *
|
||||||
|
pk_console_resolve_package (PkConsoleCtx *ctx, const gchar *package_name, GError **error)
|
||||||
|
{
|
||||||
|
@@ -1057,7 +1077,7 @@ pk_console_install_packages (PkConsoleCtx *ctx, gchar **packages, GError **error
|
||||||
|
pk_task_install_packages_async (PK_TASK (ctx->task),
|
||||||
|
package_ids, ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1086,7 +1106,7 @@ pk_console_remove_packages (PkConsoleCtx *ctx, gchar **packages, gboolean autore
|
||||||
|
TRUE, autoremove,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1115,7 +1135,7 @@ pk_console_download_packages (PkConsoleCtx *ctx, gchar **packages, const gchar *
|
||||||
|
directory,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1145,7 +1165,7 @@ pk_console_update_packages (PkConsoleCtx *ctx, gchar **packages, GError **error)
|
||||||
|
package_ids,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1188,7 +1208,7 @@ pk_console_update_system (PkConsoleCtx *ctx, GError **error)
|
||||||
|
package_ids,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1200,7 +1220,7 @@ pk_console_upgrade_system (PkConsoleCtx *ctx, const gchar *distro_id, const gcha
|
||||||
|
pk_upgrade_kind_enum_from_string (upgrade_kind),
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1230,7 +1250,7 @@ pk_console_required_by (PkConsoleCtx *ctx, gchar **packages, GError **error)
|
||||||
|
TRUE,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1259,7 +1279,7 @@ pk_console_depends_on (PkConsoleCtx *ctx, gchar **packages, GError **error)
|
||||||
|
FALSE,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1275,7 +1295,7 @@ pk_console_get_details (PkConsoleCtx *ctx, gchar **packages, GError **error)
|
||||||
|
packages,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_client_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1296,7 +1316,7 @@ pk_console_get_details (PkConsoleCtx *ctx, gchar **packages, GError **error)
|
||||||
|
package_ids,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1307,7 +1327,7 @@ pk_console_get_details_local (PkConsoleCtx *ctx, gchar **files, GError **error)
|
||||||
|
files,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_client_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1318,7 +1338,7 @@ pk_console_get_files_local (PkConsoleCtx *ctx, gchar **files, GError **error)
|
||||||
|
files,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_client_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1334,7 +1354,7 @@ pk_console_get_files (PkConsoleCtx *ctx, gchar **packages, GError **error)
|
||||||
|
packages,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_client_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1355,7 +1375,7 @@ pk_console_get_files (PkConsoleCtx *ctx, gchar **packages, GError **error)
|
||||||
|
package_ids,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1383,7 +1403,7 @@ pk_console_get_update_detail (PkConsoleCtx *ctx, gchar **packages, GError **erro
|
||||||
|
package_ids,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1830,7 +1850,7 @@ main (int argc, char *argv[])
|
||||||
|
argv + 3,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (value, "details") == 0) {
|
||||||
|
if (details == NULL) {
|
||||||
|
@@ -1847,7 +1867,7 @@ main (int argc, char *argv[])
|
||||||
|
argv + 3,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (value, "group") == 0) {
|
||||||
|
if (details == NULL) {
|
||||||
|
@@ -1864,7 +1884,7 @@ main (int argc, char *argv[])
|
||||||
|
argv + 3,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (value, "file") == 0) {
|
||||||
|
if (details == NULL) {
|
||||||
|
@@ -1881,7 +1901,7 @@ main (int argc, char *argv[])
|
||||||
|
argv + 3,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
} else {
|
||||||
|
/* fallback to a generic search */
|
||||||
|
pk_task_search_details_async (PK_TASK (ctx->task),
|
||||||
|
@@ -1889,7 +1909,7 @@ main (int argc, char *argv[])
|
||||||
|
argv + 2,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "install") == 0) {
|
||||||
|
@@ -1920,7 +1940,7 @@ main (int argc, char *argv[])
|
||||||
|
argv + 2,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "install-sig") == 0) {
|
||||||
|
if (value == NULL || details == NULL || parameter == NULL) {
|
||||||
|
@@ -1938,7 +1958,7 @@ main (int argc, char *argv[])
|
||||||
|
parameter,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_client_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "remove") == 0) {
|
||||||
|
if (value == NULL) {
|
||||||
|
@@ -1992,7 +2012,7 @@ main (int argc, char *argv[])
|
||||||
|
value,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_client_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "update") == 0) {
|
||||||
|
if (value == NULL) {
|
||||||
|
@@ -2019,7 +2039,7 @@ main (int argc, char *argv[])
|
||||||
|
argv + 2,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "repo-enable") == 0) {
|
||||||
|
if (value == NULL) {
|
||||||
|
@@ -2036,7 +2056,7 @@ main (int argc, char *argv[])
|
||||||
|
TRUE,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "repo-disable") == 0) {
|
||||||
|
if (value == NULL) {
|
||||||
|
@@ -2053,7 +2073,7 @@ main (int argc, char *argv[])
|
||||||
|
FALSE,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "repo-set-data") == 0) {
|
||||||
|
if (value == NULL || details == NULL || parameter == NULL) {
|
||||||
|
@@ -2070,7 +2090,7 @@ main (int argc, char *argv[])
|
||||||
|
parameter,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_client_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "repo-remove") == 0) {
|
||||||
|
if (value == NULL || details == NULL) {
|
||||||
|
@@ -2088,14 +2108,14 @@ main (int argc, char *argv[])
|
||||||
|
atoi (details),
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_client_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "repo-list") == 0) {
|
||||||
|
pk_task_get_repo_list_async (PK_TASK (ctx->task),
|
||||||
|
ctx->filters,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "get-time") == 0) {
|
||||||
|
PkRoleEnum role;
|
||||||
|
@@ -2144,7 +2164,7 @@ main (int argc, char *argv[])
|
||||||
|
pk_client_get_distro_upgrades_async (PK_CLIENT (ctx->task),
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_client_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "get-update-detail") == 0) {
|
||||||
|
if (value == NULL) {
|
||||||
|
@@ -2186,7 +2206,7 @@ main (int argc, char *argv[])
|
||||||
|
argv + 2,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "get-details") == 0) {
|
||||||
|
if (value == NULL) {
|
||||||
|
@@ -2237,20 +2257,20 @@ main (int argc, char *argv[])
|
||||||
|
ctx->filters,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "get-categories") == 0) {
|
||||||
|
pk_task_get_categories_async (PK_TASK (ctx->task),
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "get-packages") == 0) {
|
||||||
|
pk_task_get_packages_async (PK_TASK (ctx->task),
|
||||||
|
ctx->filters,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "upgrade-system") == 0) {
|
||||||
|
/* do the system upgrade */
|
||||||
|
@@ -2341,7 +2361,7 @@ main (int argc, char *argv[])
|
||||||
|
10,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_client_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "refresh") == 0) {
|
||||||
|
gboolean force = (value != NULL && g_strcmp0 (value, "force") == 0);
|
||||||
|
@@ -2349,12 +2369,12 @@ main (int argc, char *argv[])
|
||||||
|
force,
|
||||||
|
ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "repair") == 0) {
|
||||||
|
pk_task_repair_system_async (PK_TASK (ctx->task), ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
|
||||||
|
} else if (strcmp (mode, "list-create") == 0) {
|
||||||
|
if (value == NULL) {
|
||||||
|
@@ -2386,7 +2406,7 @@ main (int argc, char *argv[])
|
||||||
|
g_free);
|
||||||
|
pk_task_get_packages_async (PK_TASK (ctx->task), ctx->filters, ctx->cancellable,
|
||||||
|
pk_console_progress_cb, ctx,
|
||||||
|
- pk_console_finished_cb, ctx);
|
||||||
|
+ pk_console_task_finished_cb, ctx);
|
||||||
|
} else {
|
||||||
|
error = g_error_new (PK_CONSOLE_ERROR,
|
||||||
|
PK_ERROR_ENUM_INTERNAL_ERROR,
|
||||||
|
From cbb5a6d5ca849e4dca5a68b13ee655146996f002 Mon Sep 17 00:00:00 2001
|
||||||
|
Date: Mon, 22 Jul 2024 12:20:16 +0200
|
||||||
|
Subject: [PATCH] pk-client: Fix runtime warning when backend does not support
|
||||||
|
role
|
||||||
|
|
||||||
|
The daemon returns "op not supported by the backend" as part of the method
|
||||||
|
call response, but this response can be received after the "Destroy" signal,
|
||||||
|
which causes infinite wait for the transaction end and runtime warnings
|
||||||
|
about NULL error being passed to the g_task_return_error() on the client side.
|
||||||
|
|
||||||
|
This is a regression from commit https://github.com/PackageKit/PackageKit/commit/44215db95d9cfda23045d9a9b97175519f473eb2
|
||||||
|
---
|
||||||
|
lib/packagekit-glib2/pk-client.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c
|
||||||
|
index 735c718cb..3cbb0d859 100644
|
||||||
|
--- a/lib/packagekit-glib2/pk-client.c
|
||||||
|
+++ b/lib/packagekit-glib2/pk-client.c
|
||||||
|
@@ -1616,11 +1616,11 @@ pk_client_signal_cb (GDBusProxy *proxy,
|
||||||
|
if (g_strcmp0 (signal_name, "Destroy") == 0) {
|
||||||
|
g_autoptr(GError) local_error = NULL;
|
||||||
|
|
||||||
|
- if (state->waiting_for_finished)
|
||||||
|
+ if (state->waiting_for_finished) {
|
||||||
|
local_error = g_error_new_literal (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED,
|
||||||
|
"PackageKit transaction disappeared");
|
||||||
|
-
|
||||||
|
- pk_client_state_finish (state, g_steal_pointer (&local_error));
|
||||||
|
+ pk_client_state_finish (state, g_steal_pointer (&local_error));
|
||||||
|
+ }
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue