diff --git a/.cvsignore b/.cvsignore index 0b318b5..d9b54fb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -PackageKit-0.3.8.tar.gz +PackageKit-0.3.9.tar.gz diff --git a/PackageKit.spec b/PackageKit.spec index 200ea58..39600dd 100644 --- a/PackageKit.spec +++ b/PackageKit.spec @@ -7,23 +7,17 @@ Summary: System daemon that is a DBUS abstraction layer for package management Name: PackageKit -Version: 0.3.8 -Release: 6%{?dist} +Version: 0.3.9 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Libraries URL: http://packagekit.freedesktop.org Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -# upstream: 85afc2b5cc7e68c8184ae4ca7df4e1d7ed1d5258 -Patch0: pk-fix-pkcon-resolve.patch - -# upstream: 14aad0ff9d049e1843e263993cd00a24812abd97 -Patch1: pk-use-servicepack-type.patch - # Fedora-specific # Set Vendor.conf up for Fedora. -Patch2: PackageKit-0.3.8-Fedora-Vendor.conf.patch +Patch0: PackageKit-0.3.8-Fedora-Vendor.conf.patch Requires: dbus >= %{dbus_version} Requires: dbus-glib >= %{dbus_glib_version} @@ -206,8 +200,6 @@ codecs from configured repositories using PackageKit. %prep %setup -q %patch0 -p1 -%patch1 -p1 -%patch2 -p1 %build %configure --enable-yum --enable-smart --with-default-backend=yum --disable-local @@ -380,6 +372,11 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %{_includedir}/PackageKit/backend/*.h %changelog +* Mon Oct 27 2008 Richard Hughes - 0.3.9-1 +- New upstream version +- Many new and updated translations. +- Lots of bugfixes (#468486, #466006, #468602), no new features. + * Fri Oct 24 2008 Tom "spot" Callaway 0.3.8-6 - Customize Vendor.conf for Fedora diff --git a/pk-fix-pkcon-resolve.patch b/pk-fix-pkcon-resolve.patch deleted file mode 100644 index f1ac8ae..0000000 --- a/pk-fix-pkcon-resolve.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit 85afc2b5cc7e68c8184ae4ca7df4e1d7ed1d5258 -Author: Richard Hughes -Date: Thu Oct 23 12:08:50 2008 +0100 - - bugfix: don't reuse a variable to check for installed, else we fail the resolve in pkcon - -diff --git a/client/pk-console.c b/client/pk-console.c -index 78ff544..8a0af52 100644 ---- a/client/pk-console.c -+++ b/client/pk-console.c -@@ -553,6 +553,7 @@ static gboolean - pk_console_install_stuff (PkClient *client, gchar **packages, GError **error) - { - gboolean ret = TRUE; -+ gboolean installed; - gboolean is_local; - gchar *package_id = NULL; - gchar **package_ids = NULL; -@@ -573,8 +574,8 @@ pk_console_install_stuff (PkClient *client, gchar **packages, GError **error) - g_ptr_array_add (array_files, g_strdup (packages[i])); - } else { - /* if already installed, then abort */ -- ret = pk_console_is_installed (packages[i]); -- if (ret) { -+ installed = pk_console_is_installed (packages[i]); -+ if (installed) { - /* TRANSLATORS: The package is already installed on the system */ - *error = g_error_new (1, 0, _("The package '%s' is already installed"), packages[i]); - ret = FALSE; diff --git a/pk-use-servicepack-type.patch b/pk-use-servicepack-type.patch deleted file mode 100644 index 436432a..0000000 --- a/pk-use-servicepack-type.patch +++ /dev/null @@ -1,242 +0,0 @@ -commit 14aad0ff9d049e1843e263993cd00a24812abd97 -Author: Richard Hughes -Date: Thu Oct 23 17:37:15 2008 +0100 - - bugfix: add a type= key to metadata.conf so we can tell if the service pack is an update or install pack. Also return the error if the service pack is invalid. - -diff --git a/lib/packagekit-glib/pk-service-pack.c b/lib/packagekit-glib/pk-service-pack.c -index 85e284a..129d130 100644 ---- a/lib/packagekit-glib/pk-service-pack.c -+++ b/lib/packagekit-glib/pk-service-pack.c -@@ -45,12 +45,19 @@ - - #define PK_SERVICE_PACK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_SERVICE_PACK, PkServicePackPrivate)) - -+typedef enum { -+ PK_SERVICE_PACK_TYPE_UPDATE, -+ PK_SERVICE_PACK_TYPE_INSTALL, -+ PK_SERVICE_PACK_TYPE_UNKNOWN -+} PkServicePackType; -+ - struct PkServicePackPrivate - { - PkPackageList *exclude_list; - gchar *filename; - gchar *directory; - PkClient *client; -+ PkServicePackType type; - }; - - typedef enum { -@@ -105,28 +112,46 @@ pk_service_pack_error_get_type (void) - * pk_service_pack_check_metadata_file: - **/ - static gboolean --pk_service_pack_check_metadata_file (const gchar *full_path) -+pk_service_pack_check_metadata_file (const gchar *full_path, GError **error) - { - GKeyFile *file; - gboolean ret; -- GError *error = NULL; -+ GError *error_local = NULL; -+ gchar *type = NULL; - gchar *distro_id = NULL; - gchar *distro_id_us = NULL; - - /* load the file */ - file = g_key_file_new (); -- ret = g_key_file_load_from_file (file, full_path, G_KEY_FILE_NONE, &error); -+ ret = g_key_file_load_from_file (file, full_path, G_KEY_FILE_NONE, &error_local); - if (!ret) { -- egg_warning ("failed to load file: %s", error->message); -- g_error_free (error); -+ *error = g_error_new (1, 0, "failed to load file: %s", error_local->message); -+ g_error_free (error_local); - goto out; - } - - /* read the value */ -- distro_id = g_key_file_get_string (file, PK_SERVICE_PACK_GROUP_NAME, "distro_id", &error); -- if (!ret) { -- egg_warning ("failed to get value: %s", error->message); -- g_error_free (error); -+ distro_id = g_key_file_get_string (file, PK_SERVICE_PACK_GROUP_NAME, "distro_id", &error_local); -+ if (distro_id == NULL) { -+ *error = g_error_new (1, 0, "failed to get value: %s", error_local->message); -+ g_error_free (error_local); -+ ret = FALSE; -+ goto out; -+ } -+ -+ /* read the value */ -+ type = g_key_file_get_string (file, PK_SERVICE_PACK_GROUP_NAME, "type", &error_local); -+ if (type == NULL) { -+ *error = g_error_new (1, 0, "failed to get type: %s", error_local->message); -+ g_error_free (error_local); -+ ret = FALSE; -+ goto out; -+ } -+ -+ /* check the types we support */ -+ if (!egg_strequal (type, "update") && !egg_strequal (type, "install")) { -+ *error = g_error_new (1, 0, "does not have correct type key: %s", type); -+ ret = FALSE; - goto out; - } - -@@ -135,9 +160,12 @@ pk_service_pack_check_metadata_file (const gchar *full_path) - - /* do we match? */ - ret = egg_strequal (distro_id_us, distro_id); -+ if (!ret) -+ *error = g_error_new (1, 0, "distro id did not match %s == %s", distro_id_us, distro_id); - - out: - g_key_file_free (file); -+ g_free (type); - g_free (distro_id); - g_free (distro_id_us); - return ret; -@@ -338,10 +366,11 @@ pk_service_pack_check_valid (PkServicePack *pack, GError **error) - while ((filename_entry = g_dir_read_name (dir))) { - metafile = g_build_filename (directory, filename_entry, NULL); - if (egg_strequal (filename_entry, "metadata.conf")) { -- ret = pk_service_pack_check_metadata_file (metafile); -+ ret = pk_service_pack_check_metadata_file (metafile, &error_local); - if (!ret) { - *error = g_error_new (PK_SERVICE_PACK_ERROR, PK_SERVICE_PACK_ERROR_NOT_COMPATIBLE, -- "Service Pack %s not compatible with your distro", pack->priv->filename); -+ "Service Pack %s not compatible with your distro: %s", pack->priv->filename, error_local->message); -+ g_error_free (error_local); - ret = FALSE; - goto out; - } -@@ -481,7 +510,7 @@ pk_service_pack_exclude_packages (PkServicePack *pack, PkPackageList *list) - * pk_service_pack_create_metadata_file: - **/ - static gboolean --pk_service_pack_create_metadata_file (const gchar *filename) -+pk_service_pack_create_metadata_file (PkServicePack *pack, const gchar *filename) - { - gboolean ret = FALSE; - gchar *distro_id = NULL; -@@ -490,7 +519,9 @@ pk_service_pack_create_metadata_file (const gchar *filename) - GKeyFile *file = NULL; - gchar *data = NULL; - -+ g_return_val_if_fail (PK_IS_SERVICE_PACK (pack), FALSE); - g_return_val_if_fail (filename != NULL, FALSE); -+ g_return_val_if_fail (pack->priv->type != PK_SERVICE_PACK_TYPE_UNKNOWN, FALSE); - - file = g_key_file_new (); - -@@ -505,6 +536,11 @@ pk_service_pack_create_metadata_file (const gchar *filename) - g_key_file_set_string (file, PK_SERVICE_PACK_GROUP_NAME, "distro_id", distro_id); - g_key_file_set_string (file, PK_SERVICE_PACK_GROUP_NAME, "created", iso_time); - -+ if (pack->priv->type == PK_SERVICE_PACK_TYPE_INSTALL) -+ g_key_file_set_string (file, PK_SERVICE_PACK_GROUP_NAME, "type", "install"); -+ else if (pack->priv->type == PK_SERVICE_PACK_TYPE_UPDATE) -+ g_key_file_set_string (file, PK_SERVICE_PACK_GROUP_NAME, "type", "update"); -+ - /* convert to text */ - data = g_key_file_to_data (file, NULL, &error); - if (data == NULL) { -@@ -618,7 +654,7 @@ pk_service_pack_create_from_files (PkServicePack *pack, GPtrArray *file_array, G - - /* create a file with metadata in it */ - filename = g_build_filename (g_get_tmp_dir (), "metadata.conf", NULL); -- ret = pk_service_pack_create_metadata_file (filename); -+ ret = pk_service_pack_create_metadata_file (pack, filename); - if (!ret) { - *error = g_error_new (PK_SERVICE_PACK_ERROR, PK_SERVICE_PACK_ERROR_FAILED_CREATE, - "failed to generate metadata file %s", filename); -@@ -751,17 +787,10 @@ pk_service_pack_setup_client (PkServicePack *pack) - } - - /** -- * pk_service_pack_create_for_package_ids: -- * @pack: a valid #PkServicePack instance -- * @package_ids: A list of package_ids to download -- * @error: a %GError to put the error code and message in, or %NULL -- * -- * Adds the packages specified to a service pack. -- * -- * Return value: %TRUE if the service pack was created successfully -+ * pk_service_pack_create_for_package_ids_internal: - **/ --gboolean --pk_service_pack_create_for_package_ids (PkServicePack *pack, gchar **package_ids, GError **error) -+static gboolean -+pk_service_pack_create_for_package_ids_internal (PkServicePack *pack, gchar **package_ids, GError **error) - { - gchar **package_ids_deps = NULL; - PkPackageList *list = NULL; -@@ -818,6 +847,7 @@ pk_service_pack_create_for_package_ids (PkServicePack *pack, gchar **package_ids - - /* list deps */ - length = pk_package_list_get_size (list); -+ g_print ("Downloading %i packages for dependencies.\n", length); - for (i=0; ipriv->type = PK_SERVICE_PACK_TYPE_INSTALL; -+ return pk_service_pack_create_for_package_ids_internal (pack, package_ids, error); -+} -+ -+/** - * pk_service_pack_create_for_package_id: - * @pack: a valid #PkServicePack instance - * @package_id: A single package_id to download -@@ -891,7 +940,8 @@ pk_service_pack_create_for_package_id (PkServicePack *pack, const gchar *package - g_return_val_if_fail (pack->priv->directory != NULL, FALSE); - - package_ids = pk_package_ids_from_id (package_id); -- ret = pk_service_pack_create_for_package_ids (pack, package_ids, error); -+ pack->priv->type = PK_SERVICE_PACK_TYPE_INSTALL; -+ ret = pk_service_pack_create_for_package_ids_internal (pack, package_ids, error); - g_strfreev (package_ids); - return ret; - } -@@ -954,7 +1004,9 @@ pk_service_pack_create_for_updates (PkServicePack *pack, GError **error) - - package_ids = pk_package_list_to_strv (list); - g_object_unref (list); -- ret = pk_service_pack_create_for_package_ids (pack, package_ids, error); -+ -+ pack->priv->type = PK_SERVICE_PACK_TYPE_UPDATE; -+ ret = pk_service_pack_create_for_package_ids_internal (pack, package_ids, error); - out: - g_strfreev (package_ids); - return ret; -@@ -1032,10 +1084,12 @@ pk_service_pack_init (PkServicePack *pack) - pack->priv->exclude_list = NULL; - pack->priv->filename = NULL; - pack->priv->directory = NULL; -+ pack->priv->type = PK_SERVICE_PACK_TYPE_UNKNOWN; - } - - /** - * pk_service_pack_new: -+ * - * Return value: A new service_pack class instance. - **/ - PkServicePack * diff --git a/sources b/sources index 868264f..214f1d3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5ed61e834fb18ec8d10b2c52ee6320a4 PackageKit-0.3.8.tar.gz +c13ecaa4cb300802e9f72d60db7b759c PackageKit-0.3.9.tar.gz