I have made the following changes intended for : CE:MW:Shared / PackageKit
Please review and accept or decline. BOSS has already run some checks on this request. See the "Messages from BOSS" section below. https://build.pub.meego.com//request/show/3108 Thank You, bossbot ([email protected]) [This message was auto-generated] --- Request # 3108: Messages from BOSS: Could not notify CE-maintainers (no address found) State: review 2011-11-17T09:33:10 bossbot Reviews: accepted by bossbot : Prechecks completed; none failed. new by None Changes: submit: home:sage:branches:CE:MW:Shared / PackageKit -> CE:MW:Shared / PackageKit Index: PackageKit.changes =================================================================== --- PackageKit.changes (revision 1) +++ PackageKit.changes (revision 5) @@ -1,3 +1,6 @@ +* Thu Nov 17 2011 Marko Saukko <[email protected]> - 0.6.20 +- Update to 0.6.20 to fix build with newer glib2. + * Thu Sep 29 2011 Marko Saukko <[email protected]> - 0.6.16 - Removed docs and gtk dependencies. Index: PackageKit.spec =================================================================== --- PackageKit.spec (revision 1) +++ PackageKit.spec (revision 5) @@ -6,12 +6,13 @@ Summary: Package management service Name: PackageKit -Version: 0.6.16 +Version: 0.6.20 Release: 1 License: GPLv2+ Group: System/Libraries URL: http://www.packagekit.org Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.xz +Source1: boss.conf Patch1: 0001-MeeGo-vendor.patch Patch2: 0002-MeeGo-preupgrade-support.patch @@ -21,7 +22,6 @@ Patch7: 0007-MeeGo-set-connman-as-the-network-backend.patch Patch8: 0008-pk-console-refresh-cache-before-install-packages.patch Patch9: 0009-pk-console-support-subpercentage-for-pkcon.patch -#Patch10: 0010-zypp-Cancel-support-for-download-install-packages.patch Patch11: 0011-Add-ZYpp.conf.patch Patch12: 0012-revert-patch-while-removing.patch Patch13: 0013-zypp-use-package-mediafile-as-package_id-while-downloading.patch @@ -30,20 +30,16 @@ Requires: PackageKit-zypp = %{version}-%{release} Requires: shared-mime-info Requires: connman -#Requires: pm-utils BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: dbus-devel >= %{dbus_version} BuildRequires: dbus-glib-devel >= %{dbus_glib_version} BuildRequires: pam-devel BuildRequires: libX11-devel -#BuildRequires: xmlto BuildRequires: sqlite-devel BuildRequires: connman-devel BuildRequires: polkit-devel >= %{policykit_version} BuildRequires: libtool -#BuildRequires: docbook-utils -#BuildRequires: gnome-doc-utils BuildRequires: python-devel BuildRequires: perl(XML::Parser) BuildRequires: intltool @@ -52,14 +48,11 @@ BuildRequires: libarchive-devel BuildRequires: gstreamer-devel BuildRequires: gst-plugins-base-devel -#BuildRequires: cppunit-devel BuildRequires: pango-devel BuildRequires: fontconfig-devel BuildRequires: libzypp-devel >= 5.20.0 -#BuildRequires: pm-utils-devel BuildRequires: qt-devel BuildRequires: bzip2-devel -#BuildRequires: gtk2-devel %description PackageKit is a D-Bus abstraction layer that allows the session user Index: PackageKit-0.6.20.tar.xz =================================================================== Binary files PackageKit-0.6.20.tar.xz (revision 5) added Index: 0010-zypp-Cancel-support-for-download-install-packages.patch =================================================================== --- 0010-zypp-Cancel-support-for-download-install-packages.patch (revision 1) +++ 0010-zypp-Cancel-support-for-download-install-packages.patch (deleted) @@ -1,768 +0,0 @@ -From 9379deb9ca41937b1c20de56ec7a0d5345ca066b Mon Sep 17 00:00:00 2001 -From: Zhang Qiang <[email protected]> -Date: Mon, 18 Apr 2011 16:47:12 +0800 -Subject: [PATCH 18/18] zypp:Cancel support for download/install packages - ---- - backends/zypp/pk-backend-zypp.cpp | 165 +++++++++++++++------- - backends/zypp/zypp-events.h | 91 +++++++++++-- - backends/zypp/zypp-utils.cpp | 279 +++++++++++++++++++++++++++++++------ - backends/zypp/zypp-utils.h | 3 + - src/pk-transaction.c | 8 +- - 5 files changed, 442 insertions(+), 104 deletions(-) - -diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp -index d7a4a82..b9930b5 100644 ---- a/backends/zypp/pk-backend-zypp.cpp -+++ b/backends/zypp/pk-backend-zypp.cpp -@@ -24,6 +24,8 @@ - #include <pk-backend.h> - #include <pk-backend-spawn.h> - #include <unistd.h> -+#include <sys/types.h> -+#include <sys/wait.h> - #include <string> - #include <set> - #include <glib/gi18n.h> -@@ -80,6 +82,8 @@ static std::map<PkBackend *, EventDirector *> _eventDirectors; - - std::map<PkBackend *, std::vector<std::string> *> _signatures; - -+pid_t m_child_pid; -+int read_from_child_fd; - /** - * pk_backend_get_description: - */ -@@ -1198,7 +1202,7 @@ void - pk_backend_install_packages (PkBackend *backend, gboolean only_trusted, gchar **package_ids) - { - // For now, don't let the user cancel the install once it's started -- pk_backend_set_allow_cancel (backend, FALSE); -+ pk_backend_set_allow_cancel (backend, TRUE); - pk_backend_thread_create (backend, backend_install_packages_thread); - } - -@@ -2077,8 +2081,19 @@ pk_backend_get_mime_types (PkBackend *backend) - return g_strdup ("application/x-rpm"); - } - -+/** -+ * pk_backend_cancel: -+ */ -+void -+pk_backend_cancel (PkBackend *backend) -+{ -+ if (m_child_pid > 0) { -+ kill (m_child_pid, SIGINT); -+ } -+} -+ - static gboolean - backend_download_packages_thread (PkBackend *backend) - { - gchar **package_ids; - gulong size = 0; - - if (!zypp_refresh_cache (backend, FALSE)) { - pk_backend_finished (backend); - return FALSE; -@@ -2098,3 +2113,3 @@ backend_download_packages_thread (PkBackend *backend) - package_ids = pk_backend_get_strv (backend, "package_ids"); - if (!pk_package_ids_check (package_ids)) { - return zypp_backend_finished_error ( - backend, PK_ERROR_ENUM_PACKAGE_ID_INVALID, "invalid package id"); - } -- -- try -- { -- zypp::ResPool pool = zypp_build_pool (backend, FALSE); -- zypp::PoolItem item; - -- pk_backend_set_status (backend, PK_STATUS_ENUM_DOWNLOAD); -- for (guint i = 0; package_ids[i]; i++) { -- gchar **id_parts = pk_package_id_split (package_ids[i]); -- std::string name = id_parts[PK_PACKAGE_ID_NAME]; -+ int readFromChildFD[2]; -+ int writeToChildFD[2]; - -- for (zypp::ResPool::byName_iterator it = pool.byNameBegin (name); it != pool.byNameEnd (name); it++) { -- if (zypp_ver_and_arch_equal (it->satSolvable(), id_parts[PK_PACKAGE_ID_VERSION], -- id_parts[PK_PACKAGE_ID_ARCH])) { -- size += 2 * it->satSolvable().lookupNumAttribute (zypp::sat::SolvAttr::downloadsize); -- item = *it; -- break; -+ if (pipe(readFromChildFD) < 0 || pipe(writeToChildFD) < 0) { -+ return NULL; -+ } -+ -+ m_child_pid = fork(); -+ -+ if (m_child_pid == -1) { -+ return NULL; -+ } -+ -+ if (m_child_pid == 0) { -+ close(0); -+ if (dup2(writeToChildFD[0], 0) != 0) { -+ close(readFromChildFD[1]); -+ close(writeToChildFD[0]); -+ _exit(1); -+ } -+ close (writeToChildFD[0]); -+ -+ close (1); -+ if (dup2(readFromChildFD[1], 1) != 1) { -+ close(readFromChildFD[1]); -+ close(writeToChildFD[0]); -+ _exit(1); -+ } -+ read_from_child_fd = readFromChildFD[1]; -+ -+ signal(SIGINT,SIG_DFL); -+ int ret = 0; -+ -+ -+ try -+ { -+ zypp::ResPool pool = zypp_build_pool (backend, FALSE); -+ zypp::PoolItem item; -+ -+ pk_backend_set_status (backend, PK_STATUS_ENUM_DOWNLOAD); -+ for (guint i = 0; package_ids[i]; i++) { -+ gchar **id_parts = pk_package_id_split (package_ids[i]); -+ std::string name = id_parts[PK_PACKAGE_ID_NAME]; -+ -+ for (zypp::ResPool::byName_iterator it = pool.byNameBegin (name); it != pool.byNameEnd (name); it++) { -+ if (zypp_ver_and_arch_equal (it->satSolvable(), id_parts[PK_PACKAGE_ID_VERSION], -+ id_parts[PK_PACKAGE_ID_ARCH])) { -+ size += it->satSolvable().lookupNumAttribute (zypp::sat::SolvAttr::installsize); -+ size += it->satSolvable().lookupNumAttribute (zypp::sat::SolvAttr::downloadsize); -+ item = *it; -+ break; -+ } - } -- } - -- struct statfs stat; -- statfs(pk_backend_get_root (backend), &stat); -- if (size > stat.f_bavail * 4) { -+ struct statfs stat; -+ statfs(pk_backend_get_root (backend), &stat); -+ if (size > stat.f_bavail * 4) { -+ g_strfreev (id_parts); -+ pk_backend_error_code (backend, PK_ERROR_ENUM_NO_SPACE_ON_DEVICE, -+ "Insufficient space in download directory '%s'.", pk_backend_get_root (backend)); -+ pk_backend_finished (backend); -+ return FALSE; -+ } -+ -+ zypp::sat::Solvable solvable = item.resolvable()->satSolvable(); -+ zypp::filesystem::Pathname tmp_file; -+ zypp::repo::RepoMediaAccess access; -+ zypp::repo::DeltaCandidates deltas; -+ if (strcmp (id_parts[PK_PACKAGE_ID_ARCH], "source") == 0) { -+ zypp::SrcPackage::constPtr package = zypp::asKind<zypp::SrcPackage>(item.resolvable()); -+ zypp::repo::SrcPackageProvider pkgProvider(access); -+ pkgProvider.provideSrcPackage(package); -+ tmp_file = solvable.repository().info().packagesPath()+ package->location().filename(); -+ -+ } else { -+ zypp::Package::constPtr package = zypp::asKind<zypp::Package>(item.resolvable()); -+ zypp::repo::PackageProvider pkgProvider(access, package, deltas); -+ pkgProvider.providePackage(); -+ tmp_file = solvable.repository().info().packagesPath()+ package->location().filename(); -+ } -+ pk_backend_files (backend, package_ids[i], tmp_file.c_str()); -+ zypp_backend_package (backend, PK_INFO_ENUM_DOWNLOADING, solvable, item->summary ().c_str()); -+ - g_strfreev (id_parts); -- pk_backend_error_code (backend, PK_ERROR_ENUM_NO_SPACE_ON_DEVICE, -- "Insufficient space in download directory '%s'.", pk_backend_get_root (backend)); -- pk_backend_finished (backend); -- return FALSE; - } -+ } catch (const zypp::Exception &ex) { -+ char msg[28]; -+ sprintf (msg, "\nTransaction Error:%d:%s\n", PK_ERROR_ENUM_PACKAGE_DOWNLOAD_FAILED, ex.asUserString().c_str()); -+ write (read_from_child_fd, msg, strlen (msg)); -+ } -+ _exit(0); -+ } - -- zypp::sat::Solvable solvable = item.resolvable()->satSolvable(); -- zypp::filesystem::Pathname tmp_file; -- zypp::repo::RepoMediaAccess access; -- zypp::repo::DeltaCandidates deltas; -- if (strcmp (id_parts[PK_PACKAGE_ID_ARCH], "source") == 0) { -- zypp::SrcPackage::constPtr package = zypp::asKind<zypp::SrcPackage>(item.resolvable()); -- zypp::repo::SrcPackageProvider pkgProvider(access); -- pkgProvider.provideSrcPackage(package); (569 more lines skipped) Index: Makefile =================================================================== --- Makefile (revision 1) +++ Makefile (deleted) @@ -1,6 +0,0 @@ -PKG_NAME := PackageKit -SPECFILE = $(addsuffix .spec, $(PKG_NAME)) -YAMLFILE = $(addsuffix .yaml, $(PKG_NAME)) - -include /usr/share/packaging-tools/Makefile.common - Index: PackageKit-0.6.16.tar.xz =================================================================== Binary files PackageKit-0.6.16.tar.xz (revision 1) deleted Index: PackageKit-sysconfig-cron.patch =================================================================== --- PackageKit-sysconfig-cron.patch (revision 1) +++ PackageKit-sysconfig-cron.patch (deleted) @@ -1,56 +0,0 @@ -Index: PackageKit-0.6.6/contrib/cron/packagekit-background -=================================================================== ---- PackageKit-0.6.6.orig/contrib/cron/packagekit-background -+++ PackageKit-0.6.6/contrib/cron/packagekit-background -@@ -1,18 +1,41 @@ --# should we attempt to do this? (valid: yes|no) -+## Path: System/Cron/PackageKit -+## Description: Cron job to update the system daily with PackageKit -+ -+## Type: yesno -+## Default: no -+# -+# Run the cron job. -+# - ENABLED=no - --# don't install, just check (valid: yes|no) -+## Type: yesno -+## Default: no -+# -+# Check if updates are available, instead of installing. -+# - CHECK_ONLY=no - --# if MAILTO is set, the mail command is used to deliver PackageKit output --# by default MAILTO is unset, so crond mails the output by itself --#MAILTO=root -+## Type: string -+## Default: "" -+# -+# If MAILTO is set, the mail command is used to deliver PackageKit output. -+# By default MAILTO is unset, so crond mails the output by itself. -+# -+MAILTO="" - --# you may set SYSTEM_NAME if you want your PackageKit emails tagged --# differently default is output of hostname command --#SYSTEM_NAME="" -+## Type: string -+## Default: "" -+# -+# You may set SYSTEM_NAME if you want your PackageKit emails tagged differently. -+# Default is output of hostname command. -+# -+SYSTEM_NAME="" - --# update checks will sleep random time before contacting the servers to -+## Type: integer -+## Default: 3600 -+# -+# Update checks will sleep random time before contacting the servers to - # avoid hammering them with thousands of request at the same time - this --# is the maximum sleep time (in seconds) for the random wait period -+# is the maximum sleep time (in seconds) for the random wait period. -+# - SLEEP_MAX=3600
