[PackageKit-commit] packagekit: Branch 'master' - 11 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Mon Aug 3 04:26:38 PDT 2009
NEWS | 101 +++++++++++++++++++++++++++++++++++++
backends/portage/portageBackend.py | 41 +++++++++------
backends/yum/yumMediaManagerOS.py | 2
configure.ac | 8 ++
contrib/PackageKit.spec.in | 1
docs/html/pk-download.html | 1
src/pk-backend.c | 2
src/pk-polkit-action-lookup.c | 40 +++++++++++++-
8 files changed, 174 insertions(+), 22 deletions(-)
New commits:
commit dc1b34690947817d835af5439ff1178f81896b82
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Aug 3 12:24:25 2009 +0100
Release version 0.5.1
diff --git a/NEWS b/NEWS
index 2c78ace..847b932 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,104 @@
+Version 0.5.1
+~~~~~~~~~~~~~
+Released: 2009-08-03
+
+Notes
+ - We've done some initial security review on this release, and the PackageKit
+ architecture in general. We've made a few small changes, but it all looked
+ pretty good overall. Certainly nothing to worry about.
+ See http://cgit.freedesktop.org/packagekit/plain/docs/security.txt
+ - This is the first release of PackageKit where multiple users with different
+ proxy servers is supported. Proxy server support was pretty broken before.
+ See http://cgit.freedesktop.org/packagekit/plain/docs/setting-the-proxy.txt
+ - We now detect security updates to shared libraries in use.
+ - Lots of bugfixes and a few new configure options
+
+Translations
+ - Updated translation for Malayalam (anipeter)
+ - Updated translation for Brazilian Portuguese (igor)
+ - Updated translation for Danish (kristho)
+ - Updated translation for Spanish (logan)
+ - Updated translation for German (nazgul)
+ - Updated translation for Polish (raven)
+ - Updated translation for Swedish (yeager)
+ - Updated translation for Hungarian (zoltanh721)
+
+New Features
+ - Check for pm-utils installation if pm-utils option is enabled (Mounir Lamouri)
+ - Adding 'strict' option to configure to add -Werror (auto-enabled in repo) (Mounir Lamouri)
+ - Add networkmanager, connman and service-packs options to prevent auto-magic deps (Mounir Lamouri)
+ - Add functionality to detect when shared libraries are being used that are updated in a security update (Richard Hughes)
+ - Limit the maximum number of requests a given user is able to request and queue (Richard Hughes)
+ - Limit the number of packages that can be processed by the daemon in one method call (Richard Hughes)
+ - Add a security document after some initial review (Richard Hughes)
+ - glib: Add a PkClientPool object to better manage async clients (Richard Hughes)
+ - Add uid and session to proxy mapping in the database (Richard Hughes)
+ - Add a document explaining how we map the proxy internally (Richard Hughes)
+ - Add arch filtering to the generic python filter helper (Richard Hughes)
+ - debuginfo-install: handle untrusted packages (Richard Hughes)
+ - Detect when the PolicyKit authentication was timed out, and show this as a message to the user (Richard Hughes)
+ - cnf: Search other directories that commands can be found in, not just /usr/bin (Richard Hughes)
+ - cnf: Show status rather than just hanging for a long time without any output (Richard Hughes)
+ - cnf: Handle SIGINT in command-not-found (Richard Hughes)
+ - glib: expose the some new properties on the PkClient object (Richard Hughes)
+
+Bugfixes
+ - Change remove-packages python backend function to get autoremove value (Mounir Lamouri)
+ - Fixed the python frontend to comply with the correct DBUS signatures and signals (Thomas Liu)
+ - Use the configured libexec dir, don't hardcode it (Vincent Untz)
+ - Prevent duplicate require-restart signal from being sent from the daemon (Richard Hughes)
+ - Rewrite the browser plugin in C, to fix several issues and add functionality (Richard Hughes)
+ - glib: Fix the signal type for destroy, and protect against unref in the handler (Richard Hughes)
+ - Remove all instances of atoi, it's just not secure (Richard Hughes)
+ - Send an ErrorCode when the authentication agent fails to be contacted (Richard Hughes)
+ - Ensure we set the correct proxy for the transaction according to the uid and session. Fixes rh#491859 (Richard Hughes)
+ - Fix the exit codes for pkcon and pkmon, and document them. Fixes fd#22819 (Richard Hughes)
+ - gstreamer-plugin: check for invalid codecs and don't send if all are invalid (Richard Hughes)
+ - Don't emit the RequireRestart security signals until the transaction completes with success. Fixes rh#513856 (Richard Hughes)
+ - Fix a couple of small memory leaks in PkTransactionExtra and PkNetworkStackUnix(Richard Hughes)
+ - gtk-module: check for zero length data from FcNameUnparse to mitigate fd#22792 (Richard Hughes)
+ - Ensure the transaction database is not world readable (Richard Hughes)
+ - Add the package name in the authentication details (Richard Hughes)
+ - glib: don't exit from the loop when the first tid times out, and we're requeued (Richard Hughes)
+ - glib: clear the saved error from the first client if we are requeueing a second (Richard Hughes)
+
+Backends
+ - apt: A backwards running progress is reported as not available progress information (Sebastian Heinlein)
+ - dummy: Add to the file list for the new lsof functionality testing (Richard Hughes)
+ - portage: Improve get_depends and move it to trunk version of portage (Mounir Lamouri)
+ - portage: get-depends filtering output (Mounir Lamouri)
+ - portage: Improve get-updates with security updates (Mounir Lamouri)
+ - portage: Update the category/group map (Mounir Lamouri)
+ - portage: Explicitely let portage backend accept sigkill (Mounir Lamouri)
+ - portage: Cleaning, fixing not-found-error, misc (Mounir Lamouri)
+ - portage: Clean remove-packages after portage fixes (Mounir Lamouri)
+ - portage: Show a message if try to use remove-packages with autoremove=True (Mounir Lamouri)
+ - portage: Fix a small bug in get-requires (Mounir Lamouri)
+ - portage: Create get_packages_required and use it for get_requires (Mounir Lamouri)
+ - portage: Remove-packages now removes alse required packages (Mounir Lamouri)
+ - portage: Remove-packages breaks if a candidate is in the system set (Mounir Lamouri)
+ - portage: Improve install-packages to let install many packages and filter output (Mounir Lamouri)
+ - portage: Manage only_trusted (show error) for {install,update}-packages and update-system (Mounir Lamouri)
+ - portage: Update-system prevents failures and block outputs (Mounir Lamouri)
+ - portage: Don't allow_cancel functions that will affect system even if cancelled (Mounir Lamouri)
+ - yum: Add the start of MediaManager code for external media handling (Muayyad Alsadi)
+ - yum: Add some fixes to the MediaManager code (Muayyad Alsadi)
+ - yum: Add a HAL implementation of MediaManager (Muayyad Alsadi)
+ - yum: Ignore physical media when refreshing (Muayyad Alsadi)
+ - yum: Add a GIO MediaManager implementation (Muayyad Alsadi)
+ - yum: Add a linux native MediaManager implementation (Muayyad Alsadi)
+ - yum: Add some more comps group mapping entries (Richard Hughes)
+ - yum: Remove the preupgrade code, as we now depend on this package (Richard Hughes)
+ - yum: Ignore another error in checkForNewer. Fixes rh#510874 (Richard Hughes)
+ - yum: When we're waiting for a crashed instance of ourselves, kill the process with SIGQUIT (Richard Hughes)
+ - yum: Add arch filtering support (Richard Hughes)
+ - yum: Unselect groups we previously selected when we get package deps (Richard Hughes)
+ - yum: Ensure selectGroup() returns a list of packages by forcing deselectGroup() (Richard Hughes)
+ - yum: When we fail to get the lock, print the process information in the error details. Fixes rh#513376 (Richard Hughes)
+ - yum: Package arch should be taken into account for newest filtering. Fixes rh#472876 (Richard Hughes)
+ - yum: Ignore another exception from yum about having no groups. Fixes rh#514708 (Richard Hughes)
+ - yum: Abort initialisation with an error if unfinished transactions are pending. Fixes rh#513557 (Richard Hughes)
+
Version 0.5.0
~~~~~~~~~~~~~
Released: 2009-07-06
diff --git a/configure.ac b/configure.ac
index 2995a4a..22488f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,7 +35,7 @@ AC_SUBST(PK_VERSION)
# AGE If libpackagekit can be linked into executables which can be
# built with previous versions of this library. Don't use.
LT_CURRENT=12
-LT_REVISION=0
+LT_REVISION=1
LT_AGE=0
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
diff --git a/docs/html/pk-download.html b/docs/html/pk-download.html
index fdecb53..6b972ff 100644
--- a/docs/html/pk-download.html
+++ b/docs/html/pk-download.html
@@ -69,6 +69,7 @@ Releases are normally once every 3-4 weeks.
<table>
<tr><td><b>Version</b></td><td> </td><td><b>Date</b></td></tr>
<tr><td>0.5.0</td><td></td><td>2009-07-06</td></tr>
+<tr><td>0.5.1</td><td></td><td>2009-08-03</td></tr>
</table>
<h3>
ABI Stable Versions:
commit 9d17352b5ac478aeb1eb23b14081f6cd52c3c346
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Aug 3 12:20:30 2009 +0100
Fix up a warning in the self test program
diff --git a/src/pk-backend.c b/src/pk-backend.c
index b7dac22..e1e35db 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -2369,7 +2369,7 @@ pk_backend_test (EggTest *test)
if (number_packages == 1)
egg_test_success (test, NULL);
else
- egg_test_failed (test, "wrong number of pacakges: %s", number_packages);
+ egg_test_failed (test, "wrong number of packages: %i", number_packages);
/* reset */
pk_backend_reset (backend);
commit 54c0933a9cb03af56a39fc252c121e5bc6dfc238
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Aug 3 11:31:34 2009 +0100
Show different data for different numbers of packages in the auth dialog
diff --git a/src/pk-polkit-action-lookup.c b/src/pk-polkit-action-lookup.c
index 2a1b9ed..219142d 100644
--- a/src/pk-polkit-action-lookup.c
+++ b/src/pk-polkit-action-lookup.c
@@ -265,16 +265,30 @@ pk_action_lookup_package_ids_to_string (gchar **package_ids)
gchar **names = NULL;
gchar *names_str = NULL;
guint i;
+ guint len;
/* invalid */
if (package_ids == NULL)
goto out;
+ /* we show different data for different numbers of packages */
+ len = g_strv_length (package_ids);
+ if (len > 5) {
+ /* TRANSLATORS: too many packages to list each one */
+ names_str = g_strdup (N_("Many packages"));
+ goto out;
+ }
+
/* create array of name-version */
array = g_ptr_array_new ();
for (i=0; package_ids[i] != NULL; i++) {
id = pk_package_id_new_from_string (package_ids[i]);
- names_str = g_strdup_printf ("%s-%s", id->name, id->version);
+ if (len == 1)
+ names_str = g_strdup_printf ("%s-%s (%s)", id->name, id->version, id->data);
+ else if (len <= 3)
+ names_str = g_strdup_printf ("%s-%s", id->name, id->version);
+ else
+ names_str = g_strdup (id->name);
g_ptr_array_add (array, names_str);
pk_package_id_free (id);
}
commit 3d5685b6ec5d58a33b93c567a3b95aa2f76ba1b6
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Aug 3 11:18:34 2009 +0100
fedora: We now BR pm-utils-devel
diff --git a/contrib/PackageKit.spec.in b/contrib/PackageKit.spec.in
index 34960aa..1faffef 100644
--- a/contrib/PackageKit.spec.in
+++ b/contrib/PackageKit.spec.in
@@ -51,6 +51,7 @@ BuildRequires: gstreamer-plugins-base-devel
BuildRequires: qt4-devel
BuildRequires: cppunit-devel
BuildRequires: pango-devel
+BuildRequires: pm-utils-devel
BuildRequires: fontconfig-devel
#BuildRequires: gtk-sharp2-devel
#BuildRequires: mono-core
commit c5378845ae51664a4a37ab828cdcbf6ad7dcd173
Merge: b2d0a60... c8a4787...
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Aug 3 09:51:20 2009 +0100
Merge branch 'master' of git+ssh://hughsie@git.packagekit.org/srv/git/PackageKit
commit c8a47879b36cbc5922d8d820d9811bc0900ad956
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Sun Aug 2 13:10:55 2009 +0200
Check for pm-utils installation if pm-utils option is enabled
diff --git a/configure.ac b/configure.ac
index 63c1e3d..2995a4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -495,6 +495,12 @@ dnl - Able to build pm-utils script functionality
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE(pm_utils, AS_HELP_STRING([--enable-pm-utils],[Build pm-utils script functionality]),
build_pm_utils=$enableval,build_pm_utils=yes)
+if test x$build_pm_utils = xyes; then
+ PKG_CHECK_MODULES(PM_UTILS, pm-utils,
+ build_pm_utils=yes, build_pm_utils=no)
+else
+ build_pm_utils=no
+fi
AM_CONDITIONAL(PK_BUILD_PM_UTILS, test $build_pm_utils = "yes")
dnl ---------------------------------------------------------------------------
commit b2d0a60cbce538246f1972ba28f35e7d0568466a
Author: Richard Hughes <richard at hughsie.com>
Date: Sun Aug 2 10:11:42 2009 +0100
Correctly pluralise the untrused install dialog
diff --git a/src/pk-polkit-action-lookup.c b/src/pk-polkit-action-lookup.c
index 604987e..2a1b9ed 100644
--- a/src/pk-polkit-action-lookup.c
+++ b/src/pk-polkit-action-lookup.c
@@ -120,8 +120,12 @@ pk_action_lookup_get_message (PolkitBackendActionLookup *lookup, const gchar *ac
const gchar *cmdline;
const gchar *role_text;
const gchar *only_trusted_text;
+ const gchar *str;
+ const gchar *text;
gchar *message = NULL;
+ gchar **package_ids = NULL;
GString *string;
+ guint len = 1;
if (!g_str_has_prefix (action_id, "org.freedesktop.packagekit."))
goto out;
@@ -148,6 +152,14 @@ pk_action_lookup_get_message (PolkitBackendActionLookup *lookup, const gchar *ac
if (only_trusted)
goto out;
+ /* find out the number of packages so we pluralize corectly */
+ str = polkit_details_lookup (details, "package_ids");
+ if (str != NULL) {
+ package_ids = pk_package_ids_from_text (str);
+ len = g_strv_length (package_ids);
+ g_strfreev (package_ids);
+ }
+
/* UpdatePackages */
if (role == PK_ROLE_ENUM_UPDATE_PACKAGES) {
string = g_string_new ("");
@@ -157,7 +169,11 @@ pk_action_lookup_get_message (PolkitBackendActionLookup *lookup, const gchar *ac
g_string_append (string, "\n");
/* TRANSLATORS: user has to trust provider -- I know, this sucks */
- g_string_append (string, g_dgettext (GETTEXT_PACKAGE, N_("Do not update this package unless you are sure it is safe to do so.")));
+ text = g_dngettext (GETTEXT_PACKAGE,
+ N_("Do not update this package unless you are sure it is safe to do so."),
+ N_("Do not update these packages unless you are sure it is safe to do so."),
+ len);
+ g_string_append (string, text);
g_string_append (string, "\n\n");
/* TRANSLATORS: warn the user that all bets are off */
@@ -176,7 +192,11 @@ pk_action_lookup_get_message (PolkitBackendActionLookup *lookup, const gchar *ac
g_string_append (string, "\n");
/* TRANSLATORS: user has to trust provider -- I know, this sucks */
- g_string_append (string, g_dgettext (GETTEXT_PACKAGE, N_("Do not install this package unless you are sure it is safe to do so.")));
+ text = g_dngettext (GETTEXT_PACKAGE,
+ N_("Do not install this package unless you are sure it is safe to do so."),
+ N_("Do not install these packages unless you are sure it is safe to do so."),
+ len);
+ g_string_append (string, text);
g_string_append (string, "\n\n");
/* TRANSLATORS: warn the user that all bets are off */
commit 952a5bee5f103ae7e8b2d4e62f1cbb236405b3fb
Merge: 89e0be0... 277490d...
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Sat Aug 1 12:57:33 2009 +0200
Merge branch 'master' of git+ssh://volkmar@git.packagekit.org/srv/git/PackageKit
commit 277490d1a5716056b363ae7cd97890f502c82a2a
Author: Muayyad Saleh Alsadi <alsadi at ojuba.org>
Date: Sat Aug 1 01:16:23 2009 +0300
hardcode filesystem type in yumMediaManagerOS
diff --git a/backends/yum/yumMediaManagerOS.py b/backends/yum/yumMediaManagerOS.py
index f8cd3a3..2c13873 100644
--- a/backends/yum/yumMediaManagerOS.py
+++ b/backends/yum/yumMediaManagerOS.py
@@ -101,7 +101,7 @@ class MediaDeviceOS(MediaDevice):
if mnt!=None: return mnt
# do the actual mounting
mnt=mkdtemp(prefix='MediaRepo')
- r=os.system('mount "%s" "%s"' % (self.__d, mnt))
+ r=os.system('mount -t udf,iso9660 "%s" "%s"' % (self.__d, mnt))
if r:
try: os.rmdir(mnt)
except OSError: pass
commit 89e0be0dd0db7eaccc24f79cbd17065a5d20ec3b
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Fri Jul 31 21:20:56 2009 +0200
portage: trivial: change portage_settings variable name
diff --git a/backends/portage/portageBackend.py b/backends/portage/portageBackend.py
index 918acb2..06be243 100755
--- a/backends/portage/portageBackend.py
+++ b/backends/portage/portageBackend.py
@@ -56,6 +56,7 @@ from itertools import izip
# ERRORS with messages ?
# remove percentage(None) if percentage is used
# protection against signal when installing/removing
+# lock ?
# Map Gentoo categories to the PackageKit group name space
CATEGORY_GROUP_MAP = {
@@ -269,7 +270,7 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
signal.signal(signal.SIGQUIT, sigquit)
PackageKitBaseBackend.__init__(self, args)
- self.portage_settings = portage.config()
+ self.psettings = portage.config()
self.vardb = portage.db[portage.settings["ROOT"]]["vartree"].dbapi
#self.portdb = portage.db[portage.settings["ROOT"]]["porttree"].dbapi
@@ -277,6 +278,14 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
self.orig_out = None
self.orig_err = None
+ # do not log with mod_echo
+ #def filter_echo(x): return x != 'echo'
+
+ #elogs = self.psettings["PORTAGE_ELOG_SYSTEM"].split()
+ #print elogs
+ #elogs = filter(filter_echo, elogs)
+ #print elogs
+
if lock:
self.doLock()
@@ -310,7 +319,7 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
def get_file_list(self, cpv):
cat, pv = portage.catsplit(cpv)
db = portage.dblink(cat, pv, portage.settings["ROOT"],
- self.portage_settings, treetype="vartree",
+ self.psettings, treetype="vartree",
vartree=self.vardb)
contents = db.getcontents()
@@ -375,7 +384,7 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
def _has_validLicense(cpv):
metadata = self.get_metadata(cpv, ["LICENSE", "USE", "SLOT"], True)
- return not self.portage_settings._getMissingLicenses(cpv, metadata)
+ return not self.psettings._getMissingLicenses(cpv, metadata)
if FILTER_FREE in fltlist or FILTER_NOT_FREE in fltlist:
free_licenses = "@FSF-APPROVED"
@@ -383,16 +392,16 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
licenses = "-* " + free_licenses
else:
licenses = "* -" + free_licenses
- backup_license = self.portage_settings["ACCEPT_LICENSE"]
- self.portage_settings["ACCEPT_LICENSE"] = licenses
- self.portage_settings.backup_changes("ACCEPT_LICENSE")
- self.portage_settings.regenerate()
+ backup_license = self.psettings["ACCEPT_LICENSE"]
+ self.psettings["ACCEPT_LICENSE"] = licenses
+ self.psettings.backup_changes("ACCEPT_LICENSE")
+ self.psettings.regenerate()
cpv_list = filter(_has_validLicense, cpv_list)
- self.portage_settings["ACCEPT_LICENSE"] = backup_license
- self.portage_settings.backup_changes("ACCEPT_LICENSE")
- self.portage_settings.regenerate()
+ self.psettings["ACCEPT_LICENSE"] = backup_license
+ self.psettings.backup_changes("ACCEPT_LICENSE")
+ self.psettings.regenerate()
return cpv_list
@@ -493,7 +502,7 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
["KEYWORDS", "repository", "SLOT"])
pkg_keywords = pkg_keywords.split()
- sys_keywords = self.portage_settings["ACCEPT_KEYWORDS"].split()
+ sys_keywords = self.psettings["ACCEPT_KEYWORDS"].split()
keywords = []
for x in sys_keywords:
@@ -502,7 +511,7 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
# if no keywords, check in package.keywords
if not keywords:
- key_dict = self.portage_settings.pkeywordsdict.get(portage.dep_getkey(cpv))
+ key_dict = self.psettings.pkeywordsdict.get(portage.dep_getkey(cpv))
if key_dict:
for _, keys in key_dict.iteritems():
for x in keys:
@@ -909,7 +918,7 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
fltlist = filters.split(';')
settings, trees, _ = _emerge.actions.load_emerge_config()
- root_config = trees[self.portage_settings["ROOT"]]["root_config"]
+ root_config = trees[self.psettings["ROOT"]]["root_config"]
update_candidates = []
cpv_updates = {}
@@ -1111,7 +1120,7 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
system_packages = []
settings, trees, mtimedb = _emerge.actions.load_emerge_config()
- root_config = trees[self.portage_settings["ROOT"]]["root_config"]
+ root_config = trees[self.psettings["ROOT"]]["root_config"]
# get system packages
set = portage.sets.base.InternalPackageSet(
commit 93f08efb8f77a35f33f50ab2a7fdd4d7f39fb1e5
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Fri Jul 31 21:18:45 2009 +0200
portage: fix try/except/finalize order in refresh-cache
diff --git a/backends/portage/portageBackend.py b/backends/portage/portageBackend.py
index 19c8d1e..918acb2 100755
--- a/backends/portage/portageBackend.py
+++ b/backends/portage/portageBackend.py
@@ -1095,10 +1095,10 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
for o in installed_layman_db.overlays.keys():
installed_layman_db.sync(o, True)
_emerge.actions.action_sync(settings, trees, mtimedb, myopts, "")
- finally:
- self.unblock_output()
except:
self.error(ERROR_INTERNAL_ERROR, traceback.format_exc())
+ finally:
+ self.unblock_output()
def remove_packages(self, allowdep, autoremove, pkgs):
self.status(STATUS_RUNNING)
More information about the PackageKit-commit
mailing list