[PackageKit-commit] packagekit: Branch 'master' - 19 commits

Richard Hughes hughsient at kemper.freedesktop.org
Wed Jun 1 03:43:56 PDT 2011


 RELEASE                                        |   10 +-
 backends/alpm/Makefile.am                      |    4 -
 backends/alpm/pk-backend-alpm.c                |    1 
 backends/alpm/pk-backend-error.c               |   24 ------
 backends/alpm/pk-backend-error.h               |    2 
 backends/alpm/pk-backend-transaction.c         |   93 ++++++++++++++++++-----
 backends/alpm/pk-backend-transaction.h         |    3 
 backends/aptcc/acqprogress.cpp                 |   27 ++++--
 backends/aptcc/pk-backend-aptcc.cpp            |   70 ++++++-----------
 backends/yum/yumBackend.py                     |    3 
 backends/zypp/pk-backend-zypp.cpp              |  100 ++++++++++++++-----------
 configure.ac                                   |    2 
 contrib/PackageKit.spec.in                     |    3 
 etc/PackageKit.conf.in                         |    4 -
 lib/packagekit-glib2/pk-client-sync.c          |   24 +++---
 lib/packagekit-glib2/pk-client.c               |   24 +++---
 lib/packagekit-glib2/pk-enum.c                 |    2 
 lib/packagekit-glib2/pk-enum.h                 |    2 
 lib/packagekit-qt2/package.h                   |    4 -
 lib/packagekit-qt2/transaction.cpp             |   10 --
 lib/packagekit-qt2/transaction.h               |   32 +++++---
 lib/packagekit-qt2/transactionprivate.h        |    3 
 src/org.freedesktop.PackageKit.Transaction.xml |   40 ++++++++--
 src/pk-main.c                                  |    6 -
 24 files changed, 281 insertions(+), 212 deletions(-)

New commits:
commit 6dd0be5ad2aa5ef96016ff200fb05548bc9a9147
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Jun 1 11:41:00 2011 +0100

    yum: Allow the 'any' WhatProvides kind to match already formatted provide strings

diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 45ed2ec..78b7b19 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -908,6 +908,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
             provides.append(self._get_provides_query(PROVIDES_FONT, value)[0])
             provides.append(self._get_provides_query(PROVIDES_MIMETYPE, value)[0])
             provides.append(self._get_provides_query(PROVIDES_POSTSCRIPT_DRIVER, value)[0])
+            provides.append(value)
             return provides
 
         # not supported
commit a3dcb4793a8338aa3a78ee05dfd5bfb42a0d1232
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date:   Thu May 26 09:26:07 2011 -0300

    API: when refreshing cache backends should emit RepoDetail as frontends will be able to present extra details.

diff --git a/src/org.freedesktop.PackageKit.Transaction.xml b/src/org.freedesktop.PackageKit.Transaction.xml
index 38f062a..469a337 100644
--- a/src/org.freedesktop.PackageKit.Transaction.xml
+++ b/src/org.freedesktop.PackageKit.Transaction.xml
@@ -817,10 +817,16 @@
             power.
           </doc:para>
           <doc:para>
+            When fetching each software source, ensure to emit RepoDetail for the
+            current source to give the user interface some extra details. Be sure to
+            have the "enabled" field set to true, otherwise you wouldn't be fetching
+            that source.
+          </doc:para>
+          <doc:para>
             This method typically emits
             <doc:tt>Progress</doc:tt>,
             <doc:tt>Error</doc:tt> and
-            <doc:tt>Package</doc:tt>.
+            <doc:tt>RepoDetail</doc:tt>.
           </doc:para>
         </doc:description>
         <doc:permission>Callers need the org.freedesktop.packagekit.refresh-cache</doc:permission>
commit fe7eb0d122e53adab53b6349a9c410e7e14908d2
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date:   Thu May 26 09:08:37 2011 -0300

    API: fix typo

diff --git a/src/org.freedesktop.PackageKit.Transaction.xml b/src/org.freedesktop.PackageKit.Transaction.xml
index d09d4fe..38f062a 100644
--- a/src/org.freedesktop.PackageKit.Transaction.xml
+++ b/src/org.freedesktop.PackageKit.Transaction.xml
@@ -1318,7 +1318,7 @@
           <doc:para>
             This method simulates a package file instalation emitting packages required to be
             installed, removed, updated, reinstalled, downgraded, obsoleted or untrusted.
-            The later is used to present the user untrusted packages that are about to be installed.
+            The latter is used to present the user untrusted packages that are about to be installed.
           </doc:para>
           <doc:para>
             This method typically emits
@@ -1346,7 +1346,7 @@
           <doc:para>
             This method simulates a package instalation emitting packages required to be
             installed, removed, updated, reinstalled, downgraded, obsoleted or untrusted.
-            The later is used to present the user untrusted packages that are about to be installed.
+            The latter is used to present the user untrusted packages that are about to be installed.
           </doc:para>
           <doc:para>
             This method typically emits
@@ -1374,7 +1374,7 @@
           <doc:para>
             This method simulates a package removal emitting packages required to be
             installed, removed, updated, reinstalled, downgraded, obsoleted or untrusted.
-            The later is used to present the user untrusted packages that are about to be installed.
+            The latter is used to present the user untrusted packages that are about to be installed.
           </doc:para>
           <doc:para>
             This method typically emits
@@ -1418,7 +1418,7 @@
           <doc:para>
             This method simulates a package update emitting packages required to be
             installed, removed, updated, reinstalled, downgraded, obsoleted or untrusted.
-            The later is used to present the user untrusted packages that are about to be installed.
+            The latter is used to present the user untrusted packages that are about to be installed.
           </doc:para>
           <doc:para>
             This method typically emits
commit d1eb615298ab208f9589faf6364bd163e5d956dd
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date:   Wed May 25 15:28:49 2011 -0300

    API: Adding PK_INFO_ENUM_UNTRUSTED so that simulate methods can tell which packages are untrusted

diff --git a/lib/packagekit-glib2/pk-enum.c b/lib/packagekit-glib2/pk-enum.c
index 5802b59..3d0cdf2 100644
--- a/lib/packagekit-glib2/pk-enum.c
+++ b/lib/packagekit-glib2/pk-enum.c
@@ -332,6 +332,8 @@ static const PkEnumMatch enum_info[] = {
 	{PK_INFO_ENUM_DOWNGRADING,		"downgrading"},
 	{PK_INFO_ENUM_PREPARING,		"preparing"},
 	{PK_INFO_ENUM_DECOMPRESSING,		"decompressing"},
+	{PK_INFO_ENUM_UNTRUSTED,			"untrusted"},
+	{PK_INFO_ENUM_TRUSTED,				"trusted"},
 	{0, NULL}
 };
 
diff --git a/lib/packagekit-glib2/pk-enum.h b/lib/packagekit-glib2/pk-enum.h
index 7b31263..48dc5ec 100644
--- a/lib/packagekit-glib2/pk-enum.h
+++ b/lib/packagekit-glib2/pk-enum.h
@@ -456,6 +456,8 @@ typedef enum {
 	PK_INFO_ENUM_DOWNGRADING,
 	PK_INFO_ENUM_PREPARING,
 	PK_INFO_ENUM_DECOMPRESSING,
+	PK_INFO_ENUM_UNTRUSTED,
+	PK_INFO_ENUM_TRUSTED,
 	PK_INFO_ENUM_LAST
 } PkInfoEnum;
 
diff --git a/lib/packagekit-qt2/package.h b/lib/packagekit-qt2/package.h
index d7424aa..7e400f0 100644
--- a/lib/packagekit-qt2/package.h
+++ b/lib/packagekit-qt2/package.h
@@ -74,7 +74,9 @@ public:
         InfoReinstalling,
         InfoDowngrading,
         InfoPreparing,
-        InfoDecompressing
+        InfoDecompressing,
+        InfoUntrusted,
+        InfoTrusted
     } Info;
 
     /**
diff --git a/lib/packagekit-qt2/transaction.h b/lib/packagekit-qt2/transaction.h
index 915851e..5c2ff1a 100644
--- a/lib/packagekit-qt2/transaction.h
+++ b/lib/packagekit-qt2/transaction.h
@@ -857,9 +857,11 @@ public:
      * \brief Simulates an installation of \p files.
      *
      * You should call this method before installing \p files
-     * \note: This method might emit \sa package()
-     *   with INSTALLING, REMOVING, UPDATING,
-     *        REINSTALLING or OBSOLETING status.
+     * \note: This method typically emits package() and errorCode()
+     * with INSTALLING, REMOVING, UPDATING, DOWNGRADING,
+     * REINSTALLING, OBSOLETING or UNTRUSTED status.
+     * The later is used to present the user untrusted packages
+     * that are about to be installed.
      */
     void simulateInstallFiles(const QStringList &files);
 
@@ -873,9 +875,11 @@ public:
      * \brief Simulates an installation of \p packages.
      *
      * You should call this method before installing \p packages
-     * \note: This method might emit \sa package()
-     *   with INSTALLING, REMOVING, UPDATING,
-     *        REINSTALLING or OBSOLETING status.
+     * \note: This method typically emits package() and errorCode()
+     * with INSTALLING, REMOVING, UPDATING, DOWNGRADING,
+     * REINSTALLING, OBSOLETING or UNTRUSTED status.
+     * The later is used to present the user untrusted packages
+     * that are about to be installed.
      */
     void simulateInstallPackages(const QList<Package> &packages);
 
@@ -889,9 +893,11 @@ public:
      * \brief Simulates a removal of \p packages.
      *
      * You should call this method before removing \p packages
-     * \note: This method might emit \sa package()
-     *   with INSTALLING, REMOVING, UPDATING,
-     *        REINSTALLING or OBSOLETING status.
+     * \note: This method typically emits package() and errorCode()
+     * with INSTALLING, REMOVING, UPDATING, DOWNGRADING,
+     * REINSTALLING, OBSOLETING or UNTRUSTED status.
+     * The later is used to present the user untrusted packages
+     * that are about to be installed.
      */
     void simulateRemovePackages(const QList<Package> &packages, bool autoRemove = false);
 
@@ -905,9 +911,11 @@ public:
      * \brief Simulates an update of \p packages.
      *
      * You should call this method before updating \p packages
-     * \note: This method might emit \sa package()
-     *   with INSTALLING, REMOVING, UPDATING,
-     *        REINSTALLING or OBSOLETING status.
+     * \note: This method typically emits package() and errorCode()
+     * with INSTALLING, REMOVING, UPDATING, DOWNGRADING,
+     * REINSTALLING, OBSOLETING or UNTRUSTED status.
+     * The later is used to present the user untrusted packages
+     * that are about to be installed.
      */
     void simulateUpdatePackages(const QList<Package> &packages);
 
diff --git a/src/org.freedesktop.PackageKit.Transaction.xml b/src/org.freedesktop.PackageKit.Transaction.xml
index 019bbed..d09d4fe 100644
--- a/src/org.freedesktop.PackageKit.Transaction.xml
+++ b/src/org.freedesktop.PackageKit.Transaction.xml
@@ -1317,7 +1317,13 @@
         <doc:description>
           <doc:para>
             This method simulates a package file instalation emitting packages required to be
-            installed, removed, reinstalled or updated.
+            installed, removed, updated, reinstalled, downgraded, obsoleted or untrusted.
+            The later is used to present the user untrusted packages that are about to be installed.
+          </doc:para>
+          <doc:para>
+            This method typically emits
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -1339,7 +1345,13 @@
         <doc:description>
           <doc:para>
             This method simulates a package instalation emitting packages required to be
-            installed, removed, reinstalled or updated.
+            installed, removed, updated, reinstalled, downgraded, obsoleted or untrusted.
+            The later is used to present the user untrusted packages that are about to be installed.
+          </doc:para>
+          <doc:para>
+            This method typically emits
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -1361,7 +1373,13 @@
         <doc:description>
           <doc:para>
             This method simulates a package removal emitting packages required to be
-            installed, removed, reinstalled or updated.
+            installed, removed, updated, reinstalled, downgraded, obsoleted or untrusted.
+            The later is used to present the user untrusted packages that are about to be installed.
+          </doc:para>
+          <doc:para>
+            This method typically emits
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
         </doc:description>
       </doc:doc>
@@ -1399,7 +1417,13 @@
         <doc:description>
           <doc:para>
             This method simulates a package update emitting packages required to be
-            installed, removed, reinstalled or updated.
+            installed, removed, updated, reinstalled, downgraded, obsoleted or untrusted.
+            The later is used to present the user untrusted packages that are about to be installed.
+          </doc:para>
+          <doc:para>
+            This method typically emits
+            <doc:tt>Error</doc:tt> and
+            <doc:tt>Package</doc:tt>.
           </doc:para>
         </doc:description>
       </doc:doc>
commit f8771f7ab15f297ad38ce8ee03b0566ff76dafbc
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed May 25 09:28:19 2011 +0100

    Only include glib-unix.h if the GLib version is >= 2.29.4

diff --git a/src/pk-main.c b/src/pk-main.c
index f15f64b..12b26f6 100644
--- a/src/pk-main.c
+++ b/src/pk-main.c
@@ -33,7 +33,7 @@
 #include <dbus/dbus-glib-lowlevel.h>
 #include <packagekit-glib2/pk-debug.h>
 
-#if GLIB_CHECK_VERSION(2,28,7)
+#if GLIB_CHECK_VERSION(2,29,4)
  #include <glib-unix.h>
 #endif
 
@@ -159,7 +159,7 @@ pk_main_quit_cb (PkEngine *engine, GMainLoop *mainloop)
 	g_main_loop_quit (mainloop);
 }
 
-#if GLIB_CHECK_VERSION(2,28,7)
+#if GLIB_CHECK_VERSION(2,29,4)
 
 /**
  * pk_main_sigint_cb:
@@ -271,7 +271,7 @@ main (int argc, char *argv[])
 		goto exit_program;
 	}
 
-#if GLIB_CHECK_VERSION(2,28,7)
+#if GLIB_CHECK_VERSION(2,29,4)
 	/* do stuff on ctrl-c */
 	g_unix_signal_add_watch_full (SIGINT,
 				      G_PRIORITY_DEFAULT,
commit df2aa6a31f6488eb28b8d97ea3822e6561da53c3
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon May 23 09:50:28 2011 +0100

    Do not prevent updating when firefox is running, we don't have all the client UI ready yet

diff --git a/etc/PackageKit.conf.in b/etc/PackageKit.conf.in
index cea7398..c3cef5f 100644
--- a/etc/PackageKit.conf.in
+++ b/etc/PackageKit.conf.in
@@ -274,8 +274,8 @@ UseIdleBandwidth=true
 #
 # Seporate entries can be seporated with the ';' character.
 #
-# default=/usr/lib/*/firefox
-NoUpdateProcessList=/usr/lib/*/firefox
+# default=/usr/lib*/*/firefox
+NoUpdateProcessList=
 
 # If the backend should use threads to avoid blocking the daemon for other users
 #
commit f444d83032edf97bbc55d21bd41effcb4dc26289
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date:   Sun May 15 23:54:57 2011 -0300

    aptcc: Fix the way we emit repos, now it emits the string more human readable

diff --git a/backends/aptcc/acqprogress.cpp b/backends/aptcc/acqprogress.cpp
index 874868b..cef398e 100644
--- a/backends/aptcc/acqprogress.cpp
+++ b/backends/aptcc/acqprogress.cpp
@@ -47,7 +47,13 @@ void AcqPackageKitStatus::Start()
 /* */
 void AcqPackageKitStatus::IMSHit(pkgAcquire::ItemDesc &Itm)
 {
-   Update = true;
+    if (packages.size() == 0) {
+        pk_backend_repo_detail(m_backend,
+                               "",
+                               Itm.Description.c_str(),
+                               false);
+    }
+    Update = true;
 };
 									/*}}}*/
 // AcqPackageKitStatus::Fetch - An item has started to download		/*{{{*/
@@ -82,8 +88,12 @@ void AcqPackageKitStatus::Fail(pkgAcquire::ItemDesc &Itm)
 
 	if (Itm.Owner->Status == pkgAcquire::Item::StatDone)
 	{
-		// TODO add a PK message
-// 		cout << /*_*/("Ign ") << Itm.Description << endl;
+        if (packages.size() == 0) {
+            pk_backend_repo_detail(m_backend,
+                                   "",
+                                   Itm.Description.c_str(),
+                                   false);
+        }
 	} else {
 		// an error was found (maybe 404, 403...)
 		// the item that got the error and the error text
@@ -140,15 +150,10 @@ bool AcqPackageKitStatus::Pulse(pkgAcquire *Owner)
 	for (pkgAcquire::Worker *I = Owner->WorkersBegin(); I != 0;
 		I = Owner->WorkerStep(I))
 	{
-		// There is no item running
-		if (I->CurrentItem == 0)
-		{
-			continue;
-		} else if (packages.size() == 0) {
-            pk_backend_repo_detail(m_backend,
-                                   "",
-                                   I->CurrentItem->Description.c_str(),
-                                   false);
+        // Check if there is no item running or if we don't have
+        // any packages set we are probably refreshing the cache
+        if (I->CurrentItem == 0 || packages.size() == 0)
+        {
             continue;
         }
 		emit_package(I->CurrentItem->ShortDesc, false);
commit f00ecd0574bc7ea3c44f3d4f20e2212efe4bd9e5
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date:   Sun May 15 02:35:57 2011 -0300

    aptcc: Emit repos while refreshing cache, and speed up searchDetails a bit

diff --git a/backends/aptcc/acqprogress.cpp b/backends/aptcc/acqprogress.cpp
index 68626d1..874868b 100644
--- a/backends/aptcc/acqprogress.cpp
+++ b/backends/aptcc/acqprogress.cpp
@@ -83,7 +83,7 @@ void AcqPackageKitStatus::Fail(pkgAcquire::ItemDesc &Itm)
 	if (Itm.Owner->Status == pkgAcquire::Item::StatDone)
 	{
 		// TODO add a PK message
-		cout << /*_*/("Ign ") << Itm.Description << endl;
+// 		cout << /*_*/("Ign ") << Itm.Description << endl;
 	} else {
 		// an error was found (maybe 404, 403...)
 		// the item that got the error and the error text
@@ -144,7 +144,13 @@ bool AcqPackageKitStatus::Pulse(pkgAcquire *Owner)
 		if (I->CurrentItem == 0)
 		{
 			continue;
-		}
+		} else if (packages.size() == 0) {
+            pk_backend_repo_detail(m_backend,
+                                   "",
+                                   I->CurrentItem->Description.c_str(),
+                                   false);
+            continue;
+        }
 		emit_package(I->CurrentItem->ShortDesc, false);
 		localCurrentPackages.erase(I->CurrentItem->ShortDesc);
 
diff --git a/backends/aptcc/pk-backend-aptcc.cpp b/backends/aptcc/pk-backend-aptcc.cpp
index 17531be..5ca8fab 100644
--- a/backends/aptcc/pk-backend-aptcc.cpp
+++ b/backends/aptcc/pk-backend-aptcc.cpp
@@ -1079,52 +1079,30 @@ backend_search_package_thread (PkBackend *backend)
 				continue;
 			}
 
-			pkgCache::VerIterator ver = m_apt->find_ver(pkg);
-			if (m_matcher->matches(pkg.Name())) {
-				// Don't insert virtual packages instead add what it provides
-				if (ver.end() == false) {
-					output.push_back(pair<pkgCache::PkgIterator, pkgCache::VerIterator>(pkg, ver));
-				} else {
-					// iterate over the provides list
-					for (pkgCache::PrvIterator Prv = pkg.ProvidesList(); Prv.end() == false; Prv++) {
-						ver = m_apt->find_ver(Prv.OwnerPkg());
-
-						// check to see if the provided package isn't virtual too
-						if (ver.end() == false)
-						{
-							// we add the package now because we will need to
-							// remove duplicates later anyway
-							output.push_back(pair<pkgCache::PkgIterator, pkgCache::VerIterator>(Prv.OwnerPkg(), ver));
-						}
-					}
-				}
-			} else {
-				// Don't insert virtual packages instead add what it provides
-				if (ver.end() == false) {
-					if (m_matcher->matches(get_short_description(ver, m_apt->packageRecords))
-					 || m_matcher->matches(get_long_description(ver, m_apt->packageRecords)))
-					{
-						output.push_back(pair<pkgCache::PkgIterator, pkgCache::VerIterator>(pkg, ver));
-					}
-				} else {
-					// iterate over the provides list
-					for (pkgCache::PrvIterator Prv = pkg.ProvidesList(); Prv.end() == false; Prv++) {
-						ver = m_apt->find_ver(Prv.OwnerPkg());
-
-						// check to see if the provided package isn't virtual too
-						if (ver.end() == false)
-						{
-							// we add the package now because we will need to
-							// remove duplicates later anyway
-							if (m_matcher->matches(get_short_description(ver, m_apt->packageRecords))
-							 || m_matcher->matches(get_long_description(ver, m_apt->packageRecords)))
-							{
-								output.push_back(pair<pkgCache::PkgIterator, pkgCache::VerIterator>(Prv.OwnerPkg(), ver));
-							}
-						}
-					}
-				}
-			}
+            pkgCache::VerIterator ver = m_apt->find_ver(pkg);
+            if (ver.end() == false) {
+                if (m_matcher->matches(pkg.Name()) ||
+                    m_matcher->matches(get_long_description(ver, m_apt->packageRecords))) {
+                    // The package matched
+                    output.push_back(pair<pkgCache::PkgIterator, pkgCache::VerIterator>(pkg, ver));
+                }
+            } else if (m_matcher->matches(pkg.Name())) {
+                // The package is virtual and MATCHED the name
+                // Don't insert virtual packages instead add what it provides
+
+                // iterate over the provides list
+                for (pkgCache::PrvIterator Prv = pkg.ProvidesList(); Prv.end() == false; Prv++) {
+                        ver = m_apt->find_ver(Prv.OwnerPkg());
+
+                    // check to see if the provided package isn't virtual too
+                    if (ver.end() == false)
+                    {
+                        // we add the package now because we will need to
+                        // remove duplicates later anyway
+                        output.push_back(pair<pkgCache::PkgIterator, pkgCache::VerIterator>(Prv.OwnerPkg(), ver));
+                    }
+                }
+            }
 		}
 	} else {
 		for (pkgCache::PkgIterator pkg = m_apt->packageCache->PkgBegin(); !pkg.end(); ++pkg) {
commit e82097ef821c56b1fe76b0f54b530550c3fad88d
Merge: 9a0add7... e9ed000...
Author: Jonathan Conder <jonno.conder at gmail.com>
Date:   Sat May 14 01:09:25 2011 +1200

    Merge branch 'master' of gitorious.org:packagekit/packagekit

commit 9a0add7488694ab02c057609fdb354ea807cddb9
Author: Jonathan Conder <jonno.conder at gmail.com>
Date:   Sat May 14 01:08:59 2011 +1200

    alpm: fix package cache location

diff --git a/backends/alpm/Makefile.am b/backends/alpm/Makefile.am
index a664b2c..d7c6b00 100644
--- a/backends/alpm/Makefile.am
+++ b/backends/alpm/Makefile.am
@@ -4,8 +4,8 @@ PK_BACKEND_REPO_FILE = $(confdir)/repos.list
 
 PK_BACKEND_DEFAULT_PATH = "/bin:/usr/bin:/sbin:/usr/sbin"
 PK_BACKEND_DEFAULT_ROOT = "/"
-PK_BACKEND_DEFAULT_DBPATH = $(localstatedir)/lib/pacman
-PK_BACKEND_DEFAULT_CACHEDIR = $(localstatedir)/cache/pacman/pkg
+PK_BACKEND_DEFAULT_DBPATH = $(localstatedir)/lib/pacman/
+PK_BACKEND_DEFAULT_CACHEDIR = $(localstatedir)/cache/pacman/pkg/
 PK_BACKEND_DEFAULT_LOGFILE = $(localstatedir)/log/pacman.log
 
 ALPM_CACHE_PATH = $(localstatedir)/lib/pacman/sync
commit e9ed00089de47e64090af65f42c9eba1e8eee0d4
Author: Duncan Mac-Vicar P <dmacvicar at suse.de>
Date:   Fri May 6 16:12:37 2011 +0200

    zypp: fix deletion of package locks (bnc#690038)
    
    Save and restore Pool status when doing calculations like
    in get_depends and get_requires.
    
    Fixes bug introduced by commit:
    "zypp: reset packages status in repo while removing packages" which
    resetted the status of an item, including its locks.
    
    So if you browse a locked package, see if requires, the reset done
    after removed the locks, and if you installed a package later, this was
    saved.

diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index 51bb3e4..85b7cbb 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -84,6 +84,22 @@ static map<PkBackend *, EventDirector *> _eventDirectors;
 
 map<PkBackend *, vector<string> *> _signatures;
 
+// helper function to restore the pool status
+// after doing operations on it
+class PoolStatusSaver : private base::NonCopyable
+{
+public:
+    PoolStatusSaver()
+    {
+	    ResPool::instance().proxy().saveState();
+    }
+
+    ~PoolStatusSaver()
+    {
+	    ResPool::instance().proxy().restoreState();
+    }
+};
+
 /**
  * pk_backend_get_description:
  */
@@ -168,6 +184,7 @@ backend_get_requires_thread (PkBackend *backend)
 	//TODO repair percentages
 	//pk_backend_set_percentage (backend, 0);
 
+	PoolStatusSaver saver;
 	for (uint i = 0; package_ids[i]; i++) {
 		sat::Solvable solvable = zypp_get_package_by_id (backend, package_ids[i]);
 		PoolItem package;
@@ -231,12 +248,8 @@ backend_get_requires_thread (PkBackend *backend)
 
 			if (!error && !zypp_filter_solvable (_filters, it->resolvable()->satSolvable()))
 				error = !zypp_backend_pool_item_notify (backend, *it);
-
-			it->statusReset ();
 		}
 
-		// undo the status-change of the package and disable forceResolve
-		package.statusReset ();
 		solver.setForceResolve (false);
 	}
 
@@ -775,6 +788,7 @@ backend_install_files_thread (PkBackend *backend)
 {
 	MIL << endl;
 	gchar **full_paths;
+	RepoManager manager;
 	ZYpp::Ptr zypp;
 
 	zypp = get_zypp (backend);
@@ -825,63 +839,36 @@ backend_install_files_thread (PkBackend *backend)
 		tmpRepo.setAutorefresh (true);
 		tmpRepo.setAlias ("PK_TMP_DIR");
 		tmpRepo.setName ("PK_TMP_DIR");
-		zypp_build_pool (backend, true);
 
 		// add Repo to pool
-
-		RepoManager manager;
 		manager.addRepository (tmpRepo);
 
-		if (!zypp_refresh_meta_and_cache (manager, tmpRepo))
-			return FALSE;
+		if (!zypp_refresh_meta_and_cache (manager, tmpRepo)) {
+			return zypp_backend_finished_error (
+			  backend, PK_ERROR_ENUM_INTERNAL_ERROR, "Can't refresh repositories");
+		}
+		zypp_build_pool (backend, true);
 
-	} catch (const url::UrlException &ex) {
-		return zypp_backend_finished_error (
-			backend, PK_ERROR_ENUM_INTERNAL_ERROR, ex.asUserString ().c_str ());
 	} catch (const Exception &ex) {
 		return zypp_backend_finished_error (
 			backend, PK_ERROR_ENUM_INTERNAL_ERROR, ex.asUserString ().c_str ());
 	}
 
 	bool error = false;
-	for (guint i = 0; full_paths[i]; i++) {
-
-		Pathname rpmPath (full_paths[i]);
-		target::rpm::RpmHeader::constPtr rpmHeader = target::rpm::RpmHeader::readPackage (rpmPath, target::rpm::RpmHeader::NOSIGNATURE);
 
-		// look for the packages and set them to toBeInstalled
-		vector<sat::Solvable> solvables;
-		zypp_get_packages_by_name (backend, rpmHeader->tag_name ().c_str (), ResKind::package, solvables, TRUE);
-		PoolItem *item = NULL;
-
-		gboolean found = FALSE;
-
-		for (vector<sat::Solvable>::iterator it = solvables.begin (); it != solvables.end (); it ++) {
-		       if (it->repository ().alias () == "PK_TMP_DIR") {
-			       item = new PoolItem(*it);
-			       found = TRUE;
-			       break;
-		       }
-		}
+	Repository repo = ResPool::instance().reposFind("PK_TMP_DIR");
 
-		if (!found) {
-			error = true;
-			pk_backend_error_code (backend, PK_ERROR_ENUM_INTERNAL_ERROR, "Could not find the rpm-Package in Pool");
-		} else if (!error) {
-			ResStatus status = item->status ().setToBeInstalled (ResStatus::USER);
-		}
-		if (!error && !zypp_perform_execution (backend, INSTALL, FALSE)) {
-			error = true;
-			pk_backend_error_code (backend, PK_ERROR_ENUM_LOCAL_INSTALL_FAILED, "Could not install the rpm-file.");
-		}
+	for_(it, repo.solvablesBegin(), repo.solvablesEnd()){
+		MIL << "Setting " << *it << " for installation" << endl;
+		PoolItem(*it).status().setToBeInstalled(ResStatus::USER);
+	}
 
-		item->statusReset ();
-		delete (item);
+	if (!zypp_perform_execution (backend, INSTALL, FALSE)) {
+		pk_backend_error_code (backend, PK_ERROR_ENUM_LOCAL_INSTALL_FAILED, "Could not install the rpm-file.");
 	}
 
 	// remove tmp-dir and the tmp-repo
 	try {
-		RepoManager manager;
 		manager.removeRepository (tmpRepo);
 	} catch (const repo::RepoNotFoundException &ex) {
 		pk_backend_error_code (backend, PK_ERROR_ENUM_REPO_NOT_FOUND, ex.asUserString().c_str() );
@@ -1070,6 +1057,8 @@ pk_backend_update_system (PkBackend *backend, gboolean only_trusted)
 static gboolean
 backend_install_packages_thread (PkBackend *backend)
 {
+	MIL << endl;
+	PoolStatusSaver saver;
 	gchar **package_ids;
 
 	// refresh the repos before installing packages
@@ -1230,6 +1219,8 @@ pk_backend_install_signature (PkBackend *backend, PkSigTypeEnum type, const gcha
 static gboolean
 backend_remove_packages_thread (PkBackend *backend)
 {
+	MIL << endl;
+	PoolStatusSaver saver;
 	gboolean autoremove;
 	gchar **package_ids;
 	vector<PoolItem> *items = new vector<PoolItem> ();
@@ -1783,6 +1774,8 @@ pk_backend_get_packages (PkBackend *backend, PkBitfield filter)
 static gboolean
 backend_update_packages_thread (PkBackend *backend)
 {
+	MIL << endl;
+	PoolStatusSaver saver;
 	gboolean retval;
 	gchar **package_ids;
 	ZYpp::Ptr zypp;
commit ad3ce3e90b50c2b6e50306831cb4c502eb870c34
Author: Duncan Mac-Vicar P <dmacvicar at suse.de>
Date:   Fri May 6 16:00:30 2011 +0200

    zypp: log to ZYpp's log the start of a PK backend function to ease debugging

diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index 3968f01..51bb3e4 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -29,6 +29,7 @@
 #include <glib/gi18n.h>
 #include <sys/vfs.h>
 
+#include <zypp/base/Logger.h>
 #include <zypp/ZYppFactory.h>
 #include <zypp/ResObject.h>
 #include <zypp/ResPoolProxy.h>
@@ -145,6 +146,7 @@ pk_backend_destroy (PkBackend *backend)
 static gboolean
 backend_get_requires_thread (PkBackend *backend)
 {
+	MIL << endl;
 	gchar **package_ids;
 	PkBitfield _filters = (PkBitfield) pk_backend_get_uint (backend, "filters");
 	ZYpp::Ptr zypp;
@@ -307,6 +309,7 @@ zypp_is_no_solvable (const sat::Solvable &solv)
 static gboolean
 backend_get_depends_thread (PkBackend *backend)
 {
+	MIL << endl;
 	gchar **package_ids;
 	PkBitfield _filters = (PkBitfield) pk_backend_get_uint (backend, "filters");
 
@@ -481,6 +484,7 @@ pk_backend_get_depends (PkBackend *backend, PkBitfield filters, gchar **package_
 static gboolean
 backend_get_details_thread (PkBackend *backend)
 {
+	MIL << endl;
 	gchar **package_ids;
 	ZYpp::Ptr zypp;
 
@@ -587,6 +591,7 @@ pk_backend_get_details (PkBackend *backend, gchar **package_ids)
 static gboolean
 backend_get_distro_upgrades_thread(PkBackend *backend)
 {
+	MIL << endl;
 	ZYpp::Ptr zypp;
 
 	zypp = get_zypp (backend);
@@ -642,6 +647,7 @@ pk_backend_get_distro_upgrades (PkBackend *backend)
 static gboolean
 backend_refresh_cache_thread (PkBackend *backend)
 {
+	MIL << endl;
 	gboolean force = pk_backend_get_bool(backend, "force");
 	zypp_refresh_cache (backend, force);
 	pk_backend_finished (backend);
@@ -654,6 +660,7 @@ backend_refresh_cache_thread (PkBackend *backend)
 void
 pk_backend_refresh_cache (PkBackend *backend, gboolean force)
 {
+	MIL << endl;
 	pk_backend_thread_create (backend, backend_refresh_cache_thread);
 }
 
@@ -686,6 +693,7 @@ check_for_self_update (PkBackend *backend, set<PoolItem> *candidates)
 static gboolean
 backend_get_updates_thread (PkBackend *backend)
 {
+	MIL << endl;
 	PkBitfield _filters = (PkBitfield) pk_backend_get_uint (backend, "filters");
 	ZYpp::Ptr zypp;
 
@@ -765,6 +773,7 @@ pk_backend_get_updates (PkBackend *backend, PkBitfield filters)
 static gboolean
 backend_install_files_thread (PkBackend *backend)
 {
+	MIL << endl;
 	gchar **full_paths;
 	ZYpp::Ptr zypp;
 
@@ -903,6 +912,7 @@ pk_backend_simulate_install_files (PkBackend *backend, gchar **full_paths)
 static gboolean
 backend_get_update_detail_thread (PkBackend *backend)
 {
+	MIL << endl;
 	gchar **package_ids;
 	ZYpp::Ptr zypp;
 
@@ -1001,6 +1011,7 @@ pk_backend_get_update_detail (PkBackend *backend, gchar **package_ids)
 static gboolean
 backend_update_system_thread (PkBackend *backend)
 {
+	MIL << endl;
 	ZYpp::Ptr zypp;
 
 	zypp = get_zypp (backend);
@@ -1313,6 +1324,7 @@ pk_backend_simulate_remove_packages (PkBackend *backend, gchar **packages, gbool
 static gboolean
 backend_resolve_thread (PkBackend *backend)
 {
+	MIL << endl;
 	gchar **package_ids = pk_backend_get_strv (backend, "package_ids");
 	PkBitfield _filters = (PkBitfield) pk_backend_get_uint (backend, "filters");
 	ZYpp::Ptr zypp;
@@ -1396,6 +1408,7 @@ pk_backend_resolve (PkBackend *backend, PkBitfield filters, gchar **package_ids)
 static gboolean
 backend_find_packages_thread (PkBackend *backend)
 {
+	MIL << endl;
 	gchar **values;
 	const gchar *search;
 	guint mode;
@@ -1490,6 +1503,7 @@ pk_backend_search_details (PkBackend *backend, PkBitfield filters, gchar **value
 static gboolean
 backend_search_group_thread (PkBackend *backend)
 {
+	MIL << endl;
 	gchar **values;
 	const gchar *group;
 	ZYpp::Ptr zypp;
@@ -1560,6 +1574,7 @@ pk_backend_search_files (PkBackend *backend, PkBitfield filters, gchar **values)
 void
 pk_backend_get_repo_list (PkBackend *backend, PkBitfield filters)
 {
+	MIL << endl;
 	ZYpp::Ptr zypp;
 
 	zypp = get_zypp (backend);
@@ -1606,6 +1621,7 @@ pk_backend_get_repo_list (PkBackend *backend, PkBitfield filters)
 void
 pk_backend_repo_enable (PkBackend *backend, const gchar *rid, gboolean enabled)
 {
+	MIL << endl;
 	ZYpp::Ptr zypp;
 
 	zypp = get_zypp (backend);
@@ -1647,6 +1663,7 @@ pk_backend_repo_enable (PkBackend *backend, const gchar *rid, gboolean enabled)
 static gboolean
 backend_get_files_thread (PkBackend *backend)
 {
+	MIL << endl;
 	gchar **package_ids;
 	ZYpp::Ptr zypp;
 
@@ -1731,6 +1748,7 @@ pk_backend_get_files(PkBackend *backend, gchar **package_ids)
 static gboolean
 backend_get_packages_thread (PkBackend *backend)
 {
+	MIL << endl;
 	ZYpp::Ptr zypp;
 
 	zypp = get_zypp (backend);
@@ -1835,6 +1853,7 @@ pk_backend_simulate_update_packages (PkBackend *backend, gchar **package_ids)
 static gboolean
 backend_repo_set_data_thread (PkBackend *backend)
 {
+	MIL << endl;
 	const gchar *repo_id;
 	const gchar *parameter;
 	const gchar *value;
@@ -1977,6 +1996,7 @@ pk_backend_repo_set_data (PkBackend *backend, const gchar *repo_id, const gchar
 static gboolean
 backend_what_provides_thread (PkBackend *backend)
 {
+	MIL << endl;
 	ZYpp::Ptr zypp;
 
 	zypp = get_zypp (backend);
@@ -2060,6 +2080,7 @@ pk_backend_get_mime_types (PkBackend *backend)
 static gboolean
 backend_download_packages_thread (PkBackend *backend)
 {
+	MIL << endl;
 	gchar **package_ids;
 	gulong size = 0;
 
commit df6eef34178c3e68663861ec32dede330495081a
Author: Jonathan Conder <jonno.conder at gmail.com>
Date:   Sat May 7 01:03:20 2011 +1200

    alpm: improve backend messages

diff --git a/backends/alpm/pk-backend-alpm.c b/backends/alpm/pk-backend-alpm.c
index 0077329..ba993f0 100644
--- a/backends/alpm/pk-backend-alpm.c
+++ b/backends/alpm/pk-backend-alpm.c
@@ -29,6 +29,7 @@
 #include "pk-backend-databases.h"
 #include "pk-backend-error.h"
 #include "pk-backend-groups.h"
+#include "pk-backend-transaction.h"
 
 PkBackend *backend = NULL;
 GCancellable *cancellable = NULL;
diff --git a/backends/alpm/pk-backend-error.c b/backends/alpm/pk-backend-error.c
index 6383175..255f1fb 100644
--- a/backends/alpm/pk-backend-error.c
+++ b/backends/alpm/pk-backend-error.c
@@ -25,20 +25,6 @@
 
 #include "pk-backend-error.h"
 
-static void
-pk_backend_output_locked (PkBackend *self)
-{
-	gchar *output;
-
-	g_return_if_fail (self != NULL);
-
-	output = g_strdup_printf ("If you are certain no other package manager "
-				  "is running, you can remove %s\n",
-				  alpm_option_get_lockfile ());
-	pk_backend_output (self, output);
-	g_free (output);
-}
-
 void
 pk_backend_error (PkBackend *self, GError *error)
 {
@@ -86,7 +72,6 @@ pk_backend_error (PkBackend *self, GError *error)
 
 			case PM_ERR_HANDLE_LOCK:
 				code = PK_ERROR_ENUM_CANNOT_GET_LOCK;
-				pk_backend_output_locked (self);
 				break;
 
 			case PM_ERR_DB_OPEN:
@@ -187,15 +172,6 @@ pk_backend_error (PkBackend *self, GError *error)
 	pk_backend_error_code (self, code, "%s", error->message);
 }
 
-void
-pk_backend_output (PkBackend *self, const gchar *output)
-{
-	g_return_if_fail (self != NULL);
-	g_return_if_fail (output != NULL);
-
-	pk_backend_message (self, PK_MESSAGE_ENUM_UNKNOWN, "%s", output);
-}
-
 GQuark
 alpm_error_quark (void)
 {
diff --git a/backends/alpm/pk-backend-error.h b/backends/alpm/pk-backend-error.h
index b01b06d..83fe4a5 100644
--- a/backends/alpm/pk-backend-error.h
+++ b/backends/alpm/pk-backend-error.h
@@ -32,6 +32,4 @@ enum {
 
 void	 pk_backend_error	(PkBackend *self, GError *error);
 
-void	 pk_backend_output	(PkBackend *self, const gchar *output);
-
 GQuark	 alpm_error_quark	(void);
diff --git a/backends/alpm/pk-backend-transaction.c b/backends/alpm/pk-backend-transaction.c
index f919309..fdb840e 100644
--- a/backends/alpm/pk-backend-transaction.c
+++ b/backends/alpm/pk-backend-transaction.c
@@ -32,6 +32,9 @@ static off_t dtotal = 0;
 static pmpkg_t *dpkg = NULL;
 static GString *dfiles = NULL;
 
+static pmpkg_t *tpkg = NULL;
+static GString *toutput = NULL;
+
 static gchar *
 pk_backend_resolve_path (PkBackend *self, const gchar *basename)
 {
@@ -332,6 +335,53 @@ pk_backend_transaction_conv_cb (pmtransconv_t question, gpointer data1,
 }
 
 static void
+pk_backend_output_end (PkBackend *self)
+{
+	g_return_if_fail (self != NULL);
+
+	tpkg = NULL;
+
+	if (toutput != NULL) {
+		pk_backend_output (self, toutput->str);
+		g_string_free (toutput, TRUE);
+		toutput = NULL;
+	}
+}
+
+static void
+pk_backend_output_start (PkBackend *self, pmpkg_t *pkg)
+{
+	g_return_if_fail (self != NULL);
+	g_return_if_fail (pkg != NULL);
+
+	if (tpkg != NULL) {
+		pk_backend_output_end (self);
+	}
+
+	tpkg = pkg;
+}
+
+void
+pk_backend_output (PkBackend *self, const gchar *output)
+{
+	g_return_if_fail (self != NULL);
+	g_return_if_fail (output != NULL);
+
+	if (tpkg != NULL) {
+		if (toutput == NULL) {
+			toutput = g_string_new ("<b>");
+			g_string_append (toutput, alpm_pkg_get_name (tpkg));
+			g_string_append (toutput, "</b>\n");
+		}
+
+		g_string_append (toutput, output);
+	} else {
+		PkMessageEnum type = PK_MESSAGE_ENUM_UNKNOWN;
+		pk_backend_message (self, type, "%s", output);
+	}
+}
+
+static void
 pk_backend_transaction_dep_resolve (PkBackend *self)
 {
 	g_return_if_fail (self != NULL);
@@ -355,6 +405,7 @@ pk_backend_transaction_add_start (PkBackend *self, pmpkg_t *pkg)
 
 	pk_backend_set_status (self, PK_STATUS_ENUM_INSTALL);
 	pk_backend_pkg (self, pkg, PK_INFO_ENUM_INSTALLING);
+	pk_backend_output_start (self, pkg);
 }
 
 static void
@@ -374,20 +425,16 @@ pk_backend_transaction_add_done (PkBackend *self, pmpkg_t *pkg)
 
 	optdepends = alpm_pkg_get_optdepends (pkg);
 	if (optdepends != NULL) {
-		GString *depends = g_string_new ("");
-
-		g_string_append_printf (depends,
-					"Optional dependencies for %s:\n",
-					name);
+		pk_backend_output (self, "Optional dependencies:\n");
 
 		for (i = optdepends; i != NULL; i = i->next) {
-			g_string_append_printf (depends, "%s\n",
-						(const gchar *) i->data);
+			const gchar *depend = i->data;
+			gchar *output = g_strdup_printf ("%s\n", depend);
+			pk_backend_output (self, output);
+			g_free (output);
 		}
-
-		pk_backend_output (self, depends->str);
-		g_string_free (depends, TRUE);
 	}
+	pk_backend_output_end (self);
 }
 
 static void
@@ -398,6 +445,7 @@ pk_backend_transaction_remove_start (PkBackend *self, pmpkg_t *pkg)
 
 	pk_backend_set_status (self, PK_STATUS_ENUM_REMOVE);
 	pk_backend_pkg (self, pkg, PK_INFO_ENUM_REMOVING);
+	pk_backend_output_start (self, pkg);
 }
 
 static void
@@ -413,6 +461,7 @@ pk_backend_transaction_remove_done (PkBackend *self, pmpkg_t *pkg)
 
 	alpm_logaction ("removed %s (%s)\n", name, version);
 	pk_backend_pkg (self, pkg, PK_INFO_ENUM_FINISHED);
+	pk_backend_output_end (self);
 }
 
 static void
@@ -438,6 +487,7 @@ pk_backend_transaction_upgrade_start (PkBackend *self, pmpkg_t *pkg,
 
 	pk_backend_set_status (self, state);
 	pk_backend_pkg (self, pkg, info);
+	pk_backend_output_start (self, pkg);
 }
 
 static void
@@ -463,22 +513,18 @@ pk_backend_transaction_upgrade_done (PkBackend *self, pmpkg_t *pkg,
 				     alpm_pkg_get_optdepends (old),
 				     (alpm_list_fn_cmp) g_strcmp0);
 	if (optdepends != NULL) {
-		GString *depends = g_string_new ("");
-
-		g_string_append_printf (depends,
-					"New optional dependencies for %s\n",
-					name);
+		pk_backend_output (self, "New optional dependencies:\n");
 
 		for (i = optdepends; i != NULL; i = i->next) {
-			g_string_append_printf (depends, "%s\n",
-						(const gchar *) i->data);
+			const gchar *depend = i->data;
+			gchar *output = g_strdup_printf ("%s\n", depend);
+			pk_backend_output (self, output);
+			g_free (output);
 		}
 
-		pk_backend_output (self, depends->str);
-
-		g_string_free (depends, TRUE);
 		alpm_list_free (optdepends);
 	}
+	pk_backend_output_end (self);
 }
 
 static void
@@ -896,6 +942,13 @@ pk_backend_transaction_end (PkBackend *self, GError **error)
 	alpm_option_set_dlcb (NULL);
 	alpm_option_set_totaldlcb (NULL);
 
+	if (dpkg != NULL) {
+		pk_backend_transaction_download_end (self);
+	}
+	if (tpkg != NULL) {
+		pk_backend_output_end (self);
+	}
+
 	if (alpm_trans_release () < 0) {
 		g_set_error_literal (error, ALPM_ERROR, pm_errno,
 				     alpm_strerrorlast ());
diff --git a/backends/alpm/pk-backend-transaction.h b/backends/alpm/pk-backend-transaction.h
index 7bc1af0..6bb1d69 100644
--- a/backends/alpm/pk-backend-transaction.h
+++ b/backends/alpm/pk-backend-transaction.h
@@ -41,3 +41,6 @@ gboolean	 pk_backend_transaction_end		(PkBackend *self,
 
 gboolean	 pk_backend_transaction_finish		(PkBackend *self,
 							 GError *error);
+
+void		 pk_backend_output			(PkBackend *self,
+							 const gchar *output);
commit 953c0980265b2b0120bc1337d1a2061f47a1373d
Author: Richard Hughes <richard at hughsie.com>
Date:   Thu May 5 11:44:17 2011 +0100

    yum: fix a failure to get updates caused by using the rename of pre_process

diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 92aa99b..45ed2ec 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -2781,7 +2781,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
 
         md = self.updateMetadata
         for pkg in unique(pkgs):
-            if pkgfilter.pre_process(pkg):
+            if pkgfilter._filter_base(pkg):
                 # we pre-get the ChangeLog data so that the changes file is
                 # downloaded at GetUpdates time, not when we open the GUI
                 # get each element of the ChangeLog
commit d92016c9329dc1c5ea6fff4bfc3dadaa738e3bc8
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed May 4 12:07:44 2011 +0100

    trivial: fix up the Fedora spec file from upstream

diff --git a/contrib/PackageKit.spec.in b/contrib/PackageKit.spec.in
index 7167869..521b34f 100644
--- a/contrib/PackageKit.spec.in
+++ b/contrib/PackageKit.spec.in
@@ -106,6 +106,7 @@ Summary: Tell PackageKit to check for updates when yum exits
 Group: System Environment/Base
 Requires: yum >= 3.0
 Requires: PackageKit
+Requires: dbus-python
 Obsoletes: yum-packagekit < %{version}-%{release}
 
 %description yum-plugin
@@ -387,7 +388,6 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
 %defattr(-,root,root,-)
 %{_libdir}/*packagekit-glib2.so.*
 %{_libdir}/girepository-1.0/PackageKitGlib-1.0.typelib
-%{_datadir}/gir-1.0/PackageKitGlib-1.0.gir
 
 %files qt
 %defattr(-,root,root,-)
@@ -438,6 +438,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
 %dir %{_includedir}/PackageKit
 %dir %{_includedir}/PackageKit/packagekit-glib2
 %{_includedir}/PackageKit/packagekit-glib*/*.h
+%{_datadir}/gir-1.0/PackageKitGlib-1.0.gir
 
 %files qt-devel
 %defattr(-,root,root,-)
commit 264df93fbdfe85808e3f94dc88f410d8d5d710bc
Author: Matthias Klumpp <matthias at nlinux.org>
Date:   Wed May 4 19:47:26 2011 +0200

    Some more GIR annotations

diff --git a/lib/packagekit-glib2/pk-client-sync.c b/lib/packagekit-glib2/pk-client-sync.c
index 5e7341a..b26dbfe 100644
--- a/lib/packagekit-glib2/pk-client-sync.c
+++ b/lib/packagekit-glib2/pk-client-sync.c
@@ -305,7 +305,7 @@ pk_client_search_files (PkClient *client, PkBitfield filters, gchar **values, GC
 /**
  * pk_client_get_details:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
  * @progress_user_data: data to pass to @progress_callback
@@ -354,7 +354,7 @@ pk_client_get_details (PkClient *client, gchar **package_ids, GCancellable *canc
 /**
  * pk_client_get_update_detail:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
  * @progress_user_data: data to pass to @progress_callback
@@ -403,7 +403,7 @@ pk_client_get_update_detail (PkClient *client, gchar **package_ids, GCancellable
 /**
  * pk_client_download_packages:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @directory: the location where packages are to be downloaded
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
@@ -602,7 +602,7 @@ pk_client_update_system (PkClient *client, gboolean only_trusted, GCancellable *
  * pk_client_get_depends:
  * @client: a valid #PkClient instance
  * @filters: a %PkBitfield such as %PK_FILTER_ENUM_GUI | %PK_FILTER_ENUM_FREE or %PK_FILTER_ENUM_NONE
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @recursive: If we should search recursively for depends
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
@@ -700,7 +700,7 @@ pk_client_get_packages (PkClient *client, PkBitfield filters, GCancellable *canc
  * pk_client_get_requires:
  * @client: a valid #PkClient instance
  * @filters: a %PkBitfield such as %PK_FILTER_ENUM_GUI | %PK_FILTER_ENUM_FREE or %PK_FILTER_ENUM_NONE
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @recursive: If we should search recursively for requires
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
@@ -849,7 +849,7 @@ pk_client_get_distro_upgrades (PkClient *client, GCancellable *cancellable,
 /**
  * pk_client_get_files:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
  * @progress_user_data: data to pass to @progress_callback
@@ -944,7 +944,7 @@ pk_client_get_categories (PkClient *client, GCancellable *cancellable,
 /**
  * pk_client_remove_packages:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @allow_deps: if other dependant packages are allowed to be removed from the computer
  * @autoremove: if other packages installed at the same time should be tried to remove
  * @cancellable: a #GCancellable or %NULL
@@ -1048,7 +1048,7 @@ pk_client_refresh_cache (PkClient *client, gboolean force, GCancellable *cancell
  * pk_client_install_packages:
  * @client: a valid #PkClient instance
  * @only_trusted: only trusted packages should be installed
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
  * @progress_user_data: data to pass to @progress_callback
@@ -1147,7 +1147,7 @@ pk_client_install_signature (PkClient *client, PkSigTypeEnum type, const gchar *
  * pk_client_update_packages:
  * @client: a valid #PkClient instance
  * @only_trusted: only trusted packages should be installed
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
  * @progress_user_data: data to pass to @progress_callback
@@ -1538,7 +1538,7 @@ pk_client_simulate_install_files (PkClient *client, gchar **files, GCancellable
 /**
  * pk_client_simulate_install_packages:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
  * @progress_user_data: data to pass to @progress_callback
@@ -1586,7 +1586,7 @@ pk_client_simulate_install_packages (PkClient *client, gchar **package_ids, GCan
 /**
  * pk_client_simulate_remove_packages:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @autoremove: if other packages installed at the same time should be tried to remove
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
@@ -1635,7 +1635,7 @@ pk_client_simulate_remove_packages (PkClient *client, gchar **package_ids, gbool
 /**
  * pk_client_simulate_update_packages:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
  * @progress_user_data: data to pass to @progress_callback
diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c
index 0c5c1fe..c113a55 100644
--- a/lib/packagekit-glib2/pk-client.c
+++ b/lib/packagekit-glib2/pk-client.c
@@ -2381,7 +2381,7 @@ out:
 /**
  * pk_client_get_details_async:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
  * @progress_user_data: data to pass to @progress_callback
@@ -2442,7 +2442,7 @@ out:
 /**
  * pk_client_get_update_detail_async:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
  * @progress_user_data: data to pass to @progress_callback
@@ -2503,7 +2503,7 @@ out:
 /**
  * pk_client_download_packages_async:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @directory: the location where packages are to be downloaded
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
@@ -2748,7 +2748,7 @@ out:
  * pk_client_get_depends_async:
  * @client: a valid #PkClient instance
  * @filters: a %PkBitfield such as %PK_FILTER_ENUM_GUI | %PK_FILTER_ENUM_FREE or %PK_FILTER_ENUM_NONE
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @recursive: If we should search recursively for depends
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
@@ -2871,7 +2871,7 @@ out:
  * pk_client_get_requires_async:
  * @client: a valid #PkClient instance
  * @filters: a %PkBitfield such as %PK_FILTER_ENUM_GUI | %PK_FILTER_ENUM_FREE or %PK_FILTER_ENUM_NONE
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @recursive: If we should search recursively for requires
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
@@ -3057,7 +3057,7 @@ out:
 /**
  * pk_client_get_files_async:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
  * @progress_user_data: data to pass to @progress_callback
@@ -3174,7 +3174,7 @@ out:
 /**
  * pk_client_remove_packages_async:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @allow_deps: if other dependant packages are allowed to be removed from the computer
  * @autoremove: if other packages installed at the same time should be tried to remove
  * @cancellable: a #GCancellable or %NULL
@@ -3303,7 +3303,7 @@ out:
  * pk_client_install_packages_async:
  * @client: a valid #PkClient instance
  * @only_trusted: only trusted packages should be installed
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
  * @progress_user_data: data to pass to @progress_callback
@@ -3428,7 +3428,7 @@ out:
  * pk_client_update_packages_async:
  * @client: a valid #PkClient instance
  * @only_trusted: only trusted packages should be installed
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
  * @progress_user_data: data to pass to @progress_callback
@@ -4041,7 +4041,7 @@ out:
 /**
  * pk_client_simulate_install_packages_async:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
  * @progress_user_data: data to pass to @progress_callback
@@ -4101,7 +4101,7 @@ out:
 /**
  * pk_client_simulate_remove_packages_async:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @autoremove: if other packages installed at the same time should be tried to remove
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
@@ -4163,7 +4163,7 @@ out:
 /**
  * pk_client_simulate_update_packages_async:
  * @client: a valid #PkClient instance
- * @package_ids: a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
+ * @package_ids: (array zero-terminated=1): a null terminated array of package_id structures such as "hal;0.0.1;i386;fedora"
  * @cancellable: a #GCancellable or %NULL
  * @progress_callback: (scope call): the function to run when the progress changes
  * @progress_user_data: data to pass to @progress_callback
commit aaf248f16135cf5b6af3880a98bcc2f044e52510
Merge: 48a1775... 6f2c444...
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date:   Wed May 4 11:04:26 2011 -0300

    Merge branch 'master' of gitorious.org:packagekit/packagekit

commit 48a1775cb409609d766901038f6c9ae53f6e94fb
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date:   Wed May 4 11:03:31 2011 -0300

    packagekit-qt2: Remove package caching as we use const Packages now

diff --git a/lib/packagekit-qt2/transaction.cpp b/lib/packagekit-qt2/transaction.cpp
index b87bf7d..6ea12cf 100644
--- a/lib/packagekit-qt2/transaction.cpp
+++ b/lib/packagekit-qt2/transaction.cpp
@@ -374,15 +374,7 @@ void Transaction::getDepends(const Package &package, Transaction::Filters filter
 
 void Transaction::getDetails(const QList<Package> &packages)
 {
-    Q_D(Transaction);
-    foreach (const Package &package, packages) {
-        d->packageMap.insert(package.id(), package);
-    }
-
-    QDBusPendingReply<> r = d->p->GetDetails(Util::packageListToPids(packages));
-    r.waitForFinished();
-
-    CHECK_TRANSACTION
+    RUN_TRANSACTION(GetDetails(Util::packageListToPids(packages)))
 }
 
 void Transaction::getDetails(const Package &package)
diff --git a/lib/packagekit-qt2/transactionprivate.h b/lib/packagekit-qt2/transactionprivate.h
index 9d1d2a8..95cca72 100644
--- a/lib/packagekit-qt2/transactionprivate.h
+++ b/lib/packagekit-qt2/transactionprivate.h
@@ -56,9 +56,6 @@ protected:
     // used for both old and destroyed transactions
     bool destroyed;
 
-    // Used for getDetails
-    QHash<QString, Package> packageMap;
-
     Transaction::InternalError error;
 
 protected Q_SLOTS:
commit 6f2c444049e1772529fcb37712125f2e30bbae1b
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed May 4 10:55:37 2011 +0100

    trivial: post release version bump

diff --git a/RELEASE b/RELEASE
index fe6c9e6..770ab4e 100644
--- a/RELEASE
+++ b/RELEASE
@@ -2,10 +2,10 @@ PackageKit Release Notes
 
 1. Write NEWS entries for PackageKit in the same format as usual.
 
-git shortlog PACKAGEKIT_0_6_13.. | grep -i -v trivial | grep -v Merge > NEWS.new
+git shortlog PACKAGEKIT_0_6_14.. | grep -i -v trivial | grep -v Merge > NEWS.new
 
 --------------------------------------------------------------------------------
-Version 0.6.14
+Version 0.6.15
 ~~~~~~~~~~~~~~
 Released: 2011-xx-xx
 
@@ -30,8 +30,8 @@ tx pull --all
 
 4. Commit changes in PackageKit git:
 
-git commit -a -m "Release version 0.6.14"
-git tag -s -f -m "Release 0.6.14" PACKAGEKIT_0_6_14
+git commit -a -m "Release version 0.6.15"
+git tag -s -f -m "Release 0.6.15" PACKAGEKIT_0_6_15
 <gpg password>
 git push --tags
 git push
@@ -57,7 +57,7 @@ tx push --source
 10. Send an email to packagekit at lists.freedesktop.org
 
 =================================================
-Subject: PackageKit 0.6.14 released!
+Subject: PackageKit 0.6.15 released!
 
 Tarballs available here: http://www.packagekit.org/releases/
 
diff --git a/configure.ac b/configure.ac
index 3f80f51..79e7a2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ(2.63)
 
 m4_define([pk_major_version], [0])
 m4_define([pk_minor_version], [6])
-m4_define([pk_micro_version], [14])
+m4_define([pk_micro_version], [15])
 m4_define([pk_version],
           [pk_major_version.pk_minor_version.pk_micro_version])
 


More information about the PackageKit-commit mailing list