[PackageKit-commit] packagekit: Branch 'PACKAGEKIT_0_6_X' - 11 commits

Richard Hughes hughsient at kemper.freedesktop.org
Mon Sep 5 06:39:04 PDT 2011


 NEWS                               |   25 ++++++++++++++++++++
 RELEASE                            |    8 +++---
 backends/aptcc/apt.cpp             |   46 +++++++++++++++++++++----------------
 backends/yum/yumBackend.py         |    6 ++--
 backends/zif/pk-backend-zif.c      |    6 ++--
 configure.ac                       |    4 +--
 contrib/browser-plugin/pk-main.c   |    4 +++
 docs/html/pk-download.html         |    1 
 lib/packagekit-glib2/pk-progress.c |    3 ++
 lib/packagekit-qt/src/Makefile.am  |    5 +---
 lib/packagekit-qt2/Makefile.am     |    1 
 src/pk-lsof.c                      |    8 +++---
 src/pk-transaction.c               |    4 ---
 13 files changed, 78 insertions(+), 43 deletions(-)

New commits:
commit e7c7919d305efbdecbfc8c28482b8e677fb399a5
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Sep 5 14:38:22 2011 +0100

    Release version 0.6.18

diff --git a/NEWS b/NEWS
index 5dbc455..81df948 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,28 @@
+Version 0.6.18
+~~~~~~~~~~~~~~
+Released: 2011-09-05
+
+Notes:
+ - This update is suitable for stable distros and does not introduce new
+   functionality.
+ - If you want your dose of insanity, PackageKit 0.7.0 contains lots of
+   exciting new code that needs testing.
+
+Libraries:
+ - glib: Fix a small memory leak (Garrett Regier)
+ - qt: Do not dist the moc files (Richard Hughes)
+
+Backends:
+ - aptcc: Fix the size by emitting installed and download size (Daniel Nicoletti)
+ - yum: Ignore missing obsoleted updates rather than failing the update (Richard Hughes)
+ - zif: Fix a fatal error when doing 'pkcon repo-list --filter=~devel' (Richard Hughes)
+
+Bugfixes:
+ - Fix the browser-plugin build with GTK+ < 2.24 (Frederic Crozat)
+ - Make the lsof plugin code support distros with /lib64 (Richard Hughes)
+ - Make the lsof plugin not lookup hostnames (Richard Hughes)
+ - Remove the duplicate 'The software is not from a trusted source' (Richard Hughes)
+
 Version 0.6.17
 ~~~~~~~~~~~~~~
 Released: 2011-08-01
diff --git a/configure.ac b/configure.ac
index 921b6c4..7e69311 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,7 @@ AC_SUBST(PK_VERSION)
 # AGE		If libpackagekit can be linked into executables which can be
 # 		built with previous versions of this library. Don't use.
 LT_CURRENT=14
-LT_REVISION=9
+LT_REVISION=10
 LT_AGE=0
 AC_SUBST(LT_CURRENT)
 AC_SUBST(LT_REVISION)
diff --git a/docs/html/pk-download.html b/docs/html/pk-download.html
index 4694008..f4bfbaf 100644
--- a/docs/html/pk-download.html
+++ b/docs/html/pk-download.html
@@ -72,6 +72,7 @@ Releases are normally on the first working Monday of each month.
 </p>
 <table>
 <tr><td><b>Version</b></td><td>&nbsp;&nbsp;</td><td><b>Date</b></td></tr>
+<tr><td>0.6.18</td><td></td><td>2011-09-05</td></tr>
 <tr><td>0.6.17</td><td></td><td>2011-08-01</td></tr>
 <tr><td>0.6.16</td><td></td><td>2011-07-04</td></tr>
 <tr><td>0.6.15</td><td></td><td>2011-06-07</td></tr>
commit 95f804aadf5bc763e80bf55beefdef4b7447a190
Author: Frederic Crozat <fcrozat at suse.com>
Date:   Fri Sep 2 13:00:57 2011 +0200

    browser-plugin: Fix build with GTK+ < 2.24

diff --git a/contrib/browser-plugin/pk-main.c b/contrib/browser-plugin/pk-main.c
index 4f6fc75..072a576 100644
--- a/contrib/browser-plugin/pk-main.c
+++ b/contrib/browser-plugin/pk-main.c
@@ -219,7 +219,11 @@ pk_main_create_window (PkPlugin *plugin)
 		}
 
 		/* get parent */
+#if GTK_CHECK_VERSION(2,24,0)
 		parent = gdk_x11_window_foreign_new_for_display (display, xwindow);
+#else
+		parent = gdk_window_foreign_new (xwindow);
+#endif
 		if (parent == NULL) {
 			pk_debug ("invalid window given for setup (id %lu)\n", xwindow);
 			return;
commit 3faed3376e835b83b09a46915fd8f94d77b195ab
Author: Daniel Nicoletti <dantti85-pk at yahoo.com.br>
Date:   Tue Aug 23 12:16:49 2011 -0300

    aptcc: Fix the size of the packages by emitting installedSize when installed and download size when available.

diff --git a/backends/aptcc/apt.cpp b/backends/aptcc/apt.cpp
index 694b098..e971133 100644
--- a/backends/aptcc/apt.cpp
+++ b/backends/aptcc/apt.cpp
@@ -466,33 +466,41 @@ void aptcc::povidesCodec(vector<pair<pkgCache::PkgIterator, pkgCache::VerIterato
 // used to emit packages it collects all the needed info
 void aptcc::emit_details(const pkgCache::PkgIterator &pkg, const pkgCache::VerIterator &version)
 {
-	pkgCache::VerIterator ver;
+    pkgCache::VerIterator ver;
     if (version.end() == false) {
         ver = version;
     } else {
         ver = find_ver(pkg);
     }
-	std::string section = ver.Section() == NULL ? "" : ver.Section();
+    std::string section = ver.Section() == NULL ? "" : ver.Section();
 
-	size_t found;
-	found = section.find_last_of("/");
-	section = section.substr(found + 1);
+    size_t found;
+    found = section.find_last_of("/");
+    section = section.substr(found + 1);
 
-	pkgCache::VerFileIterator vf = ver.FileList();
-	pkgRecords::Parser &rec = packageRecords->Lookup(vf);
+    pkgCache::VerFileIterator vf = ver.FileList();
+    pkgRecords::Parser &rec = packageRecords->Lookup(vf);
 
-	gchar *package_id;
-	package_id = pk_package_id_build(pkg.Name(),
-					 ver.VerStr(),
-					 ver.Arch(),
-					 vf.File().Archive() == NULL ? "" : vf.File().Archive());
-	pk_backend_details(m_backend,
-			   package_id,
-			   "unknown",
-			   get_enum_group(section),
-			   get_long_description_parsed(ver, packageRecords).c_str(),
-			   rec.Homepage().c_str(),
-			   ver->Size);
+    long size;
+    if (pkg->CurrentState == pkgCache::State::Installed && pkg.CurrentVer() == ver) {
+        // if the package is installed emit the installed size
+        size = ver->InstalledSize;
+    } else {
+        size = ver->Size;
+    }
+
+    gchar *package_id;
+    package_id = pk_package_id_build(pkg.Name(),
+                                     ver.VerStr(),
+                                     ver.Arch(),
+                                     vf.File().Archive() == NULL ? "" : vf.File().Archive());
+    pk_backend_details(m_backend,
+                       package_id,
+                       "unknown",
+                       get_enum_group(section),
+                       get_long_description_parsed(ver, packageRecords).c_str(),
+                       rec.Homepage().c_str(),
+                       size);
 }
 
 // used to emit packages it collects all the needed info
commit 29994e6512b78f9ab15e2ed65cda5c11a61c4a0d
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Aug 12 01:25:45 2011 +0200

    plugin: Make lsof use the '-n' option to avoid looking up hostnames
    
    This makes running lsof a couple of orders of magnitude quicker.

diff --git a/src/pk-lsof.c b/src/pk-lsof.c
index 85551e9..388812b 100644
--- a/src/pk-lsof.c
+++ b/src/pk-lsof.c
@@ -166,7 +166,7 @@ pk_lsof_refresh (PkLsof *lsof)
 	}
 
 	/* run lsof to get all data */
-	lsof_cmd = g_strconcat (lsof_name, " ", "-Fpfn", NULL);
+	lsof_cmd = g_strjoin (" ", lsof_name, "-Fpfn", "-n", NULL);
 	ret = g_spawn_command_line_sync (lsof_cmd, &stdout, &stderr, NULL, &error);
 	if (!ret) {
 		g_warning ("failed to get pids: %s", error->message);
commit 21bc7ef6e881f2b825248432995822b4708f066e
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Aug 12 01:26:34 2011 +0200

    Make the lsof plugin code support distros such as Fedora with /lib64

diff --git a/src/pk-lsof.c b/src/pk-lsof.c
index 1755c13..85551e9 100644
--- a/src/pk-lsof.c
+++ b/src/pk-lsof.c
@@ -210,7 +210,7 @@ pk_lsof_refresh (PkLsof *lsof)
 					break;
 
 				/* not a system library */
-				if (strstr (value, "/lib/") == NULL)
+				if (strstr (value, "/lib") == NULL)
 					break;
 
 				/* not a shared object */
@@ -266,8 +266,8 @@ pk_lsof_get_pids_for_filenames (PkLsof *lsof, gchar **filenames)
 	for (i=0; filenames[i] != NULL; i++) {
 		for (j=0; j < list_data->len; j++) {
 			data = g_ptr_array_index (list_data, j);
-			g_debug ("got %s", data->filename);
-			if (g_strcmp0 (filenames[i], data->filename) == 0) {
+			if (g_str_has_prefix (filenames[i], data->filename) == 0 ||
+			    g_str_has_prefix (data->filename, filenames[i]) == 0) {
 				pk_lsof_add_pid (pids, data->pid);
 			}
 		}
commit 0eab40e8213a40bb25677bdff53a75fe4d01c387
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Aug 16 12:16:10 2011 +0100

    Remove the duplicate 'The software is not from a trusted source' authentication line when updating

diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index d898ae4..77b6fd6 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -2614,10 +2614,6 @@ pk_transaction_obtain_authorization (PkTransaction *transaction, gboolean only_t
 		/* UpdatePackages */
 		if (priv->role == PK_ROLE_ENUM_UPDATE_PACKAGES) {
 
-			/* TRANSLATORS: is not GPG signed */
-			g_string_append (string, g_dgettext (GETTEXT_PACKAGE, N_("The software is not from a trusted source.")));
-			g_string_append (string, "\n");
-
 			/* TRANSLATORS: user has to trust provider -- I know, this sucks */
 			text = g_dngettext (GETTEXT_PACKAGE,
 					    N_("Do not update this package unless you are sure it is safe to do so."),
commit c24bd97a8a3f2018375bbeecd727e5814b0d5ff7
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Aug 16 12:16:52 2011 +0100

    zif: Fix a fatal error when doing 'pkcon repo-list --filter=~devel'

diff --git a/backends/zif/pk-backend-zif.c b/backends/zif/pk-backend-zif.c
index 24b78a5..818c96c 100644
--- a/backends/zif/pk-backend-zif.c
+++ b/backends/zif/pk-backend-zif.c
@@ -4463,9 +4463,9 @@ pk_backend_get_repo_list_thread (PkBackend *backend)
 			/* devel, name, enabled */
 			ret = zif_state_set_steps (state_loop,
 						   NULL,
-						   50, /* is store devel? */
-						   50, /* get name */
-						   50, /* get enabled */
+						   60, /* is store devel? */
+						   20, /* get name */
+						   20, /* get enabled */
 						   -1);
 			g_assert (ret);
 
commit da6f6b3119376eba08c126f143b4a000fa351914
Author: Garrett Regier <garrettregier at gmail.com>
Date:   Mon Aug 22 02:48:02 2011 -0700

    Free the PkProgress' package
    
    Signed-off-by: Richard Hughes <richard at hughsie.com>

diff --git a/lib/packagekit-glib2/pk-progress.c b/lib/packagekit-glib2/pk-progress.c
index c00c255..951813b 100644
--- a/lib/packagekit-glib2/pk-progress.c
+++ b/lib/packagekit-glib2/pk-progress.c
@@ -637,6 +637,9 @@ pk_progress_finalize (GObject *object)
 {
 	PkProgress *progress = PK_PROGRESS (object);
 
+	if (progress->priv->package != NULL)
+		g_object_unref (progress->priv->package);
+
 	g_free (progress->priv->package_id);
 	g_free (progress->priv->transaction_id);
 
commit df31de293c20c9cce1324ceab91d9e6e9cdc371c
Author: Richard Hughes <richard at hughsie.com>
Date:   Thu Aug 4 15:54:43 2011 +0100

    yum: Ignore missing obsoleted updates rather than failing the update
    
    This should fix upgrading packages that both provide a subpackage and obsolete
    the very same subpackage as well.
    
    It appears yum also treats this as a non-fatal error, so turn the error into a
    message (which is ignored by the frontends by default).

diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 5c2800a..5f1d040 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -2343,9 +2343,9 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
                     except Exception, e:
                         self.error(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
                     if not txmbr:
-                        self.error(ERROR_TRANSACTION_ERROR, "could not add package update for %s: %s" % (_format_package_id(package_id), pkg), exit=False)
-                        return
-                    txmbrs.extend(txmbr)
+                        self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, "could not add package update for %s: %s" % (_format_package_id(package_id), pkg))
+                    else:
+                        txmbrs.extend(txmbr)
         except yum.Errors.RepoError, e:
             self.error(ERROR_REPO_NOT_AVAILABLE, _to_unicode(e), exit=False)
         except Exception, e:
commit 76fb98ed4a80888a0a961452b9da5e21b6145347
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Aug 2 11:22:34 2011 +0100

    qt: Do not dist the moc files, as this causes build failures with newer versions of QT

diff --git a/lib/packagekit-qt/src/Makefile.am b/lib/packagekit-qt/src/Makefile.am
index 82b0df3..ce6c642 100644
--- a/lib/packagekit-qt/src/Makefile.am
+++ b/lib/packagekit-qt/src/Makefile.am
@@ -88,12 +88,11 @@ clean-local:
 	rm -f $(CLEANFILES)
 
 EXTRA_DIST =							\
-	$(MOCFILES)							\
-	dbus_proxies.stamp                  \
+	dbus_proxies.stamp					\
 	daemonproxy.h						\
 	daemonproxy.cpp						\
 	transactionproxy.h					\
-	transactionproxy.cpp				\
+	transactionproxy.cpp					\
 	$(NULL)
 
 MAINTAINERCLEANFILES =						\
diff --git a/lib/packagekit-qt2/Makefile.am b/lib/packagekit-qt2/Makefile.am
index cecfa60..08fdc59 100644
--- a/lib/packagekit-qt2/Makefile.am
+++ b/lib/packagekit-qt2/Makefile.am
@@ -95,7 +95,6 @@ clean-local:
 	rm -f $(CLEANFILES)
 
 EXTRA_DIST =							\
-	$(MOCFILES)						\
 	dbus_proxies.stamp					\
 	daemonproxy.h						\
 	daemonproxy.cpp						\
commit 899dcef7133bc220b65bb33cd063be7ec4973eef
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Aug 1 12:28:35 2011 +0100

    trivial: post release version bump

diff --git a/RELEASE b/RELEASE
index df4f63d..d7f7ca3 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_16.. | grep -i -v trivial | grep -v Merge > NEWS.new
+git shortlog PACKAGEKIT_0_6_17.. | grep -i -v trivial | grep -v Merge > NEWS.new
 
 --------------------------------------------------------------------------------
-Version 0.6.17
+Version 0.6.18
 ~~~~~~~~~~~~~~
 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.17"
-git tag -s -f -m "Release 0.6.17" PACKAGEKIT_0_6_17
+git commit -a -m "Release version 0.6.18"
+git tag -s -f -m "Release 0.6.18" PACKAGEKIT_0_6_18
 <gpg password>
 git push --tags
 git push
diff --git a/configure.ac b/configure.ac
index f8e254d..921b6c4 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], [17])
+m4_define([pk_micro_version], [18])
 m4_define([pk_version],
           [pk_major_version.pk_minor_version.pk_micro_version])
 


More information about the PackageKit-commit mailing list