[gnome-packagekit] Only return newest available packages when we request firmware
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Only return newest available packages when we request firmware
- Date: Wed, 19 Aug 2009 11:51:48 +0000 (UTC)
commit 5786f0f5e5e372c4e1b38651b9942f101626f468
Author: Richard Hughes <richard hughsie com>
Date: Wed Aug 19 09:36:57 2009 +0100
Only return newest available packages when we request firmware
src/gpk-firmware.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gpk-firmware.c b/src/gpk-firmware.c
index 2b06354..e55ae5a 100644
--- a/src/gpk-firmware.c
+++ b/src/gpk-firmware.c
@@ -126,6 +126,7 @@ gpk_firmware_check_available (GpkFirmware *firmware, const gchar *filename)
PkPackageList *list = NULL;
GError *error = NULL;
PkPackageObj *obj = NULL;
+ PkBitfield filter;
/* actually check we can provide the firmware */
ret = pk_client_reset (firmware->priv->client_primary, &error);
@@ -134,7 +135,10 @@ gpk_firmware_check_available (GpkFirmware *firmware, const gchar *filename)
g_error_free (error);
goto out;
}
- ret = pk_client_search_file (firmware->priv->client_primary, pk_bitfield_value (PK_FILTER_ENUM_NOT_INSTALLED), filename, &error);
+
+ /* search for newest not installed package */
+ filter = pk_bitfield_from_enums (PK_FILTER_ENUM_NOT_INSTALLED, PK_FILTER_ENUM_NEWEST, -1);
+ ret = pk_client_search_file (firmware->priv->client_primary, filter, filename, &error);
if (!ret) {
egg_warning ("failed to search file %s: %s", filename, error->message);
g_error_free (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]