From 9f1800ad48bff17fbebcc85760c327d78ecc9ee4 Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Wed, 15 Aug 2012 16:33:19 +0800 Subject: [PATCH] Ignore "accept-eula" in pk-transaction-run The "accept-eula" transaction could be proceeded by pk-transaction-run accidentally. This commit ignores that kind of transaction to avoid the potential crash. https://bugs.freedesktop.org/show_bug.cgi?id=53532 --- src/pk-transaction.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/pk-transaction.c b/src/pk-transaction.c index dd009e8..347d72e 100644 --- a/src/pk-transaction.c +++ b/src/pk-transaction.c @@ -2246,6 +2246,10 @@ pk_transaction_run (PkTransaction *transaction) g_return_val_if_fail (PK_IS_TRANSACTION (transaction), FALSE); g_return_val_if_fail (priv->tid != NULL, FALSE); + /* Ignore "accept-eula" */ + if (priv->role == PK_ROLE_ENUM_ACCEPT_EULA) + return TRUE; + /* prepare for use; the transaction list ensures this is safe */ pk_backend_reset (priv->backend); -- 1.7.7