[PackageKit-commit] packagekit: Branch 'master' - 7 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Fri Sep 19 08:15:05 PDT 2008
backends/yum/yumBackend.py | 10 ++-
docs/html/img/gpk-application-search.png |binary
docs/html/img/gpk-progress.png |binary
docs/html/img/gpk-updates-overview.png |binary
docs/html/img/gpk-updates.png |binary
etc/PackageKit.conf.in | 8 +-
libpackagekit/egg-obj-list.c | 14 ++--
libpackagekit/egg-obj-list.h | 10 +--
libpackagekit/egg-test.c | 2
libpackagekit/pk-enum.c | 95 -------------------------------
libpackagekit/pk-enum.h | 31 ----------
11 files changed, 24 insertions(+), 146 deletions(-)
New commits:
commit e598b51ab9f52dd9bf003a44003162f7e9c3a207
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Sep 19 15:53:16 2008 +0100
trivial: egg copyright update
diff --git a/libpackagekit/egg-test.c b/libpackagekit/egg-test.c
index 43a7f21..9a4c2f0 100644
--- a/libpackagekit/egg-test.c
+++ b/libpackagekit/egg-test.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
- * Copyright (C) 2007 Richard Hughes <richard at hughsie.com>
+ * Copyright (C) 2007-2008 Richard Hughes <richard at hughsie.com>
*
* Licensed under the GNU General Public License Version 2
*
commit 5977bf83532790c4e6e7a4e69b85011cdbe4cf5b
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Sep 19 12:55:06 2008 +0100
change the default of RefreshCacheScanDesktopFiles and RefreshCacheUpdatePackageList to true. Distros that have slow methods may want to disable these
diff --git a/etc/PackageKit.conf.in b/etc/PackageKit.conf.in
index 8e58e9a..fae5ad4 100644
--- a/etc/PackageKit.conf.in
+++ b/etc/PackageKit.conf.in
@@ -50,13 +50,13 @@ DefaultBackend=@defaultbackend@
#
# NOTE: Don't enable this for backends that are slow doing SearchFile()
#
-# default=false
-RefreshCacheScanDesktopFiles=false
+# default=true
+RefreshCacheScanDesktopFiles=true
# Update the package list when we RefreshCache
#
# NOTE: Don't enable this for backends that are slow doing GetPackages()
#
-# default=false
-RefreshCacheUpdatePackageList=false
+# default=true
+RefreshCacheUpdatePackageList=true
commit 2441def28e0bd0c2a4ccc204e3916e73c9e6984f
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Sep 19 12:27:06 2008 +0100
trivial: remove pk_update_enum_x() and pk_freq_enum_x() from libpackagekit, as it's only used in gnome-packagekit
diff --git a/libpackagekit/pk-enum.c b/libpackagekit/pk-enum.c
index c9446c7..c058714 100644
--- a/libpackagekit/pk-enum.c
+++ b/libpackagekit/pk-enum.c
@@ -257,23 +257,6 @@ static PkEnumMatch enum_group[] = {
{0, NULL}
};
-static PkEnumMatch enum_freq[] = {
- {PK_FREQ_ENUM_UNKNOWN, "unknown"}, /* fall though value */
- {PK_FREQ_ENUM_HOURLY, "hourly"},
- {PK_FREQ_ENUM_DAILY, "daily"},
- {PK_FREQ_ENUM_WEEKLY, "weekly"},
- {PK_FREQ_ENUM_NEVER, "never"},
- {0, NULL}
-};
-
-static PkEnumMatch enum_update[] = {
- {PK_UPDATE_ENUM_UNKNOWN, "unknown"}, /* fall though value */
- {PK_UPDATE_ENUM_ALL, "all"},
- {PK_UPDATE_ENUM_SECURITY, "security"},
- {PK_UPDATE_ENUM_NONE, "none"},
- {0, NULL}
-};
-
static PkEnumMatch enum_update_state[] = {
{PK_UPDATE_STATE_ENUM_UNKNOWN, "unknown"}, /* fall though value */
{PK_UPDATE_STATE_ENUM_TESTING, "testing"},
@@ -864,62 +847,6 @@ pk_group_enum_to_text (PkGroupEnum group)
}
/**
- * pk_freq_enum_from_text:
- * @freq: Text describing the enumerated type
- *
- * Converts a text enumerated type to its unsigned integer representation
- *
- * Return value: the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG
- **/
-PkFreqEnum
-pk_freq_enum_from_text (const gchar *freq)
-{
- return pk_enum_find_value (enum_freq, freq);
-}
-
-/**
- * pk_freq_enum_to_text:
- * @freq: The enumerated type value
- *
- * Converts a enumerated type to its text representation
- *
- * Return value: the enumerated constant value, e.g. "available"
- **/
-const gchar *
-pk_freq_enum_to_text (PkFreqEnum freq)
-{
- return pk_enum_find_string (enum_freq, freq);
-}
-
-/**
- * pk_update_enum_from_text:
- * @update: Text describing the enumerated type
- *
- * Converts a text enumerated type to its unsigned integer representation
- *
- * Return value: the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG
- **/
-PkUpdateEnum
-pk_update_enum_from_text (const gchar *update)
-{
- return pk_enum_find_value (enum_update, update);
-}
-
-/**
- * pk_update_enum_to_text:
- * @update: The enumerated type value
- *
- * Converts a enumerated type to its text representation
- *
- * Return value: the enumerated constant value, e.g. "available"
- **/
-const gchar *
-pk_update_enum_to_text (PkUpdateEnum update)
-{
- return pk_enum_find_string (enum_update, update);
-}
-
-/**
* pk_update_state_enum_from_text:
* @update_state: Text describing the enumerated type
*
@@ -1129,28 +1056,6 @@ pk_enum_test (EggTest *test)
egg_test_success (test, NULL);
/************************************************************/
- egg_test_title (test, "check we convert all the freq bitfield");
- for (i=0; i<=PK_FREQ_ENUM_UNKNOWN; i++) {
- string = pk_freq_enum_to_text (i);
- if (string == NULL) {
- egg_test_failed (test, "failed to get %i", i);
- break;
- }
- }
- egg_test_success (test, NULL);
-
- /************************************************************/
- egg_test_title (test, "check we convert all the update bitfield");
- for (i=0; i<=PK_UPDATE_ENUM_UNKNOWN; i++) {
- string = pk_update_enum_to_text (i);
- if (string == NULL) {
- egg_test_failed (test, "failed to get %i", i);
- break;
- }
- }
- egg_test_success (test, NULL);
-
- /************************************************************/
egg_test_title (test, "check we convert all the info bitfield");
for (i=1; i<=PK_INFO_ENUM_UNKNOWN; i++) {
string = pk_info_enum_to_text (i);
diff --git a/libpackagekit/pk-enum.h b/libpackagekit/pk-enum.h
index 0c15d20..4e8da5f 100644
--- a/libpackagekit/pk-enum.h
+++ b/libpackagekit/pk-enum.h
@@ -316,31 +316,6 @@ typedef enum {
} PkGroupEnum;
/**
- * PkFreqEnum:
- *
- * The frequency type
- **/
-typedef enum {
- PK_FREQ_ENUM_HOURLY,
- PK_FREQ_ENUM_DAILY,
- PK_FREQ_ENUM_WEEKLY,
- PK_FREQ_ENUM_NEVER,
- PK_FREQ_ENUM_UNKNOWN
-} PkFreqEnum;
-
-/**
- * PkUpdateEnum:
- *
- * The update type
- **/
-typedef enum {
- PK_UPDATE_ENUM_ALL,
- PK_UPDATE_ENUM_SECURITY,
- PK_UPDATE_ENUM_NONE,
- PK_UPDATE_ENUM_UNKNOWN
-} PkUpdateEnum;
-
-/**
* PkUpdateStateEnum:
*
* What state the update is in
@@ -557,15 +532,9 @@ const gchar *pk_sig_type_enum_to_text (PkSigTypeEnum sig_typ
PkInfoEnum pk_info_enum_from_text (const gchar *info);
const gchar *pk_info_enum_to_text (PkInfoEnum info);
-PkUpdateEnum pk_update_enum_from_text (const gchar *update);
-const gchar *pk_update_enum_to_text (PkUpdateEnum update);
-
PkUpdateStateEnum pk_update_state_enum_from_text (const gchar *update_state);
const gchar *pk_update_state_enum_to_text (PkUpdateStateEnum update_state);
-PkFreqEnum pk_freq_enum_from_text (const gchar *freq);
-const gchar *pk_freq_enum_to_text (PkFreqEnum freq);
-
PkExitEnum pk_exit_enum_from_text (const gchar *exit);
const gchar *pk_exit_enum_to_text (PkExitEnum exit);
commit f24af83c73845186acd9f161c4fe8fa784101660
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Sep 19 09:49:30 2008 +0100
bugfix: use gconstpointer rather than const gpointer to avoid 'type qualifiers ignored on function return type' warning
diff --git a/libpackagekit/egg-obj-list.c b/libpackagekit/egg-obj-list.c
index 1768bba..58c8548 100644
--- a/libpackagekit/egg-obj-list.c
+++ b/libpackagekit/egg-obj-list.c
@@ -211,7 +211,7 @@ egg_obj_list_to_string (EggObjList *list)
* Adds a copy of the object to the list
**/
void
-egg_obj_list_add (EggObjList *list, const gpointer obj)
+egg_obj_list_add (EggObjList *list, gconstpointer obj)
{
gpointer obj_new;
@@ -234,7 +234,7 @@ void
egg_package_list_add_list (EggObjList *list, const EggObjList *data)
{
guint i;
- gpointer obj;
+ gconstpointer obj;
g_return_if_fail (EGG_IS_OBJ_LIST (list));
g_return_if_fail (EGG_IS_OBJ_LIST (data));
@@ -256,7 +256,7 @@ egg_package_list_add_list (EggObjList *list, const EggObjList *data)
* Removes an item from a list
**/
gboolean
-egg_obj_list_remove (EggObjList *list, const gpointer obj)
+egg_obj_list_remove (EggObjList *list, gconstpointer obj)
{
gboolean ret;
gpointer obj_new;
@@ -312,7 +312,7 @@ gboolean
egg_obj_list_to_file (EggObjList *list, const gchar *filename)
{
guint i;
- gpointer obj;
+ gconstpointer obj;
gchar *part;
GString *string;
gboolean ret = TRUE;
@@ -434,15 +434,15 @@ out:
*
* Gets an object from the list
**/
-const gpointer
+gconstpointer
egg_obj_list_index (const EggObjList *list, guint index)
{
- gpointer obj;
+ gconstpointer obj;
g_return_val_if_fail (EGG_IS_OBJ_LIST (list), NULL);
obj = g_ptr_array_index (list->priv->array, index);
- return (const gpointer) obj;
+ return obj;
}
/**
diff --git a/libpackagekit/egg-obj-list.h b/libpackagekit/egg-obj-list.h
index 2452203..4716af8 100644
--- a/libpackagekit/egg-obj-list.h
+++ b/libpackagekit/egg-obj-list.h
@@ -48,10 +48,10 @@ typedef struct
} EggObjListClass;
typedef gpointer (*EggObjListNewFunc) (void);
-typedef gpointer (*EggObjListCopyFunc) (const gpointer data);
+typedef gpointer (*EggObjListCopyFunc) (gconstpointer data);
typedef void (*EggObjListFreeFunc) (gpointer data);
typedef gpointer (*EggObjListFromStringFunc) (const gchar *data);
-typedef gchar *(*EggObjListToStringFunc) (gpointer data);
+typedef gchar *(*EggObjListToStringFunc) (gconstpointer data);
GType egg_obj_list_get_type (void) G_GNUC_CONST;
EggObjList *egg_obj_list_new (void);
@@ -75,14 +75,14 @@ gboolean egg_obj_list_to_file (EggObjList *list,
gboolean egg_obj_list_from_file (EggObjList *list,
const gchar *filename);
void egg_obj_list_add (EggObjList *list,
- const gpointer data);
+ gconstpointer data);
void egg_obj_list_add_list (EggObjList *list,
const EggObjList *data);
gboolean egg_obj_list_remove (EggObjList *list,
- const gpointer data);
+ gconstpointer data);
gboolean egg_obj_list_remove_index (EggObjList *list,
guint index);
-const gpointer egg_obj_list_index (const EggObjList *list,
+gconstpointer egg_obj_list_index (const EggObjList *list,
guint index);
G_END_DECLS
commit 12d9124e0121a958c78e5d849c3ec5f0d0674546
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Sep 18 15:07:08 2008 +0100
trivial: update some screenshots
diff --git a/docs/html/img/gpk-application-search.png b/docs/html/img/gpk-application-search.png
index daa1376..e3599ba 100644
Binary files a/docs/html/img/gpk-application-search.png and b/docs/html/img/gpk-application-search.png differ
diff --git a/docs/html/img/gpk-progress.png b/docs/html/img/gpk-progress.png
index 440214c..cff57b4 100644
Binary files a/docs/html/img/gpk-progress.png and b/docs/html/img/gpk-progress.png differ
diff --git a/docs/html/img/gpk-updates-overview.png b/docs/html/img/gpk-updates-overview.png
index 3175ddb..7a946da 100644
Binary files a/docs/html/img/gpk-updates-overview.png and b/docs/html/img/gpk-updates-overview.png differ
diff --git a/docs/html/img/gpk-updates.png b/docs/html/img/gpk-updates.png
index 0514938..8f34e2a 100644
Binary files a/docs/html/img/gpk-updates.png and b/docs/html/img/gpk-updates.png differ
commit 6c2e7fd658e71c326d57ad2d895bfe2f1829d26e
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Sep 18 13:57:40 2008 +0100
yum: add the collection size to the output of GetDetails if it is a collection
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 51e6bef..6e63db5 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1311,7 +1311,11 @@ class PackageKitYumBackend(PackageKitBaseBackend,PackagekitPackage):
desc = desc.replace('\n\n',';')
desc = desc.replace('\n',' ')
group = grp.name
- self.details(id,"",group,desc,"",0)
+ pkgs = self._get_group_packages(grp)
+ size = 0;
+ for pkg in pkgs:
+ size = size + pkg.size
+ self.details(id,"",group,desc,"",size)
else:
pkg,inst = self._findPackage(package)
commit 46c0cfe1cb04baa81c5b64c857511a4a3b494354
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date: Thu Sep 18 13:07:01 2008 +0200
yum: make meta packages use verbose name as summary, insted of description, because it looks like crap in the gui
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 870b16e..51e6bef 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -293,10 +293,10 @@ class PackageKitYumBackend(PackageKitBaseBackend,PackagekitPackage):
if grp:
if grp.installed:
if show_inst:
- self.package(id,INFO_COLLECTION_INSTALLED,grp.description)
+ self.package(id,INFO_COLLECTION_INSTALLED,grp.name)
else:
if show_avail:
- self.package(id,INFO_COLLECTION_AVAILABLE,grp.description)
+ self.package(id,INFO_COLLECTION_AVAILABLE,grp.name)
#@handle_repo_error
def search_group(self,filters,group_key):
More information about the PackageKit-commit
mailing list