[PackageKit-commit] packagekit: Branch 'master' - 14 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Mon May 12 01:55:20 PDT 2008
NEWS | 34 ++++++++
autogen.sh | 8 ++
backends/apt2/profiler.py | 19 ++++
backends/opkg/pk-backend-opkg.c | 8 +-
backends/zypp/pk-backend-zypp.cpp | 93 ++++++-----------------
backends/zypp/zypp-events.h | 24 ++++++
backends/zypp/zypp-utils.cpp | 107 ++++++++++++++++++++++++++-
backends/zypp/zypp-utils.h | 36 +++++++++
configure.ac | 2
contrib/yum-packagekit/refresh-packagekit.py | 2
docs/html/pk-download.html | 1
docs/html/pk-help.html | 9 +-
docs/html/update-icons.sh | 9 ++
docs/html/upload.sh | 9 ++
src/run-pk.sh | 7 +
tools/add-error-enum.sh | 7 +
tools/add-method.sh | 7 +
tools/backend-change.sh | 9 ++
tools/create-coverage-report.sh | 7 +
tools/mugshot.sh | 9 ++
tools/push-fdo.sh | 7 +
tools/rpmbuild.sh | 7 +
tools/yum-get-groups.sh | 9 ++
23 files changed, 350 insertions(+), 80 deletions(-)
New commits:
commit ebbbfa191257861bd19bd47ba646dce590b51858
Author: Richard Hughes <richard at hughsie.com>
Date: Sun May 11 17:44:57 2008 +0100
add some updated copyright attributions on request of James Westby
diff --git a/autogen.sh b/autogen.sh
index 42e7531..70925ea 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,5 +1,13 @@
#!/bin/sh
+# Copyright (C) 2008 Richard Hughes <richard at hughsie.com>
+#
# Run this to generate all the initial makefiles, etc.
+#
+# 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.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
diff --git a/backends/apt2/profiler.py b/backends/apt2/profiler.py
index 8a41b82..1b5d30f 100644
--- a/backends/apt2/profiler.py
+++ b/backends/apt2/profiler.py
@@ -1,4 +1,23 @@
#!/usr/bin/env python
+# 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.
+
+# Copyright (C) 2008
+# Sebastian Heinlein <sebi at glatzor.de>
+
"""
Allows to start the apt2 backend in a profling mode
"""
diff --git a/backends/zypp/zypp-events.h b/backends/zypp/zypp-events.h
index 2955d98..d491f99 100644
--- a/backends/zypp/zypp-events.h
+++ b/backends/zypp/zypp-events.h
@@ -1,3 +1,27 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (c) 2007 Novell, Inc.
+ * Copyright (c) 2007 Boyd Timothy <btimothy at gmail.com>
+ * Copyright (c) 2007-2008 Stefan Haas <shaas at suse.de>
+ * Copyright (c) 2007-2008 Scott Reeves <sreeves at novell.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.
+ */
+
#ifndef _ZYPP_EVENTS_H_
#define _ZYPP_EVENTS_H_
diff --git a/backends/zypp/zypp-utils.cpp b/backends/zypp/zypp-utils.cpp
index e25b5c3..2b848f0 100644
--- a/backends/zypp/zypp-utils.cpp
+++ b/backends/zypp/zypp-utils.cpp
@@ -1,3 +1,27 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (c) 2007 Novell, Inc.
+ * Copyright (c) 2007 Boyd Timothy <btimothy at gmail.com>
+ * Copyright (c) 2007-2008 Stefan Haas <shaas at suse.de>
+ * Copyright (c) 2007-2008 Scott Reeves <sreeves at novell.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 <sstream>
#include <stdlib.h>
#include <glib.h>
diff --git a/backends/zypp/zypp-utils.h b/backends/zypp/zypp-utils.h
index 01a972a..9e3bad1 100644
--- a/backends/zypp/zypp-utils.h
+++ b/backends/zypp/zypp-utils.h
@@ -1,3 +1,27 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (c) 2007 Novell, Inc.
+ * Copyright (c) 2007 Boyd Timothy <btimothy at gmail.com>
+ * Copyright (c) 2007-2008 Stefan Haas <shaas at suse.de>
+ * Copyright (c) 2007-2008 Scott Reeves <sreeves at novell.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.
+ */
+
#ifndef _ZYPP_UTILS_H_
#define _ZYPP_UTILS_H_
diff --git a/contrib/yum-packagekit/refresh-packagekit.py b/contrib/yum-packagekit/refresh-packagekit.py
index 634d585..9c0bdf4 100644
--- a/contrib/yum-packagekit/refresh-packagekit.py
+++ b/contrib/yum-packagekit/refresh-packagekit.py
@@ -1,6 +1,6 @@
# A plugin for yum which notifies PackageKit to refresh its data
#
-# Written by James Bowes <jbowes at redhat.com>
+# Copyright (c) 2007 James Bowes <jbowes at redhat.com>
#
# 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
diff --git a/docs/html/update-icons.sh b/docs/html/update-icons.sh
index c510728..ccda09b 100755
--- a/docs/html/update-icons.sh
+++ b/docs/html/update-icons.sh
@@ -1,2 +1,11 @@
+#!/bin/sh
+# Copyright (C) 2008 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.
+
cp -v ../../../gnome-packagekit/data/icons/48x48/status/pk-update-*.png img/
diff --git a/docs/html/upload.sh b/docs/html/upload.sh
index 8f5cd30..09ad264 100755
--- a/docs/html/upload.sh
+++ b/docs/html/upload.sh
@@ -1,3 +1,12 @@
+#!/bin/sh
+# Copyright (C) 2008 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.
+
USER="hughsie"
SERVER="packagekit.org"
LOCATION="/srv/www/html"
diff --git a/src/run-pk.sh b/src/run-pk.sh
index 8f67e2d..17207db 100755
--- a/src/run-pk.sh
+++ b/src/run-pk.sh
@@ -1,4 +1,11 @@
#!/bin/sh
+# Copyright (C) 2008 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.
if [ "$USER" != "root" ]; then
echo "You are not running this script as root. Use sudo."
diff --git a/tools/add-error-enum.sh b/tools/add-error-enum.sh
index 7e55ef2..f78c891 100755
--- a/tools/add-error-enum.sh
+++ b/tools/add-error-enum.sh
@@ -1,4 +1,11 @@
#!/bin/sh
+# Copyright (C) 2008 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.
$EDITOR docs/spec/pk-introduction.xml libpackagekit/pk-enum.h libpackagekit/pk-enum.c ../gnome-packagekit/src/gpk-common.c
diff --git a/tools/add-method.sh b/tools/add-method.sh
index 2f95d34..59e55d4 100755
--- a/tools/add-method.sh
+++ b/tools/add-method.sh
@@ -1,4 +1,11 @@
#!/bin/sh
+# Copyright (C) 2008 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.
$EDITOR docs/spec/pk-methods.xml src/pk-interface-transaction.xml src/pk-transaction.h src/pk-transaction.c python/packagekit/backend.py python/packagekit/daemonBackend.py libpackagekit/pk-client.h libpackagekit/pk-client.c libpackagekit/pk-enum.h libpackagekit/pk-enum.c client/pk-console.c backends/*/pk-*.c* src/pk-backend-dbus.c src/pk-backend-dbus.h contrib/*.bash src/pk-engine.c src/pk-backend.h docs/html/pk-faq.html ../gnome-packagekit/src/gpk-common.c
diff --git a/tools/backend-change.sh b/tools/backend-change.sh
index 64f3705..2293912 100755
--- a/tools/backend-change.sh
+++ b/tools/backend-change.sh
@@ -1,3 +1,12 @@
+#!/bin/sh
+# Copyright (C) 2008 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.
+
make clean
./autogen.sh --prefix=/home/hughsie/.root --with-default-backend=$1 --enable-tests
make
diff --git a/tools/create-coverage-report.sh b/tools/create-coverage-report.sh
index 095ca48..a78d9ea 100755
--- a/tools/create-coverage-report.sh
+++ b/tools/create-coverage-report.sh
@@ -1,4 +1,11 @@
#!/bin/sh
+# Copyright (C) 2008 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.
TOTAL_ACTUAL=0
TOTAL_COVERED=0
diff --git a/tools/mugshot.sh b/tools/mugshot.sh
index 75e5f4a..ab85e17 100755
--- a/tools/mugshot.sh
+++ b/tools/mugshot.sh
@@ -1,2 +1,11 @@
+#!/bin/sh
+# Copyright (C) 2008 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.
+
wget http://mugshot.org/xml/allApplications
diff --git a/tools/push-fdo.sh b/tools/push-fdo.sh
index 91cf6b8..32c6fa9 100755
--- a/tools/push-fdo.sh
+++ b/tools/push-fdo.sh
@@ -1,4 +1,11 @@
#!/bin/sh
+# Copyright (C) 2008 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.
git push git+ssh://hughsient@git.freedesktop.org/git/packagekit
diff --git a/tools/rpmbuild.sh b/tools/rpmbuild.sh
index 28787f3..ebbd8f7 100755
--- a/tools/rpmbuild.sh
+++ b/tools/rpmbuild.sh
@@ -1,4 +1,11 @@
#!/bin/sh
+# Copyright (C) 2008 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.
sudo echo "Build!"
#autobuild.sh all PolicyKit
diff --git a/tools/yum-get-groups.sh b/tools/yum-get-groups.sh
index 0710d27..8c72910 100755
--- a/tools/yum-get-groups.sh
+++ b/tools/yum-get-groups.sh
@@ -1,2 +1,11 @@
+#!/bin/sh
+# Copyright (C) 2008 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.
+
cat ../backends/yum/helpers/yumBackend.py | grep "GROUP_" | cut -d":" -f2 | cut -d"," -f1 | cut -d" " -f2 | sort| uniq
commit 1771764355b842f26b04c5cdd2fcd8d7f33a7096
Author: Richard Hughes <richard at hughsie.com>
Date: Fri May 9 21:02:18 2008 +0100
post release version bump
diff --git a/configure.ac b/configure.ac
index 24c7cde..9d734e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ(2.52)
-AC_INIT(PackageKit, 0.2.1)
+AC_INIT(PackageKit, 0.2.2)
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
commit fec79dee222195e7582b662ea71002499d54134e
Author: Richard Hughes <richard at hughsie.com>
Date: Fri May 9 20:59:22 2008 +0100
Release version 0.2.1
diff --git a/NEWS b/NEWS
index 077fb2b..fd15b29 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,37 @@
+Version 0.2.1
+~~~~~~~~~~~~~
+Released: 2008-05-09
+
+* Backends:
+ - alpm: added backend_search_group (Valeriy Lyasotskiy)
+ - alpm: added more group mapping (Valeriy Lyasotskiy)
+ - alpm: fixes backend_install_files stuff moved to another thread (Valeriy Lyasotskiy)
+ - box: build fix (Grzegorz Dabrowski)
+ - opkg: add a package callback in remove_packages (Thomas Wood)
+ - opkg: implement GetDetails using new opkg api (Thomas Wood)
+ - opkg: update to latest opkg api (Thomas Wood)
+ - zypp: added repo-name for gpg-handling (Stefan Haas)
+ - zypp: check for network before refreshing (Stefan Haas)
+ - zypp: changed backend to handle package arrays (Scott Reeves)
+ - zypp: refresh the repos before checking for updates (Stefan Haas)
+ - xypp: fix build breakage after 'change some methods to accept more than one param' (Stefan Haas)
+ - poldek: build fix (Marcin Banasiak)
+ - pisi: fix build breakage (S.ÃaÄlar Onur)
+
+* Translations
+ - Fixed a typo in the Russian translation (Valeriy Lyasotskiy)
+
+* New features:
+ - Add pk_backend_set_array so we can save trivial data arrays (Richard Hughes)
+ - Change some methods to accept more than one parameter (Richard Hughes)
+ InstallPackage(s) -> InstallPackages(as)
+ RemovePackage(s) -> RemovePackages(as)
+ InstallFile(s) -> InstallFiles(as)
+
+* Bugfixes:
+ - Correct the gtk-doc markup so the ::details signal is descibed properly (Richard Hughes)
+ - Fix manpage build, make it cross-distro (Valeriy Lyasotskiy)
+
Version 0.2.0
~~~~~~~~~~~~~~
Released: 2008-05-06
diff --git a/docs/html/pk-download.html b/docs/html/pk-download.html
index 0e46400..6f796b8 100644
--- a/docs/html/pk-download.html
+++ b/docs/html/pk-download.html
@@ -61,6 +61,7 @@ Released versions are found on
<tr><td>0.1.10</td><td></td><td>2008-03-28</td></tr>
<tr><td>0.1.11</td><td></td><td>2008-04-05</td></tr>
<tr><td>0.2.0</td><td></td><td>2008-05-06</td></tr>
+<tr><td>0.2.1</td><td></td><td>2008-05-09</td></tr>
</table>
<h2>Dependencies</h2>
diff --git a/docs/html/pk-help.html b/docs/html/pk-help.html
index 6945996..5b44d50 100644
--- a/docs/html/pk-help.html
+++ b/docs/html/pk-help.html
@@ -69,17 +69,15 @@ If you want to work on a feature and bring it forward, please just jump on the m
as for instructions!
</p>
<p>
-<b>0.2.1</b> - To be released June 2008
+<b>0.2.2</b> - To be released June 2008
</p>
<ul>
-<li>Multiple EULA and GPG signature transaction support <i>(55%)</i></li>
-<li>Multiple package installs in the API <i>(0%)</i></li>
-<li>Multiple package installs from gpk-install-package-name <i>(0%)</i></li>
+<li>Multiple package install and remove from pkcon <i>(0%)</i></li>
<li>NetworkManager integration so we can detect GPRS (and modem) connections. <i>(10%)</i></li>
-<li>Filter for src-packages. <i>(0%)</i></li>
+<li>Filter for source packages. <i>(0%)</i></li>
</ul>
<p>
-<b>0.2.2</b> - To be released July 2008
+<b>0.2.3</b> - To be released July 2008
</p>
<ul>
<li>Category support (install/remove whole categories of applications)<i>(0%)</i></li>
commit 74fc9409ffed8eda25f46ae9959910e68f6cef13
Author: Thomas Wood <thomas at openedhand.com>
Date: Fri May 9 20:04:21 2008 +0100
opkg: add a package callback in remove_packages
diff --git a/backends/opkg/pk-backend-opkg.c b/backends/opkg/pk-backend-opkg.c
index 60a6651..ecc97be 100644
--- a/backends/opkg/pk-backend-opkg.c
+++ b/backends/opkg/pk-backend-opkg.c
@@ -383,6 +383,7 @@ backend_remove_packages_thread (PkBackend *backend)
g_free (data);
pi = pk_package_id_new_from_string (package_ids[0]);
+ pk_backend_package (backend, PK_INFO_ENUM_REMOVING, package_ids[0], NULL);
opkg_set_option (opkg, "autoremove", &autoremove);
opkg_set_option (opkg, "force_removal_of_dependent_packages", &allow_deps);
commit dcc8be8dd3430b2d51cd3f51a1b8a3a6a4615e22
Author: Thomas Wood <thomas at openedhand.com>
Date: Fri May 9 20:03:11 2008 +0100
opkg: fix broken install due to api changes
diff --git a/backends/opkg/pk-backend-opkg.c b/backends/opkg/pk-backend-opkg.c
index bec9de8..60a6651 100644
--- a/backends/opkg/pk-backend-opkg.c
+++ b/backends/opkg/pk-backend-opkg.c
@@ -338,11 +338,12 @@ backend_install_packages_thread (PkBackend *backend)
{
PkPackageId *pi;
gint err;
- const gchar *package_ids;
+ const gchar *package_id;
- package_ids = pk_backend_get_string (backend, "package_ids");
+ package_id = pk_backend_get_string (backend, "pkid");
+ pk_backend_package (backend, PK_INFO_ENUM_INSTALLING, package_id, NULL);
- pi = pk_package_id_new_from_string (package_ids);
+ pi = pk_package_id_new_from_string (package_id);
err = opkg_install_package (opkg, pi->name, pk_opkg_progress_cb, backend);
if (err != 0)
commit f39c26db0404b60a4b41993a629a752a55bdde43
Author: Stefan Haas <shaas at suse.de>
Date: Fri May 9 17:31:34 2008 +0200
added repo-name for gpg-handling
diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index c44122d..746da82 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -80,6 +80,7 @@ enum DepsBehavior {
* each zypp backend that is created.
*/
static std::map<PkBackend *, EventDirector *> _eventDirectors;
+
std::map<PkBackend *, std::vector<std::string> *> _signatures;
/**
@@ -112,6 +113,7 @@ backend_destroy (PkBackend *backend)
}
delete (_signatures[backend]);
+ g_free (_repoName);
}
/**
diff --git a/backends/zypp/zypp-utils.cpp b/backends/zypp/zypp-utils.cpp
index c6dd5b7..e25b5c3 100644
--- a/backends/zypp/zypp-utils.cpp
+++ b/backends/zypp/zypp-utils.cpp
@@ -28,6 +28,7 @@
#include "zypp-utils.h"
+gchar * _repoName;
/**
* 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 ...
@@ -359,7 +360,7 @@ zypp_signature_required (PkBackend *backend, const zypp::PublicKey &key)
if (std::find (_signatures[backend]->begin (), _signatures[backend]->end (), key.id ()) == _signatures[backend]->end ()) {
pk_backend_repo_signature_required (backend,
"dummy;0.0.1;i386;data",
- "TODO: Repo-Name",
+ _repoName,
key.path ().c_str (),
key.id ().c_str (),
key.id ().c_str (),
@@ -382,7 +383,7 @@ zypp_signature_required (PkBackend *backend, const std::string &file, const std:
if (std::find (_signatures[backend]->begin (), _signatures[backend]->end (), id) == _signatures[backend]->end ()) {
pk_backend_repo_signature_required (backend,
"dummy;0.0.1;i386;data",
- "TODO: Repo-Name",
+ _repoName,
file.c_str (),
id.c_str (),
id.c_str (),
@@ -405,7 +406,7 @@ zypp_signature_required (PkBackend *backend, const std::string &file)
if (std::find (_signatures[backend]->begin (), _signatures[backend]->end (), file) == _signatures[backend]->end ()) {
pk_backend_repo_signature_required (backend,
"dummy;0.0.1;i386;data",
- "TODO: Repo-Name",
+ _repoName,
file.c_str (),
"UNKNOWN",
file.c_str (),
@@ -764,6 +765,7 @@ zypp_refresh_cache (PkBackend *backend, gboolean force)
try {
// Refreshing metadata
+ _repoName = g_strdup (repo.alias ().c_str ());
manager.refreshMetadata (repo, force == TRUE ?
zypp::RepoManager::RefreshForced :
zypp::RepoManager::RefreshIfNeeded);
diff --git a/backends/zypp/zypp-utils.h b/backends/zypp/zypp-utils.h
index 4bea80b..01a972a 100644
--- a/backends/zypp/zypp-utils.h
+++ b/backends/zypp/zypp-utils.h
@@ -38,6 +38,12 @@ typedef enum {
*/
extern std::map<PkBackend *, std::vector<std::string> *> _signatures;
+/** A string to store the last refreshed repo
+ * this is needed for gpg-key handling stuff (UGLY HACK)
+ * FIXME
+ */
+extern gchar *_repoName;
+
zypp::ZYpp::Ptr get_zypp ();
gboolean zypp_is_changeable_media (const zypp::Url &url);
commit 315a49e8f821a934d603cb23d0a8c377a0fa2edf
Merge: e3c4c56... 651f860...
Author: Stefan Haas <shaas at suse.de>
Date: Fri May 9 14:42:23 2008 +0200
Merge branch 'master' of git+ssh://shaas@git.packagekit.org/srv/git/PackageKit
commit e3c4c56ccd9ce6bf9eb25c403f4628cb43f87a88
Author: Stefan Haas <shaas at suse.de>
Date: Fri May 9 14:42:01 2008 +0200
added src-package filter to TODO list
diff --git a/docs/html/pk-help.html b/docs/html/pk-help.html
index 1842738..6945996 100644
--- a/docs/html/pk-help.html
+++ b/docs/html/pk-help.html
@@ -76,6 +76,7 @@ as for instructions!
<li>Multiple package installs in the API <i>(0%)</i></li>
<li>Multiple package installs from gpk-install-package-name <i>(0%)</i></li>
<li>NetworkManager integration so we can detect GPRS (and modem) connections. <i>(10%)</i></li>
+<li>Filter for src-packages. <i>(0%)</i></li>
</ul>
<p>
<b>0.2.2</b> - To be released July 2008
commit 1db0037e9d6fc35064f6efccf91d558e7f2f5671
Author: Stefan Haas <shaas at suse.de>
Date: Fri May 9 14:35:05 2008 +0200
show also src-packages
diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index 5887947..c44122d 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -468,10 +468,13 @@ backend_get_details_thread (PkBackend *backend)
std::vector<zypp::sat::Solvable> *v;
std::vector<zypp::sat::Solvable> *v2;
+ std::vector<zypp::sat::Solvable> *v3;
v = zypp_get_packages_by_name ((const gchar *)pi->name, zypp::ResKind::package, TRUE);
v2 = zypp_get_packages_by_name ((const gchar *)pi->name, zypp::ResKind::patch, TRUE);
+ v3 = zypp_get_packages_by_name ((const gchar *)pi->name, zypp::ResKind::srcpackage, TRUE);
v->insert (v->end (), v2->begin (), v2->end ());
+ v->insert (v->end (), v3->begin (), v3->end ());
zypp::sat::Solvable package;
for (std::vector<zypp::sat::Solvable>::iterator it = v->begin ();
@@ -488,6 +491,7 @@ backend_get_details_thread (PkBackend *backend)
}
delete (v);
delete (v2);
+ delete (v3);
if (package == NULL) {
pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_FOUND, "couldn't find package");
@@ -1105,7 +1109,11 @@ backend_resolve_thread (PkBackend *backend)
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
std::vector<zypp::sat::Solvable> *v;
+ std::vector<zypp::sat::Solvable> *v2;
v = zypp_get_packages_by_name (package_id, zypp::ResKind::package, TRUE);
+ v2 = zypp_get_packages_by_name (package_id, zypp::ResKind::srcpackage, TRUE);
+
+ v->insert (v->end (), v2->begin (), v2->end ());
zypp::sat::Solvable package;
for (std::vector<zypp::sat::Solvable>::iterator it = v->begin ();
@@ -1119,6 +1127,7 @@ backend_resolve_thread (PkBackend *backend)
}
delete (v);
+ delete (v2);
if (package == NULL) {
pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_FOUND, "couldn't find package");
@@ -1162,10 +1171,12 @@ backend_find_packages_thread (PkBackend *backend)
pk_backend_no_percentage_updates (backend);
std::vector<zypp::sat::Solvable> *v = new std::vector<zypp::sat::Solvable>;
+ std::vector<zypp::sat::Solvable> *v2 = new std::vector<zypp::sat::Solvable>;
switch (mode) {
case SEARCH_TYPE_NAME:
v = zypp_get_packages_by_name (search, zypp::ResKind::package, TRUE);
+ v2 = zypp_get_packages_by_name (search, zypp::ResKind::srcpackage, TRUE);
break;
case SEARCH_TYPE_DETAILS:
v = zypp_get_packages_by_details (search, TRUE);
@@ -1175,8 +1186,11 @@ backend_find_packages_thread (PkBackend *backend)
break;
};
+ v->insert (v->end (), v2->begin (), v2->end ());
+
zypp_emit_packages_in_list (backend, v, filters);
delete (v);
+ delete (v2);
pk_backend_finished (backend);
return TRUE;
@@ -1345,7 +1359,11 @@ backend_get_files_thread (PkBackend *backend)
pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
std::vector<zypp::sat::Solvable> *v;
+ std::vector<zypp::sat::Solvable> *v2;
v = zypp_get_packages_by_name ((const gchar *)pi->name, zypp::ResKind::package, TRUE);
+ v2 = zypp_get_packages_by_name ((const gchar *)pi->name, zypp::ResKind::srcpackage, TRUE);
+
+ v->insert (v->end (), v2->begin (), v2->end ());
zypp::sat::Solvable package;
for (std::vector<zypp::sat::Solvable>::iterator it = v->begin ();
@@ -1360,6 +1378,7 @@ backend_get_files_thread (PkBackend *backend)
}
delete (v);
+ delete (v2);
if (package == NULL) {
pk_backend_error_code (backend, PK_ERROR_ENUM_PACKAGE_NOT_FOUND, "couldn't find package");
commit ae3d6e04154232fd1096b27f43fd630996a5d086
Merge: 2b8e8a5... b406efc...
Author: Stefan Haas <shaas at suse.de>
Date: Fri May 9 13:03:58 2008 +0200
Merge branch 'master' of git+ssh://shaas@git.packagekit.org/srv/git/PackageKit
commit 2b8e8a5792048bf8b121f84e82cb6360114f072c
Author: Stefan Haas <shaas at suse.de>
Date: Fri May 9 12:38:04 2008 +0200
check for network before refreshing
diff --git a/backends/zypp/zypp-utils.cpp b/backends/zypp/zypp-utils.cpp
index b39b643..c6dd5b7 100644
--- a/backends/zypp/zypp-utils.cpp
+++ b/backends/zypp/zypp-utils.cpp
@@ -724,7 +724,11 @@ zypp_build_package_id_capabilities (zypp::Capabilities caps)
gboolean
zypp_refresh_cache (PkBackend *backend, gboolean force)
{
- //Fixme - we should check the network status and bail if not online
+ if (!pk_backend_is_online (backend)) {
+ pk_backend_error_code (backend, PK_ERROR_ENUM_NO_NETWORK, "Cannot refresh cache whilst offline");
+ return FALSE;
+ }
+
pk_backend_set_status (backend, PK_STATUS_ENUM_REFRESH_CACHE);
pk_backend_set_percentage (backend, 0);
commit e8908def163b943f09c781001935afd459c48f6f
Merge: ece6478... 3b00658...
Author: Stefan Haas <shaas at suse.de>
Date: Fri May 9 11:04:13 2008 +0200
Merge branch 'master' of git+ssh://shaas@git.packagekit.org/srv/git/PackageKit
commit ece6478b10a6058ebcb12c9bf2ae6dd3268c1260
Merge: c7fe86e... 5e4d31c...
Author: Stefan Haas <shaas at suse.de>
Date: Fri May 9 09:53:59 2008 +0200
Merge branch 'master' of git+ssh://shaas@git.packagekit.org/srv/git/PackageKit
commit c7fe86e4032ea64a11d76a9e80e50fbd35695a37
Author: Stefan Haas <shaas at suse.de>
Date: Thu May 8 16:45:18 2008 +0200
changed refresh
diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
index bea45e0..5887947 100644
--- a/backends/zypp/pk-backend-zypp.cpp
+++ b/backends/zypp/pk-backend-zypp.cpp
@@ -549,73 +549,8 @@ backend_get_details (PkBackend *backend, const gchar *package_id)
static gboolean
backend_refresh_cache_thread (PkBackend *backend)
{
- //Fixme - we should check the network status and bail if not online
gboolean force = pk_backend_get_bool(backend, "force");
- pk_backend_set_status (backend, PK_STATUS_ENUM_REFRESH_CACHE);
- pk_backend_set_percentage (backend, 0);
-
- zypp::RepoManager manager;
- std::list <zypp::RepoInfo> repos;
- try
- {
- repos = manager.knownRepositories();
- }
- catch ( const zypp::Exception &e)
- {
- // FIXME: make sure this dumps out the right sring.
- pk_backend_error_code (backend, PK_ERROR_ENUM_REPO_NOT_FOUND, e.asUserString().c_str() );
- pk_backend_finished (backend);
- return FALSE;
- }
-
- int i = 1;
- int num_of_repos = repos.size ();
- int percentage_increment = 100 / num_of_repos;
-
- for (std::list <zypp::RepoInfo>::iterator it = repos.begin(); it != repos.end(); it++, i++) {
- zypp::RepoInfo repo (*it);
-
- // skip disabled repos
- if (repo.enabled () == false)
- continue;
-
- // skip changeable meda (DVDs and CDs). Without doing this,
- // the disc would be required to be physically present.
- if (zypp_is_changeable_media (*repo.baseUrlsBegin ()) == true)
- continue;
-
- try {
- // Refreshing metadata
- manager.refreshMetadata (repo, force == TRUE ?
- zypp::RepoManager::RefreshForced :
- zypp::RepoManager::RefreshIfNeeded);
- } catch (const zypp::Exception &ex) {
- pk_backend_error_code (backend, PK_ERROR_ENUM_INTERNAL_ERROR, "%s: %s", repo.alias ().c_str (), ex.asUserString ().c_str ());
- pk_backend_finished (backend);
- return FALSE;
- }
-
- try {
- // Building cache
- manager.buildCache (repo, force == TRUE ?
- zypp::RepoManager::BuildForced :
- zypp::RepoManager::BuildIfNeeded);
- //} catch (const zypp::repo::RepoNoUrlException &ex) {
- //} catch (const zypp::repo::RepoNoAliasException &ex) {
- //} catch (const zypp::repo::RepoUnknownTypeException &ex) {
- //} catch (const zypp::repo::RepoException &ex) {
- } catch (const zypp::Exception &ex) {
- // TODO: Handle the exceptions in manager.refreshMetadata
- pk_backend_error_code (backend, PK_ERROR_ENUM_INTERNAL_ERROR, "%s: %s",
- repo.alias ().c_str (), ex.asUserString().c_str() );
- pk_backend_finished (backend);
- return FALSE;
- }
-
- // Update the percentage completed
- pk_backend_set_percentage (backend, i == num_of_repos ? 100 : i * percentage_increment);
- }
-
+ zypp_refresh_cache (backend, force);
pk_backend_finished (backend);
return TRUE;
}
@@ -636,7 +571,10 @@ backend_get_updates_thread (PkBackend *backend)
pk_backend_set_percentage (backend, 0);
// refresh the repos before checking for updates
- backend_refresh_cache (backend, FALSE);
+ if (!zypp_refresh_cache (backend, FALSE)) {
+ pk_backend_finished (backend);
+ return FALSE;
+ }
zypp::ResPool pool = zypp_build_pool (TRUE);
pk_backend_set_percentage (backend, 40);
diff --git a/backends/zypp/zypp-utils.cpp b/backends/zypp/zypp-utils.cpp
index 5a762d9..b39b643 100644
--- a/backends/zypp/zypp-utils.cpp
+++ b/backends/zypp/zypp-utils.cpp
@@ -720,3 +720,74 @@ zypp_build_package_id_capabilities (zypp::Capabilities caps)
return package_ids;
}
+
+gboolean
+zypp_refresh_cache (PkBackend *backend, gboolean force)
+{
+ //Fixme - we should check the network status and bail if not online
+ pk_backend_set_status (backend, PK_STATUS_ENUM_REFRESH_CACHE);
+ pk_backend_set_percentage (backend, 0);
+
+ zypp::RepoManager manager;
+ std::list <zypp::RepoInfo> repos;
+ try
+ {
+ repos = manager.knownRepositories();
+ }
+ catch ( const zypp::Exception &e)
+ {
+ // FIXME: make sure this dumps out the right sring.
+ pk_backend_error_code (backend, PK_ERROR_ENUM_REPO_NOT_FOUND, e.asUserString().c_str() );
+ pk_backend_finished (backend);
+ return FALSE;
+ }
+
+ int i = 1;
+ int num_of_repos = repos.size ();
+ int percentage_increment = 100 / num_of_repos;
+
+ for (std::list <zypp::RepoInfo>::iterator it = repos.begin(); it != repos.end(); it++, i++) {
+ zypp::RepoInfo repo (*it);
+
+ // skip disabled repos
+ if (repo.enabled () == false)
+ continue;
+
+ // skip changeable meda (DVDs and CDs). Without doing this,
+ // the disc would be required to be physically present.
+ if (zypp_is_changeable_media (*repo.baseUrlsBegin ()) == true)
+ continue;
+
+ try {
+ // Refreshing metadata
+ manager.refreshMetadata (repo, force == TRUE ?
+ zypp::RepoManager::RefreshForced :
+ zypp::RepoManager::RefreshIfNeeded);
+ } catch (const zypp::Exception &ex) {
+ pk_backend_error_code (backend, PK_ERROR_ENUM_INTERNAL_ERROR, "%s: %s", repo.alias ().c_str (), ex.asUserString ().c_str ());
+ pk_backend_finished (backend);
+ return FALSE;
+ }
+
+ try {
+ // Building cache
+ manager.buildCache (repo, force == TRUE ?
+ zypp::RepoManager::BuildForced :
+ zypp::RepoManager::BuildIfNeeded);
+ //} catch (const zypp::repo::RepoNoUrlException &ex) {
+ //} catch (const zypp::repo::RepoNoAliasException &ex) {
+ //} catch (const zypp::repo::RepoUnknownTypeException &ex) {
+ //} catch (const zypp::repo::RepoException &ex) {
+ } catch (const zypp::Exception &ex) {
+ // TODO: Handle the exceptions in manager.refreshMetadata
+ pk_backend_error_code (backend, PK_ERROR_ENUM_INTERNAL_ERROR, "%s: %s",
+ repo.alias ().c_str (), ex.asUserString().c_str() );
+ pk_backend_finished (backend);
+ return FALSE;
+ }
+
+ // Update the percentage completed
+ pk_backend_set_percentage (backend, i == num_of_repos ? 100 : i * percentage_increment);
+ }
+ return TRUE;
+}
diff --git a/backends/zypp/zypp-utils.h b/backends/zypp/zypp-utils.h
index 5fed7dc..4bea80b 100644
--- a/backends/zypp/zypp-utils.h
+++ b/backends/zypp/zypp-utils.h
@@ -140,5 +140,11 @@ gchar ** zypp_convert_set_char (std::set<zypp::sat::Solvable> *set);
* build string of package_id's seperated by blanks out of the capabilities of a solvable
*/
gchar * zypp_build_package_id_capabilities (zypp::Capabilities caps);
+
+/**
+ * refresh the enabled repositories
+ */
+gboolean zypp_refresh_cache (PkBackend *backend, gboolean force);
+
#endif // _ZYPP_UTILS_H_
More information about the PackageKit-commit
mailing list