summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Conder <jonno.conder@gmail.com>2011-10-29 15:59:15 +1300
committerJonathan Conder <jonno.conder@gmail.com>2013-04-18 00:36:50 +1200
commit6c5d408a8d581c0a2200bd24f65d93197d1e9529 (patch)
tree8246aa9486f7a35d03bd23597cbe6d079dec7cf8
parent9b8202480be0b98fc9eeb7f70327779125cff26f (diff)
alpm: report new informational updates to frontend
-rw-r--r--backends/alpm/pk-backend-transaction.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/backends/alpm/pk-backend-transaction.c b/backends/alpm/pk-backend-transaction.c
index 3ededda77..d3a68f366 100644
--- a/backends/alpm/pk-backend-transaction.c
+++ b/backends/alpm/pk-backend-transaction.c
@@ -213,7 +213,8 @@ pk_backend_transaction_progress_cb (alpm_progress_t type, const gchar *target,
/* TODO: revert when fixed upstream */
if (type == ALPM_PROGRESS_CONFLICTS_START ||
type == ALPM_PROGRESS_DISKSPACE_START ||
- type == ALPM_PROGRESS_INTEGRITY_START) {
+ type == ALPM_PROGRESS_INTEGRITY_START ||
+ type == ALPM_PROGRESS_LOAD_START) {
if (current < targets) {
overall = percent + current++ * 100;
}
@@ -236,6 +237,7 @@ pk_backend_transaction_progress_cb (alpm_progress_t type, const gchar *target,
case ALPM_PROGRESS_CONFLICTS_START:
case ALPM_PROGRESS_DISKSPACE_START:
case ALPM_PROGRESS_INTEGRITY_START:
+ case ALPM_PROGRESS_LOAD_START:
if (percent == recent) {
break;
}
@@ -533,6 +535,14 @@ pk_backend_transaction_upgrade_done (PkBackend *self, alpm_pkg_t *pkg,
}
static void
+pk_backend_transaction_setup (PkBackend *self)
+{
+ g_return_if_fail (self != NULL);
+
+ pk_backend_set_status (self, PK_STATUS_ENUM_SETUP);
+}
+
+static void
pk_backend_transaction_event_cb (alpm_event_t event, gpointer data,
gpointer old)
{
@@ -579,6 +589,10 @@ pk_backend_transaction_event_cb (alpm_event_t event, gpointer data,
old);
break;
+ case ALPM_EVENT_LOAD_START:
+ pk_backend_transaction_setup (backend);
+ break;
+
case ALPM_EVENT_SCRIPTLET_INFO:
pk_backend_output (backend, data);
break;