[packagekit] packagekit: Branch 'master' - 15 commits

Richard Hughes hughsient at kemper.freedesktop.org
Wed Dec 12 15:06:14 PST 2007


 .gitignore                          |    1 
 AUTHORS                             |    1 
 Makefile.am                         |    2 
 TODO                                |   38 +++++++
 autogen.sh                          |    1 
 backends/yum/helpers/yumBackend.py  |   14 ++
 backends/yum/pk-backend-yum.c       |    1 
 backends/zypp/pk-backend-zypp.cpp   |  108 ++++++++++++++++++++
 backends/zypp/zypp-utils.h          |    2 
 configure.ac                        |    3 
 docs/.gitignore                     |    1 
 docs/Makefile.am                    |    1 
 docs/api/.gitignore                 |   21 ++++
 docs/api/Makefile.am                |   79 +++++++++++++++
 docs/html/img/author-btimothy.png   |binary
 docs/html/img/author-hughsie.png    |binary
 docs/html/img/author-kenvandine.png |binary
 docs/html/img/author-rnorwood.png   |binary
 docs/html/img/author-unknown.png    |binary
 docs/html/img/large-authors.png     |binary
 docs/html/index.html                |   12 +-
 docs/html/pk-authors.html           |  188 ++++++++++++++++++++++++++++++++++++
 docs/html/pk-download.html          |    6 +
 docs/html/pk-faq.html               |    6 +
 docs/html/pk-help.html              |    6 +
 docs/html/pk-intro.html             |    6 +
 docs/html/pk-screenshots.html       |    6 +
 docs/html/pk-using.html             |    6 +
 docs/html/style.css                 |    6 +
 docs/spec/.gitignore                |    2 
 docs/wscript_build                  |   12 ++
 libpackagekit/pk-common.c           |    2 
 libpackagekit/pk-package-id.c       |    2 
 python/packagekit/backend.py        |   51 +++++++++
 34 files changed, 572 insertions(+), 12 deletions(-)

New commits:
commit 44d112c33dc390e46c6c7d97c2e4885231bdfd23
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Dec 12 22:58:20 2007 +0000

    add a valid html check link and copyright attribution

diff --git a/docs/html/index.html b/docs/html/index.html
index 3e53b97..28723ef 100644
--- a/docs/html/index.html
+++ b/docs/html/index.html
@@ -41,8 +41,10 @@
 </tr>
 </table>
 
-<p align="right">
-<a href="mailto:richard at hughsie.com">Richard Hughes</a> 2007
+<p class="footer">
+ Copyright <a href="mailto:richard at hughsie.com">Richard Hughes 2007</a><br/>
+ <a href="http://validator.w3.org/check/referer">Optimized</a>
+ for <a href="http://www.w3.org/">standards</a>.
 </p>
 
 </body>
diff --git a/docs/html/pk-authors.html b/docs/html/pk-authors.html
index f5184ce..46460ad 100644
--- a/docs/html/pk-authors.html
+++ b/docs/html/pk-authors.html
@@ -177,6 +177,12 @@
 
 <p>Back to the <a href="index.html">main page</a></p>
 
+<p class="footer">
+ Copyright <a href="mailto:richard at hughsie.com">Richard Hughes 2007</a><br/>
+ <a href="http://validator.w3.org/check/referer">Optimized</a>
+ for <a href="http://www.w3.org/">standards</a>.
+</p>
+
 </body>
 </html>
 
diff --git a/docs/html/pk-download.html b/docs/html/pk-download.html
index 18260ce..a37281b 100644
--- a/docs/html/pk-download.html
+++ b/docs/html/pk-download.html
@@ -105,5 +105,11 @@ as easy as possible.
 
 <p>Back to the <a href="index.html">main page</a></p>
 
+<p class="footer">
+ Copyright <a href="mailto:richard at hughsie.com">Richard Hughes 2007</a><br/>
+ <a href="http://validator.w3.org/check/referer">Optimized</a>
+ for <a href="http://www.w3.org/">standards</a>.
+</p>
+
 </body>
 </html>
diff --git a/docs/html/pk-faq.html b/docs/html/pk-faq.html
index 0a5146e..45dc36b 100644
--- a/docs/html/pk-faq.html
+++ b/docs/html/pk-faq.html
@@ -199,6 +199,12 @@ but all the coding is done in my free time.
 
 <p>Back to the <a href="index.html">main page</a></p>
 
+<p class="footer">
+ Copyright <a href="mailto:richard at hughsie.com">Richard Hughes 2007</a><br/>
+ <a href="http://validator.w3.org/check/referer">Optimized</a>
+ for <a href="http://www.w3.org/">standards</a>.
+</p>
+
 </body>
 </html>
 
diff --git a/docs/html/pk-help.html b/docs/html/pk-help.html
index 943a8c8..6b27e47 100644
--- a/docs/html/pk-help.html
+++ b/docs/html/pk-help.html
@@ -63,5 +63,11 @@ existing backends as a template for what you are trying to do.
 
 <p>Back to the <a href="index.html">main page</a></p>
 
+<p class="footer">
+ Copyright <a href="mailto:richard at hughsie.com">Richard Hughes 2007</a><br/>
+ <a href="http://validator.w3.org/check/referer">Optimized</a>
+ for <a href="http://www.w3.org/">standards</a>.
+</p>
+
 </body>
 </html>
diff --git a/docs/html/pk-intro.html b/docs/html/pk-intro.html
index 537b88e..38ad5b3 100644
--- a/docs/html/pk-intro.html
+++ b/docs/html/pk-intro.html
@@ -110,5 +110,11 @@ cross-architecture API.
 
 <p>Back to the <a href="index.html">main page</a></p>
 
+<p class="footer">
+ Copyright <a href="mailto:richard at hughsie.com">Richard Hughes 2007</a><br/>
+ <a href="http://validator.w3.org/check/referer">Optimized</a>
+ for <a href="http://www.w3.org/">standards</a>.
+</p>
+
 </body>
 </html>
diff --git a/docs/html/pk-screenshots.html b/docs/html/pk-screenshots.html
index deebcbe..b0f70b7 100644
--- a/docs/html/pk-screenshots.html
+++ b/docs/html/pk-screenshots.html
@@ -68,6 +68,12 @@
 
 <p>Back to the <a href="index.html">main page</a></p>
 
+<p class="footer">
+ Copyright <a href="mailto:richard at hughsie.com">Richard Hughes 2007</a><br/>
+ <a href="http://validator.w3.org/check/referer">Optimized</a>
+ for <a href="http://www.w3.org/">standards</a>.
+</p>
+
 </body>
 </html>
 
diff --git a/docs/html/pk-using.html b/docs/html/pk-using.html
index d310fba..02a7974 100644
--- a/docs/html/pk-using.html
+++ b/docs/html/pk-using.html
@@ -78,5 +78,11 @@ The latest interface is available in the source tree or <a href="http://gitweb.f
 
 <p>Back to the <a href="index.html">main page</a></p>
 
+<p class="footer">
+ Copyright <a href="mailto:richard at hughsie.com">Richard Hughes 2007</a><br/>
+ <a href="http://validator.w3.org/check/referer">Optimized</a>
+ for <a href="http://www.w3.org/">standards</a>.
+</p>
+
 </body>
 </html>
diff --git a/docs/html/style.css b/docs/html/style.css
index d229818..124f787 100644
--- a/docs/html/style.css
+++ b/docs/html/style.css
@@ -16,6 +16,12 @@ p.title {
 	font-size: 20px;
 	}
 
+p.footer {
+	color: #000000;
+	text-align: center;
+	font-size: 6px;
+	}
+
 p.caption {
 	color: #000000;
 	text-align: center;
commit 60a7e23fb55fa9fae36f2f3b85df5e7d741e04f4
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Dec 12 22:51:37 2007 +0000

    add some more stuff to the authors page

diff --git a/docs/html/pk-authors.html b/docs/html/pk-authors.html
index 2fc63d5..f5184ce 100644
--- a/docs/html/pk-authors.html
+++ b/docs/html/pk-authors.html
@@ -26,19 +26,24 @@
   <h2>Richard Hughes</h2>
   <p>
    Richard has 6 years of experience developing open source software.
-   He is the maintainer of PackageKit and GNOME Power Manager.
+   He is the maintainer of <a href="http://www.packagekit.org/">PackageKit</a>
+   and <a href="http://www.gnome.org/projects/gnome-power-manager/">GNOME Power Manager</a>
+   and contributes to <a href="http://www.freedesktop.org/wiki/Software/hal">HAL</a>
+   and <a href="http://ohm.freedesktop.org/wiki/">OHM</a>.
   </p>
   <p>
-   Richard has recently graduated from the University of Surrey with a Masters
+   Richard has recently graduated from the <a href="http://www.surrey.ac.uk/">University of Surrey</a> with a Masters
    in Electronics Engineering.
    He currently works for a large defense company with all open source work
    done in his free time.
    Richard's outside interests include playing rugby union, and eating good food.
   </p>
-   <b>Responsible for: packagekitd</b>
   <p>
+   <b>Responsible for: packagekitd</b>
+  </p>
  </td>
 </tr>
+
 <tr>
  <td>
   <img src="img/author-kenvandine.png"/><!-- image should be 120px wide -->
@@ -46,21 +51,13 @@
  <td>
   <h2>Ken VanDine</h2>
   <p>
-  Ken is the Creator and Project Lead of Foresight Linux as well as a member of
-  the GNOME Marketing team.  Ken works on the Conary backend of PackageKit, as well
-   as participated in the earlier PackageKit design discussions.
+  Ken is the Creator and Project Lead of <a href="http://www.foresightlinux.org/">Foresight Linux</a>
+  as well as a member of the <a href="http://live.gnome.org/GnomeMarketing">GNOME Marketing team</a>.
+  Ken works on the <a href="http://wiki.rpath.com/wiki/Conary">Conary</a> backend
+  of PackageKit, as well as participating in PackageKit design discussions.
   </p>
-   <b>Responsible for: conary backend</b>
- </td>
-</tr>
-<tr>
- <td>
-  <img src="img/author-unknown.png"/><!-- image should be 120px wide -->
- </td>
- <td>
-  <h2>Tom Parker</h2>
   <p>
-   Information about Tom etc....
+   <b>Responsible for: conary backend</b>
   </p>
  </td>
 </tr>
@@ -77,7 +74,9 @@
    the maintainers of the <a href="http://live.gnome.org/Tomboy">Tomboy Notes</a>
    project.
   </p>
+  <p>
    <b>Responsible for: zypp backend</b>
+  </p>
  </td>
 </tr>
 
@@ -88,11 +87,89 @@
  <td>
   <h2>Robin Norwood</h2>
   <p>
-    Robin has worked at Red Hat, Inc. since 2001, and is currently on
-    the Desktop team.  He works on the Yum backend of PackageKit, as
-    well as the Python frontend.
+    Robin has worked at <a href="http://www.redhat.com/">Red Hat, Inc.</a> since
+    2001, and is currently on the Desktop team.
+    He works on the Yum backend of PackageKit, as well as the Python frontend.
   </p>
+  <p>
    <b>Responsible for: Yum backend, Python frontend</b>
+  </p>
+ </td>
+</tr>
+
+<tr>
+ <td>
+  <img src="img/author-unknown.png"/><!-- image should be 120px wide -->
+ </td>
+ <td>
+  <h2>Tom Parker</h2>
+  <p>
+   Details needed...
+  </p>
+  <p>
+   <b>Responsible for: apt backend</b>
+  </p>
+ </td>
+</tr>
+
+<tr>
+ <td>
+  <img src="img/author-unknown.png"/><!-- image should be 120px wide -->
+ </td>
+ <td>
+  <h2>Tim Lauridsen</h2>
+  <p>
+   Details needed...
+  </p>
+  <p>
+   <b>Responsible for: yum backend</b>
+  </p>
+ </td>
+</tr>
+
+<tr>
+ <td>
+  <img src="img/author-unknown.png"/><!-- image should be 120px wide -->
+ </td>
+ <td>
+  <h2>Luke Macken</h2>
+  <p>
+   Details needed...
+  </p>
+  <p>
+   <b>Responsible for: yum backend</b>
+  </p>
+ </td>
+</tr>
+
+
+<tr>
+ <td>
+  <img src="img/author-unknown.png"/><!-- image should be 120px wide -->
+ </td>
+ <td>
+  <h2>S.&Ccedil;aglar Onur</h2><!-- how do you do ÄŸ? -->
+  <p>
+   Details needed...
+  </p>
+  <p>
+   <b>Responsible for: pisi backend</b>
+  </p>
+ </td>
+</tr>
+
+<tr>
+ <td>
+  <img src="img/author-unknown.png"/><!-- image should be 120px wide -->
+ </td>
+ <td>
+  <h2>A Person</h2>
+  <p>
+   Details needed...
+  </p>
+  <p>
+   <b>Responsible for: foo backend</b>
+  </p>
  </td>
 </tr>
 
commit 8d8cb3cedeee5f5cf58b77c1be0b1a1ff34ed90b
Author: Robin Norwood <rnorwood at redhat.com>
Date:   Wed Dec 12 17:44:35 2007 -0500

    Add AUTHORS stuff.

diff --git a/AUTHORS b/AUTHORS
index 8db406c..8421030 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -3,6 +3,7 @@ Tom Parker <palfrey at tevp.net>
 Ken VanDine <ken at vandine.org>
 Tim Lauridsen <tla at rasmil.dk>
 Luke Macken <lmacken at redhat.com>
+Robin Norwood <rnorwood at redhat.com>
 
 Backend: conary
     Og Maciel <omaciel at foresightlinux.org>
diff --git a/docs/html/img/author-rnorwood.png b/docs/html/img/author-rnorwood.png
new file mode 100644
index 0000000..c13e639
Binary files /dev/null and b/docs/html/img/author-rnorwood.png differ
diff --git a/docs/html/pk-authors.html b/docs/html/pk-authors.html
index 492f1c3..2fc63d5 100644
--- a/docs/html/pk-authors.html
+++ b/docs/html/pk-authors.html
@@ -81,6 +81,21 @@
  </td>
 </tr>
 
+<tr>
+ <td>
+  <img src="img/author-rnorwood.png"/><!-- image should be 120px wide -->
+ </td>
+ <td>
+  <h2>Robin Norwood</h2>
+  <p>
+    Robin has worked at Red Hat, Inc. since 2001, and is currently on
+    the Desktop team.  He works on the Yum backend of PackageKit, as
+    well as the Python frontend.
+  </p>
+   <b>Responsible for: Yum backend, Python frontend</b>
+ </td>
+</tr>
+
 </table>
 
 <p>Back to the <a href="index.html">main page</a></p>
commit 20af81644b32cf186cb87b4ece72f85f8a9234ca
Merge: d5eb4f3... 1fead82...
Author: Robin Norwood <rnorwood at redhat.com>
Date:   Wed Dec 12 17:21:09 2007 -0500

    Merge branch 'master' of git+ssh://rnorwood@git.packagekit.org/srv/git/PackageKit

commit d5eb4f3638ecea4d31ec0bd97845a07dc6b8b156
Author: Robin Norwood <rnorwood at redhat.com>
Date:   Wed Dec 12 17:20:52 2007 -0500

    Add filter for free/nonfree to yum backend.

diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 887abd0..0f40849 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
@@ -327,6 +327,9 @@ class PackageKitYumBackend(PackageKitBaseBackend):
             elif filter in (FILTER_DEVELOPMENT, FILTER_NOT_DEVELOPMENT):
                 if not self._do_devel_filtering(filter, pkg):
                     return False
+            elif filter in (FILTER_FREE, FILTER_NOT_FREE):
+                if not self._do_free_filtering(filter, pkg):
+                    return False
         return True
 
     def _do_gui_filtering(self,flt,pkg):
@@ -360,6 +363,17 @@ class PackageKitYumBackend(PackageKitBaseBackend):
             isDevel = True
         return isDevel == wantDevel
 
+    def _do_free_filtering(self,flt,pkg):
+        isFree = False
+        if flt == FILTER_FREE:
+            wantFree = True
+        else:
+            wantFree = False
+
+        isFree = self.check_license_field(pkg.license)
+
+        return isFree == wantFree
+
     def search_name(self,filters,key):
         '''
         Implement the {backend}-search-name functionality
diff --git a/backends/yum/pk-backend-yum.c b/backends/yum/pk-backend-yum.c
index fed2a63..6829824 100644
--- a/backends/yum/pk-backend-yum.c
+++ b/backends/yum/pk-backend-yum.c
@@ -64,6 +64,7 @@ backend_get_filters (PkBackend *backend, PkEnumList *elist)
 				      PK_FILTER_ENUM_GUI,
 				      PK_FILTER_ENUM_INSTALLED,
 				      PK_FILTER_ENUM_DEVELOPMENT,
+				      PK_FILTER_ENUM_FREE,
 				      -1);
 }
 
diff --git a/python/packagekit/backend.py b/python/packagekit/backend.py
index ba93015..d14c5f7 100644
--- a/python/packagekit/backend.py
+++ b/python/packagekit/backend.py
@@ -179,6 +179,57 @@ class PackageKitBaseBackend:
             containing (name,ver,arch,data)
         '''
         return tuple(id.split(';', 4))
+
+    def check_license_field(self,license_field):
+        '''
+        Check the string license_field for free licenses, as defined
+        by the FSF, indicated by their short names as documented at
+        http://fedoraproject.org/wiki/Licensing#SoftwareLicenses
+
+        Licenses can be grouped by " or " to indicate that the package
+        can be redistributed under any of the licenses in the group.
+        For instance: GPLv2+ or Artistic or FooLicense.
+
+        Groups of licenses can be grouped with " and " to indicate
+        that parts of the package are distributed under one group of
+        licenses, while other parts of the package are distributed
+        under another group.  Groups may be wrapped in parenthesis.
+        For instance: (GPLv2+ or Artistic) and (GPL+ or Artistic) and FooLicense.
+
+        At least one license in each group must be free for the
+        package to be considered Free Software.  If the license_field
+        is empty, the package is considered non-free.
+        '''
+
+        groups = license_field.split(" and ")
+
+        if len(groups) == 0:
+            return False
+
+        one_free_group = False
+
+        for group in groups:
+            group = group.replace("(","")
+            group = group.replace(")","")
+            licenses = group.split(" or ")
+
+            group_is_free = False
+
+            for license in licenses:
+                license = license.strip()
+
+                if license in PackageKitEnum.fsf_free_licenses:
+                    one_free_group = True
+                    group_is_free = True
+                    break
+
+            if group_is_free == False:
+                return False
+
+        if one_free_group == False:
+            return False
+
+        return True
        
 #
 # Backend Action Methods
commit 1fead82a1a4a73d77725cc6ee663fce9a5865da8
Author: Boyd Timothy <boyd at bht-lenovo.provo.novell.com>
Date:   Wed Dec 12 15:16:58 2007 -0700

    Added initial stab at backend_get_updates() for zypp backend.

diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index df9bcee..3d7994d 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -25,6 +25,7 @@
 #include <unistd.h>
 #include <pk-debug.h>
 #include <string>
+#include <set>
 
 #include <zypp/ZYppFactory.h>
 #include <zypp/ResObject.h>
@@ -42,6 +43,9 @@
 #include <zypp/repo/RepoException.h>
 #include <zypp/parser/ParseException.h>
 #include <zypp/Pathname.h>
+#include <zypp/RelCompare.h>
+#include <zypp/ResFilters.h>
+#include <zypp/base/Algorithm.h>
 #include <sqlite3.h>
 
 #include <map>
@@ -158,9 +162,7 @@ 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);
 }
 
@@ -402,6 +404,106 @@ backend_get_description (PkBackend *backend, const gchar *package_id)
 	}
 }
 
+/**
+ * Collect items, select best edition.  This is used to find the best
+ * available or installed.  The name of the class is a bit misleading though ...
+ */
+class LookForArchUpdate : public zypp::resfilter::PoolItemFilterFunctor
+{
+	public:
+		zypp::PoolItem_Ref best;
+
+	bool operator() (zypp::PoolItem_Ref provider)
+	{
+		if ((provider.status ().isLocked () == FALSE) && (!best || best->edition ().compare (provider->edition ()) < 0)) {
+			best = provider;
+		}
+
+		return true;
+	}
+};
+
+/**
+ * The following method was taken directly from zypper code
+ *
+ * Find best (according to edition) uninstalled item
+ * with the same kind/name/arch as item.
+ * Similar to zypp::solver::detail::Helper::findUpdateItem
+ * but that allows changing the arch (#222140).
+ */
+static zypp::PoolItem_Ref
+findArchUpdateItem (const zypp::ResPool & pool, zypp::PoolItem_Ref item)
+{
+	LookForArchUpdate info;
+
+	invokeOnEach (pool.byNameBegin (item->name ()),
+			pool.byNameEnd (item->name ()),
+			// get uninstalled, equal kind and arch, better edition
+			zypp::functor::chain (
+				zypp::functor::chain (
+					zypp::functor::chain (
+						zypp::resfilter::ByUninstalled (),
+						zypp::resfilter::ByKind (item->kind ())),
+					zypp::resfilter::byArch<zypp::CompareByEQ<zypp::Arch> > (item->arch ())),
+				zypp::resfilter::byEdition<zypp::CompareByGT<zypp::Edition> > (item->edition ())),
+			zypp::functor::functorRef<bool,zypp::PoolItem> (info));
+
+	return info.best;
+}
+
+static gboolean
+backend_get_updates_thread (PkBackend *backend, gpointer data)
+{
+	pk_backend_change_status (backend, PK_STATUS_ENUM_QUERY);
+	pk_backend_change_percentage (backend, 0);
+
+	zypp::ResPool pool = zypp_build_pool (TRUE);
+	pk_backend_change_percentage (backend, 40);
+
+	Candidates candidates;
+	zypp::ResObject::Kind kind = zypp::ResTraits<zypp::Package>::kind;
+	zypp::ResPool::byKind_iterator it = pool.byKindBegin (kind);
+	zypp::ResPool::byKind_iterator e = pool.byKindEnd (kind);
+	for (; it != e; ++it) {
+		if (it->status ().isUninstalled ())
+			continue;
+		zypp::PoolItem_Ref candidate = findArchUpdateItem (pool, *it);
+		if (!candidate.resolvable ())
+			continue;
+
+		candidates.insert (candidate);
+	}
+
+	pk_backend_change_percentage (backend, 80);
+	Candidates::iterator cb = candidates.begin (), ce = candidates.end (), ci;
+	for (ci = cb; ci != ce; ++ci) {
+		zypp::ResObject::constPtr res = ci->resolvable();
+
+		// Emit the package
+		gchar *package_id = zypp_build_package_id_from_resolvable (res);
+		pk_backend_package (backend,
+				    PK_INFO_ENUM_AVAILABLE,
+				    package_id,
+				    res->description ().c_str ());
+		g_free (package_id);
+	}
+
+	pk_backend_change_percentage (backend, 100);
+	pk_backend_finished (backend);
+	return TRUE;
+}
+
+
+/**
+ * backend_get_updates
+ */
+static void
+backend_get_updates (PkBackend *backend)
+{
+	g_return_if_fail (backend != NULL);
+	pk_backend_thread_create (backend, backend_get_updates_thread, NULL);
+}
+
 static gboolean
 backend_install_package_thread (PkBackend *backend, gpointer data)
 {
@@ -1043,7 +1145,7 @@ extern "C" PK_BACKEND_OPTIONS (
 	NULL,					/* get_files */
 	NULL,					/* get_requires */
 	NULL,					/* get_update_detail */
-	NULL,					/* get_updates */
+	backend_get_updates,			/* get_updates */
 	backend_install_package,		/* install_package */
 	NULL,					/* install_file */
 	backend_refresh_cache,			/* refresh_cache */
diff --git a/backends/zypp/zypp-utils.h b/backends/zypp/zypp-utils.h
index 7e96c6e..89ebdb9 100644
--- a/backends/zypp/zypp-utils.h
+++ b/backends/zypp/zypp-utils.h
@@ -9,6 +9,7 @@
 #include <zypp/ResPool.h>
 
 #include <list>
+#include <set>
 
 // some typedefs and functions to shorten Zypp names
 typedef zypp::ResPoolProxy ZyppPool;
@@ -22,6 +23,7 @@ typedef zypp::Pattern::constPtr		ZyppPattern;
 typedef zypp::Language::constPtr	ZyppLanguage;
 //inline ZyppPackage tryCastToZyppPkg (ZyppObject obj)
 //	{ return zypp::dynamic_pointer_cast <const zypp::Package> (obj); }
+typedef std::set<zypp::PoolItem_Ref> Candidates;
 
 zypp::ZYpp::Ptr get_zypp ();
 
diff --git a/docs/html/img/author-btimothy.png b/docs/html/img/author-btimothy.png
new file mode 100644
index 0000000..e59eff9
Binary files /dev/null and b/docs/html/img/author-btimothy.png differ
diff --git a/docs/html/pk-authors.html b/docs/html/pk-authors.html
index 2843a80..492f1c3 100644
--- a/docs/html/pk-authors.html
+++ b/docs/html/pk-authors.html
@@ -65,6 +65,22 @@
  </td>
 </tr>
 
+<tr>
+ <td>
+  <img src="img/author-btimothy.png"/><!-- image should be 120px wide -->
+ </td>
+ <td>
+  <h2>Boyd Timothy</h2>
+  <p>
+   Boyd is a member of the <a href="http://en.opensuse.org/GNOME">openSUSE GNOME
+   team</a>.  He works on the Zypp backend of PackageKit.  Boyd is also one of
+   the maintainers of the <a href="http://live.gnome.org/Tomboy">Tomboy Notes</a>
+   project.
+  </p>
+   <b>Responsible for: zypp backend</b>
+ </td>
+</tr>
+
 </table>
 
 <p>Back to the <a href="index.html">main page</a></p>
commit 0b7b84d7128b2f290f582231cc355ad18fa2bd2f
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Dec 12 20:26:57 2007 +0000

    add another git ignore

diff --git a/docs/spec/.gitignore b/docs/spec/.gitignore
new file mode 100644
index 0000000..3432c3f
--- /dev/null
+++ b/docs/spec/.gitignore
@@ -0,0 +1,2 @@
+*.html
+
commit ae979204bd92d6eceb28de67fb0759d87816fda8
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Dec 12 20:26:26 2007 +0000

    hook up the authors page

diff --git a/docs/html/img/large-authors.png b/docs/html/img/large-authors.png
new file mode 100644
index 0000000..993c460
Binary files /dev/null and b/docs/html/img/large-authors.png differ
diff --git a/docs/html/index.html b/docs/html/index.html
index 6da3608..3e53b97 100644
--- a/docs/html/index.html
+++ b/docs/html/index.html
@@ -21,20 +21,22 @@
  <td align="middle"><a href="pk-intro.html"><img src="img/large-accessories-text-editor.png" width="128"/></a></td>
  <td align="middle"><a href="pk-using.html"><img src="img/large-preferences-system.png" width="128"/></a></td>
  <td align="middle"><a href="pk-download.html"><img src="img/large-dialog-information.png" width="128"/></a></td>
+ <td align="middle"><a href="pk-screenshots.html"><img src="img/large-emblem-photos.png" width="128"/></a></td>
 </tr>
 <tr>
  <td><a href="pk-intro.html"><p class="indextitle">What is<br>PackageKit?</p></a></td>
  <td><a href="pk-using.html"><p class="indextitle">How do I use<br>PackageKit?</p></a></td>
  <td><a href="pk-download.html"><p class="indextitle">Where can I<br>download it?</p></a></td>
+ <td><a href="pk-screenshots.html"><p class="indextitle">Screenshots</p></a></td>
 </tr>
 <tr>
+ <td align="middle"><a href="pk-authors.html"><img src="img/large-authors.png" width="128"/></a></td>
  <td align="middle"><a href="pk-help.html"><img src="img/large-system-users.png" width="128"/></a></td>
- <td align="middle"><a href="pk-screenshots.html"><img src="img/large-emblem-photos.png" width="128"/></a></td>
  <td align="middle"><a href="pk-faq.html"><img src="img/large-help-browser.png" width="128"/></a></td>
 </tr>
 <tr>
+ <td><a href="pk-authors.html"><p class="indextitle">Who develops PackageKit?</p></a></td>
  <td><a href="pk-help.html"><p class="indextitle">How can I help?</p></a></td>
- <td><a href="pk-screenshots.html"><p class="indextitle">Screenshots</p></a></td>
  <td><a href="pk-faq.html"><p class="indextitle">Frequently<br>asked questions</p></a></td>
 </tr>
 </table>
commit 43f20313357e6eb8b4c845858660ee8026116dde
Author: Ken VanDine <ken at vandine.org>
Date:   Wed Dec 12 15:02:00 2007 -0500

    Added myself to the authors page

diff --git a/docs/html/img/author-kenvandine.png b/docs/html/img/author-kenvandine.png
new file mode 100644
index 0000000..c7f5133
Binary files /dev/null and b/docs/html/img/author-kenvandine.png differ
diff --git a/docs/html/pk-authors.html b/docs/html/pk-authors.html
index da18eab..2843a80 100644
--- a/docs/html/pk-authors.html
+++ b/docs/html/pk-authors.html
@@ -41,6 +41,20 @@
 </tr>
 <tr>
  <td>
+  <img src="img/author-kenvandine.png"/><!-- image should be 120px wide -->
+ </td>
+ <td>
+  <h2>Ken VanDine</h2>
+  <p>
+  Ken is the Creator and Project Lead of Foresight Linux as well as a member of
+  the GNOME Marketing team.  Ken works on the Conary backend of PackageKit, as well
+   as participated in the earlier PackageKit design discussions.
+  </p>
+   <b>Responsible for: conary backend</b>
+ </td>
+</tr>
+<tr>
+ <td>
   <img src="img/author-unknown.png"/><!-- image should be 120px wide -->
  </td>
  <td>
@@ -50,6 +64,7 @@
   </p>
  </td>
 </tr>
+
 </table>
 
 <p>Back to the <a href="index.html">main page</a></p>
commit daa783141e82f84beb3264574a3533f1eee1cb25
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Dec 12 18:57:38 2007 +0000

    add an authors page

diff --git a/docs/.gitignore b/docs/.gitignore
index 891430b..d436efd 100644
--- a/docs/.gitignore
+++ b/docs/.gitignore
@@ -1,4 +1,3 @@
 Makefile.in
 Makefile
-*.html
 
diff --git a/docs/html/img/author-hughsie.png b/docs/html/img/author-hughsie.png
new file mode 100644
index 0000000..40548a6
Binary files /dev/null and b/docs/html/img/author-hughsie.png differ
diff --git a/docs/html/img/author-unknown.png b/docs/html/img/author-unknown.png
new file mode 100644
index 0000000..130f8d7
Binary files /dev/null and b/docs/html/img/author-unknown.png differ
diff --git a/docs/html/pk-authors.html b/docs/html/pk-authors.html
new file mode 100644
index 0000000..da18eab
--- /dev/null
+++ b/docs/html/pk-authors.html
@@ -0,0 +1,59 @@
+<html>
+<head>
+<title>PackageKit</title>
+<link rel="stylesheet" href="style.css" type="text/css" media="screen"/>
+</head>
+<body>
+
+<table align="center" class="title">
+<tr>
+ <td><img src="img/packagekit.png"/></td>
+ <td width="95%" valign="middle"><p class="title">Who develops PackageKit?</p></td>
+ <td><img src="img/packagekit.png"/></td>
+</tr>
+</table>
+
+<p>Back to the <a href="index.html">main page</a></p>
+
+<h1>Who develops PackageKit?</h1>
+
+<table cellpadding="10">
+<tr>
+ <td>
+  <img src="img/author-hughsie.png"/><!-- image should be 120px wide -->
+ </td>
+ <td>
+  <h2>Richard Hughes</h2>
+  <p>
+   Richard has 6 years of experience developing open source software.
+   He is the maintainer of PackageKit and GNOME Power Manager.
+  </p>
+  <p>
+   Richard has recently graduated from the University of Surrey with a Masters
+   in Electronics Engineering.
+   He currently works for a large defense company with all open source work
+   done in his free time.
+   Richard's outside interests include playing rugby union, and eating good food.
+  </p>
+   <b>Responsible for: packagekitd</b>
+  <p>
+ </td>
+</tr>
+<tr>
+ <td>
+  <img src="img/author-unknown.png"/><!-- image should be 120px wide -->
+ </td>
+ <td>
+  <h2>Tom Parker</h2>
+  <p>
+   Information about Tom etc....
+  </p>
+ </td>
+</tr>
+</table>
+
+<p>Back to the <a href="index.html">main page</a></p>
+
+</body>
+</html>
+
commit d2189ff748cd6eaf6c4b1ba9b9e17d4f6f7096fa
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Dec 12 18:05:39 2007 +0000

    add some more items to the TODO

diff --git a/TODO b/TODO
index 6275c0c..91c19a4 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,43 @@
 Order of no particular importance:
 
+* Lots of the functions are not well commented with gtk-doc. Most
+important is to get the libpackagekit/*.c annotated as it's used in
+other projects. This is probably quite a boring job but is a good way to
+work out how PackageKit is put together.
+
+* We need to make sure the html documentation is still correct and easy
+to read - does any of it sound like technobabble? Is it easy enough for
+developers to get detailed information about how to contribute?
+
+* We need to audit all the strings in gnome-packagekit so that they are
+easily localisable and don't contain markup. This is one for you if you
+are also a translator.
+
+* We need some yelp documentation for the gnome-packagekit tools. This
+will mean getting screenshots and generally explaining how to use the
+tools.
+
+* We need a proper security audit of the packagekitd daemon. We are
+running as root, so we need to make sure we are not doing anything
+insane that would mean we could crash and do bad things.
+
+* We need more unit tests where we can actually simulate _using_
+packagekit, probably using an enhanced dummy backend and libpackagekit.
+This is a tricky one as we can't assume we have the
+org.freedesktop.PackageKit.conf file installed in the system prefix -
+maybe we can #ifdef the daemon to run in the session bus for some
+testing.
+
+* The gnome-packagekit tools don't exactly conform the the GNOME Human
+Interface Guidelines (HIG). Someone needs to evaluate the GUI tools and
+suggest changing some control types, adding key-shortcuts and tooltips
+and changing the spacing between widgets where needed.
+
+* Maybe we need to have on the website who is responsible for what, i.e.
+that Ken and Elliot are the conary dudes, and Luke and Tim are the yum
+dudes, etc. Maybe photos and a short two sentence profile might be a
+good idea too.
+
 *** write to the database for config stuff
  - Probably should move the job number too
 
commit 94aa4e8ab32e5feae959b23dc6fed382abc968fc
Author: James Bowes <jbowes at dangerouslyinc.com>
Date:   Tue Dec 11 20:51:29 2007 -0500

    Add gtkdocize line in autogen.sh to add missing gtk-doc.make

diff --git a/autogen.sh b/autogen.sh
index b881e24..6276d31 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -17,6 +17,7 @@ if [[ -z "$*" && "x$NOCONFIGURE" == "x" ]] ; then
   echo
 fi
 
+(cd $srcdir && gtkdocize) || exit 1
 (cd $srcdir && autoreconf --force --install) || exit 1
 
 conf_flags="--enable-maintainer-mode --enable-gtk-doc"
commit a226e3a2d6219ffd3b07594fe81fb59cdb90bbbb
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 11 23:37:27 2007 +0000

    Try to fix the waf build

diff --git a/docs/wscript_build b/docs/wscript_build
new file mode 100644
index 0000000..58ea7db
--- /dev/null
+++ b/docs/wscript_build
@@ -0,0 +1,12 @@
+#! /usr/bin/env python
+# encoding: utf-8
+#
+# Copyright (C) 2007 Richard Hughes <richard at hughsie.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.
+
+bld.add_subdirs('spec')
commit bba3f577910c0e760d630c9b0e5bc504854b1c74
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Dec 11 23:26:28 2007 +0000

    add gtk-doc support into libpackagekit. depressing reading

diff --git a/.gitignore b/.gitignore
index 2fe6525..53dd81f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -57,4 +57,5 @@ NEWS.new
 _build_
 waf-lightc
 wafadmin
+packagekit.types
 
diff --git a/Makefile.am b/Makefile.am
index 99c96b1..3e18a09 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,6 @@ AUTOMAKE_OPTIONS = 1.7
 NULL =
 
 SUBDIRS = 						\
-	docs						\
 	policy						\
 	etc						\
 	man						\
@@ -16,6 +15,7 @@ SUBDIRS = 						\
 	client						\
 	backends					\
 	python						\
+	docs						\
 	$(NULL)
 
 pkgconfigdir = $(libdir)/pkgconfig
diff --git a/configure.ac b/configure.ac
index d877763..ef864ba 100755
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,6 @@ AC_INIT(PackageKit, 0.1.5)
 AC_CONFIG_SRCDIR(src)
 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 AM_CONFIG_HEADER(config.h)
-GTK_DOC_CHECK([1.3])
 
 # libtool versioning - this applies to libpackagekit
 #
@@ -26,6 +25,7 @@ AC_PROG_CC
 AC_PROG_INSTALL
 AM_PROG_CC_C_O
 AM_PROG_LIBTOOL
+GTK_DOC_CHECK([1.3])
 
 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
 
@@ -462,6 +462,7 @@ docs/Makefile
 docs/html/Makefile
 docs/html/img/Makefile
 docs/spec/Makefile
+docs/api/Makefile
 contrib/Makefile
 contrib/yum-packagekit/Makefile
 backends/Makefile
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 10a6120..f3c609e 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1,6 +1,7 @@
 NULL =
 
 SUBDIRS = 						\
+	api						\
 	html						\
 	spec						\
 	$(NULL)
diff --git a/docs/api/.gitignore b/docs/api/.gitignore
new file mode 100644
index 0000000..2925953
--- /dev/null
+++ b/docs/api/.gitignore
@@ -0,0 +1,21 @@
+Makefile.in
+Makefile.libs
+.libs
+tmpl
+xml
+html
+html-build.stamp
+html.stamp
+packagekit-docs.xml
+packagekit.args
+packagekit.hierarchy
+packagekit.interfaces
+packagekit.prerequisites
+packagekit.signals
+packagekit.types
+scan-build.stamp
+sgml-build.stamp
+sgml.stamp
+tmpl-build.stamp
+tmpl.stamp
+
diff --git a/docs/api/Makefile.am b/docs/api/Makefile.am
new file mode 100644
index 0000000..aa1c17f
--- /dev/null
+++ b/docs/api/Makefile.am
@@ -0,0 +1,79 @@
+NULL =
+
+AUTOMAKE_OPTIONS = 1.7
+
+# The name of the module.
+DOC_MODULE=packagekit
+
+# The top-level SGML file.
+DOC_MAIN_SGML_FILE=packagekit-docs.xml
+
+# Extra options to supply to gtkdoc-scan
+SCAN_OPTIONS=--ignore-headers=config.h
+
+# The directory containing the source code. Relative to $(srcdir)
+DOC_SOURCE_DIR=../../libpackagekit
+
+# Used for dependencies
+HFILE_GLOB=$(top_srcdir)/libpackagekit/*.h
+CFILE_GLOB=$(top_srcdir)/libpackagekit/*.c
+
+# Headers to ignore			\
+IGNORE_HFILES= \
+	pk-marshal.h
+	$(NULL)
+
+# CFLAGS and LDFLAGS for compiling scan program. Only needed
+# if $(DOC_MODULE).types is non-empty.
+INCLUDES = \
+	$(POLKIT_CFLAGS)				\
+	$(DBUS_CFLAGS)					\
+	$(GLIB_CFLAGS)			\
+	-I$(top_builddir)/libpackagekit	\
+	-I$(top_srcdir)/libpackagekit	\
+	-I$(top_srcdir)/libselftest	\
+	-I$(top_srcdir)/libgbus		\
+	$(NULL)
+
+PK_LIBS =						\
+	$(top_builddir)/libpackagekit/libpackagekit.la	\
+	$(NULL)
+
+GTKDOC_LIBS = \
+	$(GLIB_LIBS)				\
+	$(DBUS_LIBS)				\
+	$(SQLITE_LIBS)				\
+	$(PK_LIBS)				\
+	$(POLKIT_LIBS)				\
+	$(NULL)
+
+# Extra options to supply to gtkdoc-mkdb
+MKDB_OPTIONS=--sgml-mode --output-format=xml
+
+# Extra options to supply to gtkdoc-mktmpl
+MKTMPL_OPTIONS=
+
+# Non-autogenerated SGML files to be included in $(DOC_MAIN_SGML_FILE)
+content_files =  			    \
+	$(NULL)
+
+# Images to copy into HTML directory
+HTML_IMAGES = 				\
+	$(NULL)
+
+# Extra options to supply to gtkdoc-fixref
+FIXXREF_OPTIONS=
+
+MAINTAINERCLEANFILES =	\
+	*~		\
+	Makefile.in	\
+	packagekit.types	\
+	packagekit-*.txt	\
+	$(NULL)
+
+if ENABLE_GTK_DOC
+include $(top_srcdir)/gtk-doc.make
+else
+EXTRA_DIST =
+endif
+
commit 99275bfbf13cdb77f4b292f90f0310de1697be3f
Author: Robin Norwood <rnorwood at redhat.com>
Date:   Tue Dec 11 15:52:12 2007 -0500

    Fix a couple of minor typos in the docs.

diff --git a/libpackagekit/pk-common.c b/libpackagekit/pk-common.c
index 537658f..99196f8 100644
--- a/libpackagekit/pk-common.c
+++ b/libpackagekit/pk-common.c
@@ -403,7 +403,7 @@ out:
  * This function is a much safer way of doing strcmp as it checks for
  * NULL first, and returns boolean TRUE, not zero for success.
  *
- * Return value: %TRUE if the string are bot non-%NULL and the same.
+ * Return value: %TRUE if the string are both non-%NULL and the same.
  **/
 gboolean
 pk_strequal (const gchar *id1, const gchar *id2)
diff --git a/libpackagekit/pk-package-id.c b/libpackagekit/pk-package-id.c
index d5ce38f..0c52771 100644
--- a/libpackagekit/pk-package-id.c
+++ b/libpackagekit/pk-package-id.c
@@ -168,7 +168,7 @@ pk_package_id_build (const gchar *name, const gchar *version,
  * pk_package_id_free:
  * @ident: the #PkPackageId object
  *
- * Return value: %TRUE is the #PkPackageId object was freed.
+ * Return value: %TRUE if the #PkPackageId object was freed.
  **/
 gboolean
 pk_package_id_free (PkPackageId *ident)



More information about the PackageKit mailing list