Richard Hughes | 17 Sep 2007 23:58

packagekit: Branch 'master' - 5 commits

 backends/box/pk-backend-box.c           |    9 +---
 backends/dummy/pk-backend-dummy.c       |    6 +-
 backends/test/pk-backend-test-fail.c    |    6 +-
 backends/test/pk-backend-test-succeed.c |   22 ++++++++-
 backends/yum/pk-backend-yum.c           |    6 +-
 libpackagekit/pk-task-client.c          |    8 +--
 libpackagekit/pk-task-client.h          |    2 
 libpackagekit/pk-task-monitor.c         |   38 +++++++++++++++--
 libpackagekit/pk-task-monitor.h         |    1 
 src/Makefile.am                         |    7 +++
 src/pk-backend-internal.h               |    8 +--
 src/pk-backend.c                        |   46 ++++++++++----------
 src/pk-engine.c                         |   71 +++++++++++++++++++++++++-------
 src/pk-engine.h                         |    9 ++--
 src/pk-interface.xml                    |   18 ++++++--
 src/pk-job-list.c                       |   61 ++++++++++++++++++++++-----
 src/pk-job-list.h                       |    1 
 src/pk-marshal.list                     |    1 
 src/pk-self-test.c                      |    2 
 src/pk-transaction-db.c                 |   69 ++++++++++++++++++++++---------
 20 files changed, 285 insertions(+), 106 deletions(-)

New commits:
diff-tree 4294e329cc299de63c2bcbcc34393b86e533543b (from 59faa6aeffc6f499f1312f937d7fff6b42304ad1)
Author: Richard Hughes <richard@...>
Date:   Mon Sep 17 22:20:08 2007 +0100

    Add GetOldTransactions API for the transaction viewer

diff --git a/src/pk-engine.c b/src/pk-engine.c
(Continue reading)

Richard Hughes | 18 Sep 2007 00:12

packagekit: Branch 'master'

 src/pk-transaction-db.c |    6 ------
 1 file changed, 6 deletions(-)

New commits:
diff-tree 487bc629e85b556d3dbd74f6f2a48a5c773197d1 (from 4294e329cc299de63c2bcbcc34393b86e533543b)
Author: Richard Hughes <richard@...>
Date:   Mon Sep 17 23:12:21 2007 +0100

    don't show the database at startup

diff --git a/src/pk-transaction-db.c b/src/pk-transaction-db.c
index 569bcd0..11002fd 100644
--- a/src/pk-transaction-db.c
+++ b/src/pk-transaction-db.c
 <at>  <at>  -316,12 +316,6  <at>  <at>  pk_transaction_db_init (PkTransactionDb 
 	/* add extra tables */
 	statement = "ALTER table transactions ADD timespec TEXT;";
 	sqlite3_exec (tdb->priv->db, statement, NULL, 0, NULL);
-
-	/* ick */
-	pk_transaction_db_print (tdb);
-
-	statement = "SELECT time date FROM transactions WHERE transaction_id = \"13;acaef\"";
-	pk_transaction_db_sql_statement (tdb, statement);
 }

 /**
_______________________________________________
PackageKit mailing list
PackageKit@...
(Continue reading)

Richard Hughes | 18 Sep 2007 22:27

packagekit: Branch 'master' - 13 commits

 TODO                                     |   12 +-
 backends/conary/helpers/conaryBackend.py |   25 ++--
 client/pk-console.c                      |   21 +++
 docs/introduction.xml                    |   36 ++++++
 libpackagekit/pk-enum.c                  |   11 +-
 libpackagekit/pk-enum.h                  |   11 +-
 libpackagekit/pk-task-client.c           |   51 +++++++++
 libpackagekit/pk-task-client.h           |    4 
 libpackagekit/pk-task-monitor.c          |   37 ++++++
 src/Makefile.am                          |    8 -
 src/pk-backend-internal.h                |    8 -
 src/pk-backend.c                         |  156 +++++++++++++++++++---------
 src/pk-engine.c                          |  153 ++++++++++++++--------------
 src/pk-job-list.h                        |   79 --------------
 src/pk-self-test.c                       |    4 
 src/pk-transaction-list.c                |  168 +++++++++++++++----------------
 src/pk-transaction-list.h                |   79 ++++++++++++++
 17 files changed, 548 insertions(+), 315 deletions(-)

New commits:
diff-tree 618521ce3a600fadf4a3a1bc59e7d77461da1807 (from 040e8b4fafbfadd96f34c252318f09cd0b8ca381)
Author: Richard Hughes <richard-DRAXeJJ+PL1BDgjK7y7TUQ <at> public.gmane.org>
Date:   Tue Sep 18 19:36:45 2007 +0100

    be more specific about roles so we can defer scheduling them until later

diff --git a/libpackagekit/pk-enum.c b/libpackagekit/pk-enum.c
index 1f99367..58bdf20 100644
--- a/libpackagekit/pk-enum.c
+++ b/libpackagekit/pk-enum.c
(Continue reading)

Richard Hughes | 19 Sep 2007 01:16
Picon

Queuing of transactions

I've just completed a big entry off the TODO: queuing transactions that
can't be done in parallel. This means you can do RefreshCache and then
GetUpdates straight away, and the latter will wait (async of course) for
the first to finish. Before we just failed the second transaction which
wasn't very nice. Also, when it's sane to do so, we run all queries
(that don't touch caches) in parallel with other tasks.

The code is lightly tested, but seems to work okay for me. This was a
bit of code that I had put off writing for a few weeks as it was always
going to be tricky to do right.

There's also code in the daemon now to log transactions to the database
that have potentially changed things. This is the first chunk of code
needed for the rollback support for some backends, and also allows us to
find out "what was updated yesterday because now java doesn't work".

So basically what I'm trying to say is that there is lots of new code in
git today, so expect it to break horribly. Please yell on the list if
you find anything odd.

See http://people.freedesktop.org/~hughsient/temp/pk-waiting.png for
coolness.

Thanks.

Richard.

_______________________________________________
PackageKit mailing list
PackageKit@...
(Continue reading)

Richard Hughes | 19 Sep 2007 01:15

packagekit: Branch 'master' - 8 commits

 TODO                                    |   12 -
 backends/alpm/pk-backend-alpm.c         |    8 
 backends/apt/pk-backend-apt.cpp         |    8 
 backends/box/pk-backend-box.c           |   10 
 backends/conary/pk-backend-conary.c     |    2 
 backends/dummy/pk-backend-dummy.c       |    8 
 backends/test/pk-backend-test-fail.c    |    2 
 backends/test/pk-backend-test-nop.c     |    2 
 backends/test/pk-backend-test-spawn.c   |    2 
 backends/test/pk-backend-test-succeed.c |    2 
 backends/test/pk-backend-test-thread.c  |    2 
 backends/yum/pk-backend-yum.c           |    2 
 libpackagekit/pk-enum.h                 |    2 
 libpackagekit/pk-job-list.c             |   87 +++-----
 libpackagekit/pk-job-list.h             |    2 
 libpackagekit/pk-task-client.c          |   60 ++---
 libpackagekit/pk-task-list.c            |   52 ++--
 libpackagekit/pk-task-list.h            |    2 
 libpackagekit/pk-task-monitor.c         |  140 ++++++-------
 libpackagekit/pk-task-monitor.h         |    8 
 src/Makefile.am                         |    4 
 src/pk-backend.c                        |   21 +
 src/pk-backend.h                        |    8 
 src/pk-engine.c                         |  239 +++++++++++-----------
 src/pk-engine.h                         |   38 +--
 src/pk-interface.xml                    |   66 +++---
 src/pk-marshal.list                     |   19 -
 src/pk-transaction-id.c                 |  165 +++++++++++++++
 src/pk-transaction-id.h                 |   34 +++
 src/pk-transaction-list.c               |  340 ++++++++++++++++----------------
(Continue reading)

Richard Hughes | 19 Sep 2007 01:30

packagekit: Branch 'master'

 TODO             |    1 +
 src/pk-backend.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
diff-tree 50d5fa4174f209fcd4b1d161471e68e468dde97a (from 1f0430f4f065f21d3f1674932c5a3b8aa0f6130c)
Author: Richard Hughes <richard@...>
Date:   Wed Sep 19 00:30:22 2007 +0100

    don't wait 500ms for race double prevention, use 50ms. 500ms is quite a long time when clicking on stuff in
the GUI

diff --git a/TODO b/TODO
index 59dbeb6..c2d141f 100644
--- a/TODO
+++ b/TODO
 <at>  <at>  -3,6 +3,7  <at>  <at>  Order of no particular importance:
 *** API Changes ***
 s/GetJobList/GetActiveTransactions
 s/JobListChanged/ActiveTransactionsChanged
+s/PkTask/PkBackend (and local variables)

 *** Have to have an UpdatesChanged signal ***
 For the icon to update after we've done a system upgrade
diff --git a/src/pk-backend.c b/src/pk-backend.c
index b4c81e7..15ed11d 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
 <at>  <at>  -817,7 +817,7  <at>  <at>  pk_backend_finished (PkBackend *backend)
 	/* we have to run this idle as the command may finish before the job
(Continue reading)

Richard Hughes | 20 Sep 2007 00:36

packagekit: Branch 'master' - 4 commits

 TODO                      |   15 -
 src/pk-backend-internal.h |    2 
 src/pk-engine.c           |  394 +++++++++++++++++++++++-----------------------
 src/pk-transaction-list.c |   56 +++---
 src/pk-transaction-list.h |   16 -
 5 files changed, 239 insertions(+), 244 deletions(-)

New commits:
diff-tree 5fab68022a89ef9e0d477e30ce11df01edc867d1 (from 8955d94956e050cd3d380544eb49368b2a716d09)
Author: Richard Hughes <richard@...>
Date:   Wed Sep 19 23:28:50 2007 +0100

    update TODO

diff --git a/TODO b/TODO
index 8dd918f..9195f28 100644
--- a/TODO
+++ b/TODO
 <at>  <at>  -1,12 +1,9  <at>  <at> 
 Order of no particular importance:

 *** API Changes ***
-s/GetJobList/GetActiveTransactions
-s/JobListChanged/ActiveTransactionsChanged
-s/PkTask/PkBackend (and local variables)
-
-*** Put the pk-application taskbar in the status section ***
-It looks wrong where it is...
+s/GetJobList/GetTransactions
+s/JobListChanged/TransactionListChanged
(Continue reading)

Andreas | 20 Sep 2007 21:01
Picon
Favicon

backend initialized multiple times when using pk-application

Hi
When using pk-application, the backend initializer function gets called
more then once before the destroy function is called. That's a bug I
guess. It makes the alpm backend crash because it has to initialize some
stuff which must be guaranteed to only be initialized once at a time (of
course you could work arround this).
I can't see the problem in pk-application. Can you have a look at it?
Shouldn't even pakagekitd itself make sure when and how often this
function is called?

Regards,
	Andreas

_______________________________________________
PackageKit mailing list
PackageKit@...
http://lists.freedesktop.org/mailman/listinfo/packagekit

Richard Hughes | 20 Sep 2007 20:03
Picon

Re: backend initialized multiple times when using pk-application

On Thu, 2007-09-20 at 21:01 +0200, Andreas wrote:
> When using pk-application, the backend initializer function gets called
> more then once before the destroy function is called. That's a bug I
> guess. It makes the alpm backend crash because it has to initialize some
> stuff which must be guaranteed to only be initialized once at a time (of
> course you could work arround this).

Well, it might get called:
initialize
destroy
initialize
destroy

But it can't be called:

initialize
initialize
destroy

Unless you're threading... which you might be. Do you only hit this when
you do two simultaneous queries? If that's the case you'll get:

initialize(1)
initialize(2)
destroy(1)
destroy(2)

> I can't see the problem in pk-application. Can you have a look at it?
> Shouldn't even pakagekitd itself make sure when and how often this
> function is called?
(Continue reading)

Andreas | 20 Sep 2007 21:46
Picon
Favicon

Re: backend initialized multiple times when using pk-application

Actually it's getting called twice even if you just start
pk-application. pk-application then segfaults in
pk_task_monitor_error_code_cb because alpm fails to lock the db twice.
If I just ignore the error and exit with pk_backend_finished (backend)
(where backend is the PkBackend * parameter passed to my implementation
of backend_initialize) I get

(packagekitd:27562): GLib-GObject-WARNING **: invalid unclassed pointer
in cast to `PkBackend'
[pk_backend_finished_delay] pk-backend.c:791 (21:41:12):         emit
finished 1

(packagekitd:27562): GLib-GObject-WARNING **: instance with invalid
(NULL) class pointer

and the job is still handled as 'in progress'.
backend can't be null as I check with g_return_if_fail at the beginning.
I'll continue research tomorrow.

_______________________________________________
PackageKit mailing list
PackageKit@...
http://lists.freedesktop.org/mailman/listinfo/packagekit


Gmane