[packagekit] packagekit: Branch 'master' - 9 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Fri Nov 9 12:15:08 PST 2007
backends/apt/Makefile.am | 3 +
backends/apt/pk-apt-search-plain.c | 105 +++++++++++++++++++++++++++++++++++++
backends/apt/pk-apt-search.h | 33 +++++++++++
backends/apt/pk-backend-apt.c | 47 ----------------
client/wscript_build | 11 ++-
configure.ac | 10 +++
html/img/pk-remove-confirm.png |binary
libgbus/wscript_build | 15 +++++
libpackagekit/wscript_build | 19 +-----
libselftest/wscript_build | 13 ++++
packagekit.pc.in | 3 -
wscript | 2
12 files changed, 192 insertions(+), 69 deletions(-)
New commits:
commit 2e4b885b2eddee98863b22f8f8253b6acff96c9f
Author: Alberto Ruiz <aruiz at aruiz-intel.(none)>
Date: Fri Nov 9 18:47:16 2007 +0000
* Waf update: wscript missed libselftest
diff --git a/wscript b/wscript
index 28faad0..82b2121 100644
--- a/wscript
+++ b/wscript
@@ -122,7 +122,7 @@ def build(bld):
# process subfolders from here
# Pending dirs:
# data docs etc libgbus libselftest man po policy python backends
- bld.add_subdirs('libpackagekit client libgbus')
+ bld.add_subdirs('libpackagekit client libgbus libselftest')
def shutdown():
# this piece of code may be move right after the pixmap or documentation installation
commit 176e1fb9d12aac7b7af1848e063b494c58d886fe
Author: Alberto Ruiz <aruiz at aruiz-intel.(none)>
Date: Fri Nov 9 18:43:23 2007 +0000
* Waf updates: libselfteste added, build fixed
diff --git a/client/wscript_build b/client/wscript_build
index 6df7283..d83273a 100644
--- a/client/wscript_build
+++ b/client/wscript_build
@@ -11,13 +11,14 @@
obj = bld.create_obj('cc', 'program')
obj.source='pk-console.c'
-obj.includes='.'
-obj.uselib='GLIB GOBJECT DBUS_GLIB POLKIT_DBUS'
+obj.includes='. ../libpackagekit'
+obj.uselib='GLIB GOBJECT DBUS_GLIB POLKIT_DBUS GTHREAD'
+obj.uselib_local='libpackagekit'
obj.target='pkcon'
obj = bld.create_obj('cc', 'program')
obj.source='pk-monitor.c'
-obj.includes='.'
-obj.uselib='GLIB GOBJECT DBUS_GLIB POLKIT_DBUS'
+obj.includes='. ../libpackagekit'
+obj.uselib='GLIB GOBJECT DBUS_GLIB POLKIT_DBUS GTHREAD'
+obj.uselib_local='libpackagekit'
obj.target='pkmon'
-
diff --git a/libgbus/wscript_build b/libgbus/wscript_build
index 8be8012..dd4dfc5 100644
--- a/libgbus/wscript_build
+++ b/libgbus/wscript_build
@@ -8,7 +8,6 @@ libgbus.uselib = 'GLIB GOBJECT DBUS DBUS_GLIB'
libgbus.source='''
libgbus.c
-libgbus.h
'''
libgbus.includes = '.'
diff --git a/libpackagekit/wscript_build b/libpackagekit/wscript_build
index c3afdaa..c8395ce 100644
--- a/libpackagekit/wscript_build
+++ b/libpackagekit/wscript_build
@@ -5,7 +5,7 @@ libpackagekit = bld.create_obj('gnome', 'shlib')
libpackagekit.add_marshal_file('pk-marshal.list', 'pk_marshal', '--header')
libpackagekit.add_marshal_file('pk-marshal.list', 'pk_marshal', '--body')
libpackagekit.uselib = 'GLIB GOBJECT DBUS DBUS_GLIB'
-libpackagekit.uselib_local = 'libgbus'
+libpackagekit.uselib_local = 'libgbus libselftest'
libpackagekit.source='''
pk-debug.c
diff --git a/libselftest/wscript_build b/libselftest/wscript_build
new file mode 100644
index 0000000..9eb1208
--- /dev/null
+++ b/libselftest/wscript_build
@@ -0,0 +1,13 @@
+#!/usr/bin/python
+
+#Marshall file
+libselftest = bld.create_obj('gnome', 'staticlib')
+libselftest.uselib = 'GLIB GOBJECT'
+
+libselftest.source='''
+libselftest.c
+'''
+
+libselftest.includes = '.'
+libselftest.target = 'libselftest'
+libselftest.name = 'libselftest'
commit c9adabc996082b72dc7f0130f86988a75d55202d
Merge: ad33d4a... 5259d5c...
Author: Alberto Ruiz <aruiz at aruiz-intel.(none)>
Date: Fri Nov 9 18:34:18 2007 +0000
Merge ssh://aruiz@git.packagekit.org/srv/git/PackageKit
commit ad33d4a78525677d1a0c753371e591fc2b094e55
Author: Alberto Ruiz <aruiz at aruiz-intel.(none)>
Date: Fri Nov 9 18:33:50 2007 +0000
* Waf updates: removed headers from the source wscript
diff --git a/libpackagekit/wscript_build b/libpackagekit/wscript_build
index 5694077..c3afdaa 100644
--- a/libpackagekit/wscript_build
+++ b/libpackagekit/wscript_build
@@ -4,35 +4,22 @@
libpackagekit = bld.create_obj('gnome', 'shlib')
libpackagekit.add_marshal_file('pk-marshal.list', 'pk_marshal', '--header')
libpackagekit.add_marshal_file('pk-marshal.list', 'pk_marshal', '--body')
-libpackagekit.uselib = 'GLIB GOBJECT DBUS DBUS_GLIB libgbus'
+libpackagekit.uselib = 'GLIB GOBJECT DBUS DBUS_GLIB'
+libpackagekit.uselib_local = 'libgbus'
libpackagekit.source='''
pk-debug.c
-pk-debug.h
pk-connection.c
-pk-connection.h
-pk-network.h
pk-package-id.c
-pk-package-id.h
pk-package-list.c
-pk-package-list.h
pk-enum-list.c
-pk-enum-list.h
-pk-enum.h
pk-enum.c
pk-common.c
-pk-common.h
pk-client.c
-pk-client.h
pk-task-list.c
-pk-task-list.h
pk-job-list.c
-pk-job-list.h
pk-polkit-client.c
-pk-polkit-client.h
'''
-#pk-marshal.c
-#pk-marshal.h
libpackagekit.includes = '. ../libgbus ../libselftest'
libpackagekit.target = 'libpackagekit'
commit 5259d5cfe29b5b69f92cb37349312a7813b94b84
Author: Tom Parker <palfrey at tevp.net>
Date: Fri Nov 9 18:43:49 2007 +0100
Update packagekit.pc.in
PackageKit's library depends on glib and gobject externally,
as well as dbus and gthread internally (or when statically
linked) so update packagekit.pc.in
diff --git a/packagekit.pc.in b/packagekit.pc.in
index 1f2bdbd..ebe57ff 100644
--- a/packagekit.pc.in
+++ b/packagekit.pc.in
@@ -6,7 +6,8 @@ includedir=@includedir@
Name: packagekit
Description: PackageKit is a system daemon for installing stuff.
Version: @VERSION@
-Requires: dbus-1
+Requires.private: dbus-1, gthread-2.0
+Requires: glib-2.0, gobject-2.0
Libs: -L${libdir} -lpackagekit
Cflags: -I${includedir}/packagekit
commit 52a6fe8082382d316ce968089d1f54e7e8cc9771
Author: Tom Parker <palfrey at tevp.net>
Date: Fri Nov 9 18:27:58 2007 +0100
Add initial work for multiple apt searching backends
diff --git a/backends/apt/Makefile.am b/backends/apt/Makefile.am
index 473eb96..669a220 100644
--- a/backends/apt/Makefile.am
+++ b/backends/apt/Makefile.am
@@ -6,3 +6,6 @@ libpk_backend_apt_la_LIBADD = @PK_PLUGIN_LIBS@
libpk_backend_apt_la_LDFLAGS = -module -avoid-version
libpk_backend_apt_la_CFLAGS = @PK_PLUGIN_CFLAGS@
+if APT_SEARCH_PLAIN
+libpk_backend_apt_la_SOURCES += pk-apt-search-plain.c
+endif
diff --git a/backends/apt/pk-apt-search-plain.c b/backends/apt/pk-apt-search-plain.c
new file mode 100644
index 0000000..9eec5fe
--- /dev/null
+++ b/backends/apt/pk-apt-search-plain.c
@@ -0,0 +1,105 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 Ali Sabil <ali.sabil at gmail.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <gmodule.h>
+#include <glib.h>
+#include <string.h>
+#include <pk-backend.h>
+
+/**
+ * backend_get_groups:
+ */
+void
+backend_get_groups (PkBackend *backend, PkEnumList *elist)
+{
+ g_return_if_fail (backend != NULL);
+ pk_enum_list_append_multiple (elist,
+ PK_GROUP_ENUM_ACCESSORIES,
+ PK_GROUP_ENUM_GAMES,
+ PK_GROUP_ENUM_GRAPHICS,
+ PK_GROUP_ENUM_INTERNET,
+ PK_GROUP_ENUM_OFFICE,
+ PK_GROUP_ENUM_OTHER,
+ PK_GROUP_ENUM_PROGRAMMING,
+ PK_GROUP_ENUM_MULTIMEDIA,
+ PK_GROUP_ENUM_SYSTEM,
+ -1);
+}
+
+/**
+ * backend_get_filters:
+ */
+void
+backend_get_filters (PkBackend *backend, PkEnumList *elist)
+{
+ g_return_if_fail (backend != NULL);
+ pk_enum_list_append_multiple (elist,
+ PK_FILTER_ENUM_GUI,
+ PK_FILTER_ENUM_INSTALLED,
+ PK_FILTER_ENUM_DEVELOPMENT,
+ -1);
+}
+
+/**
+ * backend_get_description:
+ */
+
+void
+backend_get_description (PkBackend *backend, const gchar *package_id)
+{
+ g_return_if_fail (backend != NULL);
+ pk_backend_allow_interrupt (backend, TRUE);
+ pk_backend_spawn_helper (backend, "get-description.py", package_id, NULL);
+}
+
+/**
+ * backend_search_details:
+ */
+
+void
+backend_search_details (PkBackend *backend, const gchar *filter, const gchar *search)
+{
+ g_return_if_fail (backend != NULL);
+ pk_backend_allow_interrupt (backend, TRUE);
+ pk_backend_spawn_helper (backend, "search-details.py", filter, search, NULL);
+}
+
+/**
+ * backend_search_name:
+ */
+void
+backend_search_name (PkBackend *backend, const gchar *filter, const gchar *search)
+{
+ g_return_if_fail (backend != NULL);
+ pk_backend_allow_interrupt (backend, TRUE);
+ pk_backend_spawn_helper (backend, "search-name.py", filter, search, NULL);
+}
+
+/**
+ * backend_search_group:
+ */
+void
+backend_search_group (PkBackend *backend, const gchar *filter, const gchar *search)
+{
+ g_return_if_fail (backend != NULL);
+ pk_backend_allow_interrupt (backend, TRUE);
+ pk_backend_spawn_helper (backend, "search-group.py", filter, search, NULL);
+}
diff --git a/backends/apt/pk-apt-search.h b/backends/apt/pk-apt-search.h
new file mode 100644
index 0000000..a09f85d
--- /dev/null
+++ b/backends/apt/pk-apt-search.h
@@ -0,0 +1,33 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 Tom Parker <palfrey at tevp.net>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __PK_APT_SEARCH_H
+#define __PK_APT_SEARCH_H
+
+#include <glib.h>
+#include <pk-backend.h>
+
+void backend_get_description (PkBackend *backend, const gchar *package_id);
+void backend_search_details (PkBackend *backend, const gchar *filter, const gchar *search);
+void backend_search_name (PkBackend *backend, const gchar *filter, const gchar *search);
+void backend_search_group (PkBackend *backend, const gchar *filter, const gchar *search);
+
+#endif
diff --git a/backends/apt/pk-backend-apt.c b/backends/apt/pk-backend-apt.c
index 484717d..d5bacb3 100644
--- a/backends/apt/pk-backend-apt.c
+++ b/backends/apt/pk-backend-apt.c
@@ -24,6 +24,7 @@
#include <string.h>
#include <pk-backend.h>
#include <pk-backend-python.h>
+#include "pk-apt-search.h"
/**
* backend_get_groups:
@@ -59,52 +60,6 @@ backend_get_filters (PkBackend *backend, PkEnumList *elist)
-1);
}
-/**
- * backend_get_description:
- */
-
-static void
-backend_get_description (PkBackend *backend, const gchar *package_id)
-{
- g_return_if_fail (backend != NULL);
- pk_backend_allow_interrupt (backend, TRUE);
- pk_backend_spawn_helper (backend, "get-description.py", package_id, NULL);
-}
-
-/**
- * backend_search_details:
- */
-
-static void
-backend_search_details (PkBackend *backend, const gchar *filter, const gchar *search)
-{
- g_return_if_fail (backend != NULL);
- pk_backend_allow_interrupt (backend, TRUE);
- pk_backend_spawn_helper (backend, "search-details.py", filter, search, NULL);
-}
-
-/**
- * backend_search_name:
- */
-static void
-backend_search_name (PkBackend *backend, const gchar *filter, const gchar *search)
-{
- g_return_if_fail (backend != NULL);
- pk_backend_allow_interrupt (backend, TRUE);
- pk_backend_spawn_helper (backend, "search-name.py", filter, search, NULL);
-}
-
-/**
- * backend_search_group:
- */
-static void
-backend_search_group (PkBackend *backend, const gchar *filter, const gchar *search)
-{
- g_return_if_fail (backend != NULL);
- pk_backend_allow_interrupt (backend, TRUE);
- pk_backend_spawn_helper (backend, "search-group.py", filter, search, NULL);
-}
-
PK_BACKEND_OPTIONS (
"Apt", /* description */
"Ali Sabil <ali.sabil at gmail.com>", /* author */
diff --git a/configure.ac b/configure.ac
index 94d21d6..5a53cf0 100755
--- a/configure.ac
+++ b/configure.ac
@@ -333,6 +333,16 @@ AC_DEFUN([APT_BACKEND],
if test x$with_default_backend = xapt; then
PY_CHECK_MOD([apt_pkg],,,AC_MSG_ERROR([Apt backend needs python-apt]))
+ AC_ARG_WITH([aptsearch],
+ AS_HELP_STRING([--with-apt-search=<option>],
+ [Apt search type to use - plain (plain)]))
+ if test x$with_aptsearch = x; then
+ with_aptsearch=plain
+ fi
+ AC_DEFINE(APT_SEARCH, "$with_aptsearch", [apt search type])
+ AC_SUBST(APT_SEARCH, "$with_aptsearch")
+ AM_CONDITIONAL(APT_SEARCH_PLAIN, [test x$with_aptsearch = xplain], [using plain apt search])
+
AC_ARG_WITH(libapt-pkg-lib,
AC_HELP_STRING([--with-libapt-pkg-lib=DIR],[look for the libapt-pkg library in DIR]),
[_libaptpkg_with_lib=$withval],[_libaptpkg_with_lib=no])
commit 1d2b8d7af92023066c5758a213b57a7225b6e35e
Author: Alberto Ruiz <aruiz at aruiz-intel.(none)>
Date: Fri Nov 9 18:06:36 2007 +0000
* Waf updates: ligbus added to wscript targets
diff --git a/wscript b/wscript
index a876352..28faad0 100644
--- a/wscript
+++ b/wscript
@@ -122,7 +122,7 @@ def build(bld):
# process subfolders from here
# Pending dirs:
# data docs etc libgbus libselftest man po policy python backends
- bld.add_subdirs('libpackagekit client')
+ bld.add_subdirs('libpackagekit client libgbus')
def shutdown():
# this piece of code may be move right after the pixmap or documentation installation
commit c17537eef9686b97499de7c37ad7de0eca0e8367
Author: Alberto Ruiz <aruiz at aruiz-intel.(none)>
Date: Fri Nov 9 18:05:29 2007 +0000
* Waf updates: libgbus and libpackagekit script now working
diff --git a/libgbus/wscript_build b/libgbus/wscript_build
new file mode 100644
index 0000000..8be8012
--- /dev/null
+++ b/libgbus/wscript_build
@@ -0,0 +1,16 @@
+#!/usr/bin/python
+
+#Marshall file
+libgbus = bld.create_obj('gnome', 'staticlib')
+libgbus.add_marshal_file('libgbus-marshal.list', 'libgbus_marshal', '--header')
+libgbus.add_marshal_file('libgbus-marshal.list', 'libgbus_marshal', '--body')
+libgbus.uselib = 'GLIB GOBJECT DBUS DBUS_GLIB'
+
+libgbus.source='''
+libgbus.c
+libgbus.h
+'''
+
+libgbus.includes = '.'
+libgbus.target = 'libgbus'
+libgbus.name = 'libgbus'
diff --git a/libpackagekit/wscript_build b/libpackagekit/wscript_build
index b14a166..5694077 100644
--- a/libpackagekit/wscript_build
+++ b/libpackagekit/wscript_build
@@ -4,7 +4,7 @@
libpackagekit = bld.create_obj('gnome', 'shlib')
libpackagekit.add_marshal_file('pk-marshal.list', 'pk_marshal', '--header')
libpackagekit.add_marshal_file('pk-marshal.list', 'pk_marshal', '--body')
-libpackagekit.uselib = 'GLIB GOBJECT'
+libpackagekit.uselib = 'GLIB GOBJECT DBUS DBUS_GLIB libgbus'
libpackagekit.source='''
pk-debug.c
@@ -34,6 +34,6 @@ pk-polkit-client.h
#pk-marshal.c
#pk-marshal.h
-libpackagekit.includes = '.'
+libpackagekit.includes = '. ../libgbus ../libselftest'
libpackagekit.target = 'libpackagekit'
libpackagekit.name = 'libpackagekit'
commit ee797bf6cda1139e450c61aa0bc5a576c66e1010
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Nov 9 17:22:41 2007 +0000
update a screenshot
diff --git a/html/img/pk-remove-confirm.png b/html/img/pk-remove-confirm.png
index c3c0d0d..b7cbb8c 100644
Binary files a/html/img/pk-remove-confirm.png and b/html/img/pk-remove-confirm.png differ
More information about the PackageKit
mailing list