[PackageKit-commit] packagekit: Branch 'master' - 8 commits

Richard Hughes hughsient at kemper.freedesktop.org
Thu Jul 30 09:41:12 PDT 2009


 backends/alpm/pk-backend-alpm.c            |   50 +-
 backends/dummy/pk-backend-dummy.c          |   56 +--
 backends/razor/pk-backend-razor.c          |    6 
 backends/yum/yumBackend.py                 |   11 
 client/pk-console.c                        |   10 
 contrib/command-not-found/.gitignore       |    1 
 contrib/command-not-found/Makefile.am      |    6 
 contrib/command-not-found/PackageKit.sh    |   12 
 contrib/command-not-found/PackageKit.sh.in |   12 
 lib/packagekit-glib/egg-string.c           |  149 +-------
 lib/packagekit-glib/egg-string.h           |    5 
 lib/packagekit-glib/pk-bitfield.c          |   16 
 lib/packagekit-glib/pk-catalog.c           |    6 
 lib/packagekit-glib/pk-client.c            |    6 
 lib/packagekit-glib/pk-common.c            |   16 
 lib/packagekit-glib/pk-desktop.c           |    4 
 lib/packagekit-glib/pk-enum.c              |    4 
 lib/packagekit-glib/pk-package-id.c        |   72 ++--
 lib/packagekit-glib/pk-package-list.c      |   22 -
 lib/packagekit-glib/pk-package-obj.c       |    4 
 lib/packagekit-glib/pk-service-pack.c      |    6 
 lib/python/packagekit/frontend.py          |  508 ++++++++++++++++++++---------
 po/pt_BR.po                                |  262 ++++++++------
 src/pk-backend-spawn.c                     |   52 +-
 src/pk-backend.c                           |    2 
 src/pk-engine.c                            |    2 
 src/pk-network-stack-unix.c                |    8 
 src/pk-spawn.c                             |    2 
 src/pk-store.c                             |    4 
 src/pk-transaction-db.c                    |   22 -
 src/pk-transaction-list.c                  |    6 
 src/pk-transaction.c                       |    4 
 32 files changed, 739 insertions(+), 607 deletions(-)

New commits:
commit e50e8e23da0bd55781512fa710c3b29970169fc5
Author: Richard Hughes <richard at hughsie.com>
Date:   Thu Jul 30 13:31:32 2009 +0100

    yum: Ignore another exception from yum about having no groups. Fixes rh#514708

diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 7328366..5c19f50 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1432,6 +1432,8 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
             # Setup categories/groups
             try:
                 self.yumbase.doGroupSetup()
+            except yum.Errors.GroupsError, e:
+                pass
             except Exception, e:
                 self.error(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
             #we might have a rounding error
commit e6a80e14eeea2646719ae15f36dd14d72ed0581c
Author: Vincent Untz <vuntz at gnome.org>
Date:   Thu Jul 30 12:39:49 2009 +0100

    Use the configured libexec dir, don't hardcode it
    
    Signed-off-by: Richard Hughes <richard at hughsie.com>

diff --git a/contrib/command-not-found/.gitignore b/contrib/command-not-found/.gitignore
index 8aa84ae..86b517c 100644
--- a/contrib/command-not-found/.gitignore
+++ b/contrib/command-not-found/.gitignore
@@ -2,4 +2,5 @@
 .libs
 *.o
 pk-command-not-found
+PackageKit.sh
 
diff --git a/contrib/command-not-found/Makefile.am b/contrib/command-not-found/Makefile.am
index f59001d..b3c8843 100644
--- a/contrib/command-not-found/Makefile.am
+++ b/contrib/command-not-found/Makefile.am
@@ -40,6 +40,12 @@ pk_command_not_found_CFLAGS =				\
 bashprofiledir = ${SYSCONFDIR}/profile.d
 dist_bashprofile_DATA = PackageKit.sh
 
+PackageKit.sh: PackageKit.sh.in Makefile
+	sed -e s!\@LIBEXECDIR\@!$(libexecdir)! < $< > $@
+
 confdir = $(PK_CONF_DIR)
 dist_conf_DATA = CommandNotFound.conf
 
+EXTRA_DIST = PackageKit.sh.in
+
+CLEANFILES = PackageKit.sh
diff --git a/contrib/command-not-found/PackageKit.sh b/contrib/command-not-found/PackageKit.sh
deleted file mode 100644
index 4a3667c..0000000
--- a/contrib/command-not-found/PackageKit.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-# 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.
-
-command_not_found_handle () {
-	/usr/libexec/pk-command-not-found $1 || return 127
-}
-
diff --git a/contrib/command-not-found/PackageKit.sh.in b/contrib/command-not-found/PackageKit.sh.in
new file mode 100644
index 0000000..89c2505
--- /dev/null
+++ b/contrib/command-not-found/PackageKit.sh.in
@@ -0,0 +1,12 @@
+# 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.
+
+command_not_found_handle () {
+	@LIBEXECDIR@/pk-command-not-found $1 || return 127
+}
+
commit 49206e310daa816db2ed50ee86551b22af5490b9
Author: Thomas Liu <tliu at redhat.com>
Date:   Wed Jul 29 16:00:24 2009 -0400

    Trivial edits to the python frontend again, allowing for
    non blocking asynchronous behavior, and also a comment
    describing how to use it. Also fixed a few dbus signatures.

diff --git a/lib/python/packagekit/frontend.py b/lib/python/packagekit/frontend.py
index 3c63827..945464b 100644
--- a/lib/python/packagekit/frontend.py
+++ b/lib/python/packagekit/frontend.py
@@ -49,12 +49,16 @@ class PackageKit(PackageKitDbusInterface):
         return dbus.Interface(bus.get_object('org.freedesktop.PackageKit', self.tid()), interface)
 
     def job_id(func):
+        """
+        Decorator for the dbus calls.
+        Append async=True to the args if you want the call to be asynchronous.
+        """
         def wrapper(*args, **kwargs):
             self = args[0]
             jid = polkit_auth_wrapper(func, *args)
             if jid == -1:
                 raise PackageKitTransactionFailure
-            elif jid == None:
+            elif not 'async' in kwargs.keys() and jid == None:
                 self.run()
             else:
                 return jid
@@ -301,12 +305,12 @@ class PackageKit(PackageKitDbusInterface):
 
     @dbusException
     @job_id
-    def Resolve(self, package_name, filter="none"):
+    def Resolve(self, package_names, filter="none"):
         """
-        Finds a package with the given name, and gives back a Package that matches that name exactly
+        Finds a packages with the given names, and gives back a Package that matches those names exactly
         (not yet supported in yum backend, and maybe others)
         """
-        return self.get_iface().Resolve(filter, package_name)
+        return self.get_iface().Resolve(filter, package_names)
 
     @dbusException
     @job_id
commit 1a5343d276bf3c551fe29c6602c80770ebc3559c
Author: igor <igor at fedoraproject.org>
Date:   Wed Jul 29 18:40:42 2009 +0000

    Sending translation for Brazilian Portuguese

diff --git a/po/pt_BR.po b/po/pt_BR.po
index ca00248..85fae7f 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -8,8 +8,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PackageKit\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-15 14:38+0000\n"
-"PO-Revision-Date: 2009-07-15 15:10-0300\n"
+"POT-Creation-Date: 2009-07-29 14:46+0000\n"
+"PO-Revision-Date: 2009-07-29 15:37-0300\n"
 "Last-Translator: Igor Pires Soares <igor at projetofedora.org>\n"
 "Language-Team: Brazilian Portuguese <fedora-trans-pt_br at redhat.com>\n"
 "MIME-Version: 1.0\n"
@@ -48,7 +48,7 @@ msgstr "Falso"
 #. TRANSLATORS: this is the transactions role, e.g. "update-system"
 #. TRANSLATORS: the trasaction role, e.g. update-system
 #: ../client/pk-console.c:237
-#: ../src/pk-polkit-action-lookup.c:256
+#: ../src/pk-polkit-action-lookup.c:297
 msgid "Role"
 msgstr "Modo"
 
@@ -64,7 +64,7 @@ msgstr "(segundos)"
 #. TRANSLATORS: this is The command line used to do the action
 #. TRANSLATORS: the command line of the thing that wants the authentication
 #: ../client/pk-console.c:246
-#: ../src/pk-polkit-action-lookup.c:270
+#: ../src/pk-polkit-action-lookup.c:311
 msgid "Command line"
 msgstr "Linha de comando"
 
@@ -139,9 +139,13 @@ msgid "Details about the update:"
 msgstr "Detalhes sobre a atualização:"
 
 #. TRANSLATORS: details about the update, package name and version
+#. TRANSLATORS: title, the names of the packages that the method is processing
 #: ../client/pk-console.c:341
+#: ../src/pk-polkit-action-lookup.c:322
 msgid "Package"
-msgstr "Pacote"
+msgid_plural "Packages"
+msgstr[0] "Pacote"
+msgstr[1] "Pacotes"
 
 #. TRANSLATORS: details about the update, any packages that this update updates
 #: ../client/pk-console.c:344
@@ -449,7 +453,7 @@ msgstr "Nenhum pacote pôde ser localizado para instalação"
 #. TRANSLATORS: installing new packages from package list
 #. TRANSLATORS: we are now installing the debuginfo packages we found earlier
 #: ../client/pk-console.c:1381
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:868
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:886
 #, c-format
 msgid "Installing packages"
 msgstr "Instalando pacotes"
@@ -538,165 +542,165 @@ msgstr "Subcomandos:"
 
 #. TRANSLATORS: command line argument, if we should show debugging information
 #. TRANSLATORS: if we should show debugging data
-#: ../client/pk-console.c:1780
+#: ../client/pk-console.c:1781
 #: ../client/pk-generate-pack.c:185
-#: ../client/pk-monitor.c:125
-#: ../contrib/command-not-found/pk-command-not-found.c:521
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:532
+#: ../client/pk-monitor.c:128
+#: ../contrib/command-not-found/pk-command-not-found.c:610
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:550
 #: ../src/pk-main.c:211
 msgid "Show extra debugging information"
 msgstr "Mostrar informações extras de depuração"
 
 #. TRANSLATORS: command line argument, just show the version string
-#: ../client/pk-console.c:1783
-#: ../client/pk-monitor.c:127
+#: ../client/pk-console.c:1784
+#: ../client/pk-monitor.c:130
 msgid "Show the program version and exit"
 msgstr "Mostrar a versão do programa e sair"
 
 #. TRANSLATORS: command line argument, use a filter to narrow down results
-#: ../client/pk-console.c:1786
+#: ../client/pk-console.c:1787
 msgid "Set the filter, e.g. installed"
 msgstr "Definir o filtro, p. ex.: instalados"
 
 #. TRANSLATORS: command line argument, work asynchronously
-#: ../client/pk-console.c:1789
+#: ../client/pk-console.c:1790
 msgid "Exit without waiting for actions to complete"
 msgstr "Sair sem esperar pelo término das ações"
 
 #. TRANSLATORS: This is when we could not connect to the system bus, and is fatal
-#: ../client/pk-console.c:1816
+#: ../client/pk-console.c:1817
 msgid "This tool could not connect to system DBUS."
 msgstr "Esta ferramenta não pôde conectar ao DBUS do sistema."
 
 #. TRANSLATORS: The user specified an incorrect filter
-#: ../client/pk-console.c:1905
+#: ../client/pk-console.c:1907
 msgid "The filter specified was invalid"
 msgstr "O filtro especificado era inválido"
 
 #. TRANSLATORS: a search type can be name, details, file, etc
-#: ../client/pk-console.c:1923
+#: ../client/pk-console.c:1926
 msgid "A search type is required, e.g. name"
 msgstr "Um tipo de pesquisa é requerido, p. ex. nome"
 
 #. TRANSLATORS: the user needs to provide a search term
-#: ../client/pk-console.c:1929
-#: ../client/pk-console.c:1937
-#: ../client/pk-console.c:1945
-#: ../client/pk-console.c:1953
+#: ../client/pk-console.c:1933
+#: ../client/pk-console.c:1942
+#: ../client/pk-console.c:1951
+#: ../client/pk-console.c:1960
 msgid "A search term is required"
 msgstr "Um termo de pesquisa é requerido"
 
 #. TRANSLATORS: the search type was provided, but invalid
-#: ../client/pk-console.c:1959
+#: ../client/pk-console.c:1967
 msgid "Invalid search type"
 msgstr "Tipo de pesquisa inválido"
 
 #. TRANSLATORS: the user did not specify what they wanted to install
-#: ../client/pk-console.c:1965
+#: ../client/pk-console.c:1973
 msgid "A package name or filename to install is required"
 msgstr "O nome do pacote ou arquivo é requerido"
 
 #. TRANSLATORS: geeky error, 99.9999% of users won't see this
-#: ../client/pk-console.c:1973
+#: ../client/pk-console.c:1982
 msgid "A type, key_id and package_id are required"
 msgstr "Um tipo, key_id e package_id são requeridos"
 
 #. TRANSLATORS: the user did not specify what they wanted to remove
-#: ../client/pk-console.c:1981
+#: ../client/pk-console.c:1991
 msgid "A package name to remove is required"
 msgstr "O nome do pacote para remoção é requerido"
 
 #. TRANSLATORS: the user did not specify anything about what to download or where
-#: ../client/pk-console.c:1988
-msgid "A destination directory and then the package names to download are required"
-msgstr "O diretório de destino seguido dos nomes dos pacotes a serem baixados é requerido"
+#: ../client/pk-console.c:1999
+msgid "A destination directory and the package names to download are required"
+msgstr "O diretório de destino e os os nomes dos pacotes a serem baixados são requeridos"
 
 #. TRANSLATORS: the directory does not exist, so we can't continue
-#: ../client/pk-console.c:1994
+#: ../client/pk-console.c:2006
 msgid "Directory not found"
 msgstr "Diretório não encontrado"
 
 #. TRANSLATORS: geeky error, 99.9999% of users won't see this
-#: ../client/pk-console.c:2001
+#: ../client/pk-console.c:2014
 msgid "A licence identifier (eula-id) is required"
 msgstr "Um identificador de licença (eula-id) é requerido"
 
 #. TRANSLATORS: geeky error, 99.9999% of users won't see this
-#: ../client/pk-console.c:2010
+#: ../client/pk-console.c:2024
 msgid "A transaction identifier (tid) is required"
 msgstr "Um identificador de transação (tid) é requerido"
 
 #. TRANSLATORS: The user did not specify a package name
-#: ../client/pk-console.c:2026
+#: ../client/pk-console.c:2041
 msgid "A package name to resolve is required"
 msgstr "O nome de pacote a ser analisado é requerido"
 
 #. TRANSLATORS: The user did not specify a repository (software source) name
-#: ../client/pk-console.c:2034
-#: ../client/pk-console.c:2042
+#: ../client/pk-console.c:2050
+#: ../client/pk-console.c:2059
 msgid "A repository name is required"
 msgstr "O nome do repositório é requerido"
 
 #. TRANSLATORS: The user didn't provide any data
-#: ../client/pk-console.c:2050
+#: ../client/pk-console.c:2068
 msgid "A repo name, parameter and value are required"
 msgstr "Um nome de repositório, parâmetro e um valor são requeridos"
 
 #. TRANSLATORS: The user didn't specify what action to use
-#: ../client/pk-console.c:2063
+#: ../client/pk-console.c:2082
 msgid "An action, e.g. 'update-system' is required"
 msgstr "Uma ação, p. ex. \"update-system\" é requerida"
 
 #. TRANSLATORS: The user specified an invalid action
-#: ../client/pk-console.c:2069
+#: ../client/pk-console.c:2089
 msgid "A correct role is required"
 msgstr "Um modo correto é requerido"
 
 #. TRANSLATORS: we keep a database updated with the time that an action was last executed
-#: ../client/pk-console.c:2075
+#: ../client/pk-console.c:2096
 msgid "Failed to get the time since this action was last completed"
 msgstr "Falha ao obter o tempo em que essa ação foi completada pela última vez"
 
 #. TRANSLATORS: The user did not provide a package name
 #. TRANSLATORS: This is when the user fails to supply the package name
-#: ../client/pk-console.c:2084
-#: ../client/pk-console.c:2095
-#: ../client/pk-console.c:2103
-#: ../client/pk-console.c:2119
+#: ../client/pk-console.c:2106
+#: ../client/pk-console.c:2118
 #: ../client/pk-console.c:2127
+#: ../client/pk-console.c:2145
+#: ../client/pk-console.c:2154
 #: ../client/pk-generate-pack.c:241
 msgid "A package name is required"
 msgstr "O nome do pacote é requerido"
 
 #. TRANSLATORS: each package "provides" certain things, e.g. mime(gstreamer-decoder-mp3), the user didn't specify it
-#: ../client/pk-console.c:2111
+#: ../client/pk-console.c:2136
 msgid "A package provide string is required"
 msgstr "É necessário especificar o que o pacote fornece"
 
 #. TRANSLATORS: The user didn't specify a filename to create as a list
-#: ../client/pk-console.c:2135
+#: ../client/pk-console.c:2163
 msgid "A list file name to create is required"
 msgstr "O nome de arquivo da lista a ser criada é requerido"
 
 #. TRANSLATORS: The user didn't specify a filename to open as a list
-#: ../client/pk-console.c:2144
-#: ../client/pk-console.c:2153
+#: ../client/pk-console.c:2173
+#: ../client/pk-console.c:2183
 msgid "A list file to open is required"
 msgstr "Uma lista de arquivos a serem abertos é requerida"
 
 #. TRANSLATORS: The user tried to use an unsupported option on the command line
-#: ../client/pk-console.c:2206
+#: ../client/pk-console.c:2237
 #, c-format
 msgid "Option '%s' is not supported"
 msgstr "A opção \"%s\" não é suportada"
 
 #. TRANSLATORS: User does not have permission to do this
-#: ../client/pk-console.c:2219
+#: ../client/pk-console.c:2250
 msgid "Incorrect privileges for this operation"
 msgstr "Privilégios incorretos para esta operação"
 
 #. TRANSLATORS: Generic failure of what they asked to do
-#: ../client/pk-console.c:2222
+#: ../client/pk-console.c:2253
 msgid "Command failed"
 msgstr "O comando falhou"
 
@@ -816,10 +820,14 @@ msgid "Failed to create '%s': %s"
 msgstr "Falha ao criar \"%s\": %s"
 
 #. TRANSLATORS: this is a program that monitors PackageKit
-#: ../client/pk-monitor.c:143
+#: ../client/pk-monitor.c:146
 msgid "PackageKit Monitor"
 msgstr "Monitor do PackageKit"
 
+#: ../client/pk-monitor.c:183
+msgid "Cannot show the list of transactions"
+msgstr "Não é possível mostrar a lista de transações"
+
 #. TRANSLATORS: The package was not found in any software sources
 #: ../client/pk-tools-common.c:118
 #, c-format
@@ -841,309 +849,329 @@ msgstr "Por favor, escolha o pacote correto: "
 msgid "Please enter a number from 1 to %i: "
 msgstr "Por favor, insira um número entre 1 e %i: "
 
+#. TRANSLATORS: downloading repo data so we can search
+#: ../contrib/command-not-found/pk-command-not-found.c:349
+msgid "Downloading details about the software sources."
+msgstr "Baixando detalhes das fontes de programas."
+
+#. TRANSLATORS: downloading file lists so we can search
+#: ../contrib/command-not-found/pk-command-not-found.c:353
+msgid "Downloading filelists (this may take some time to complete)."
+msgstr "Baixando listas de arquivos (isso pode levar algum tempo para ser concluído)."
+
+#. TRANSLATORS: waiting for native lock
+#: ../contrib/command-not-found/pk-command-not-found.c:357
+msgid "Waiting for package manager lock."
+msgstr "Esperando pelo bloqueio do gerenciador de pacotes."
+
+#. TRANSLATORS: loading package cache so we can search
+#: ../contrib/command-not-found/pk-command-not-found.c:361
+msgid "Loading list of packages."
+msgstr "Baixando lista de pacotes."
+
 #. TRANSLATORS: we failed to find the package, this shouldn't happen
-#: ../contrib/command-not-found/pk-command-not-found.c:372
+#: ../contrib/command-not-found/pk-command-not-found.c:414
 msgid "Failed to search for file"
 msgstr "Falha ao pesquisar pelo arquivo"
 
 #. TRANSLATORS: we failed to launch the executable, the error follows
-#: ../contrib/command-not-found/pk-command-not-found.c:496
+#: ../contrib/command-not-found/pk-command-not-found.c:551
 msgid "Failed to launch:"
 msgstr "Falha ao executar:"
 
 #. TRANSLATORS: tool that gets called when the command is not found
-#: ../contrib/command-not-found/pk-command-not-found.c:537
+#: ../contrib/command-not-found/pk-command-not-found.c:626
 msgid "PackageKit Command Not Found"
 msgstr "Comando do PackageKit não localizado"
 
 #. TRANSLATORS: the prefix of all the output telling the user why it's not executing
-#: ../contrib/command-not-found/pk-command-not-found.c:560
+#: ../contrib/command-not-found/pk-command-not-found.c:652
 msgid "Command not found."
 msgstr "Comando não localizado."
 
 #. TRANSLATORS: tell the user what we think the command is
-#: ../contrib/command-not-found/pk-command-not-found.c:567
+#: ../contrib/command-not-found/pk-command-not-found.c:659
 msgid "Similar command is:"
 msgstr "O comando similar é:"
 
 #. TRANSLATORS: Ask the user if we should run the similar command
-#: ../contrib/command-not-found/pk-command-not-found.c:576
+#: ../contrib/command-not-found/pk-command-not-found.c:668
 msgid "Run similar command:"
 msgstr "Executar comando similar:"
 
 #. TRANSLATORS: show the user a list of commands that they could have meant
 #. TRANSLATORS: show the user a list of commands we could run
-#: ../contrib/command-not-found/pk-command-not-found.c:588
-#: ../contrib/command-not-found/pk-command-not-found.c:597
+#: ../contrib/command-not-found/pk-command-not-found.c:680
+#: ../contrib/command-not-found/pk-command-not-found.c:689
 msgid "Similar commands are:"
 msgstr "Os comandos similares são:"
 
 #. TRANSLATORS: ask the user to choose a file to run
-#: ../contrib/command-not-found/pk-command-not-found.c:604
+#: ../contrib/command-not-found/pk-command-not-found.c:696
 msgid "Please choose a command to run"
 msgstr "Por favor, escolha um comando a ser executado"
 
 #. TRANSLATORS: tell the user what package provides the command
-#: ../contrib/command-not-found/pk-command-not-found.c:619
+#: ../contrib/command-not-found/pk-command-not-found.c:715
 msgid "The package providing this file is:"
 msgstr "O pacote que fornece esse arquivo é:"
 
 #. TRANSLATORS: as the user if we want to install a package to provide the command
-#: ../contrib/command-not-found/pk-command-not-found.c:624
+#: ../contrib/command-not-found/pk-command-not-found.c:720
 #, c-format
 msgid "Install package '%s' to provide command '%s'?"
 msgstr "Instalar pacote \"%s\" para fornecer o comando \"%s\"?"
 
 #. TRANSLATORS: Show the user a list of packages that provide this command
-#: ../contrib/command-not-found/pk-command-not-found.c:645
+#: ../contrib/command-not-found/pk-command-not-found.c:741
 msgid "Packages providing this file are:"
 msgstr "Os pacotes que fornecem esse arquivo são:"
 
 #. TRANSLATORS: Show the user a list of packages that they can install to provide this command
-#: ../contrib/command-not-found/pk-command-not-found.c:654
+#: ../contrib/command-not-found/pk-command-not-found.c:750
 msgid "Suitable packages are:"
 msgstr "Os pacotes apropriados são:"
 
 #. get selection
 #. TRANSLATORS: ask the user to choose a file to install
-#: ../contrib/command-not-found/pk-command-not-found.c:662
+#: ../contrib/command-not-found/pk-command-not-found.c:758
 msgid "Please choose a package to install"
 msgstr "Por favor, escolha um pacote a ser instalado"
 
 #. TRANSLATORS: when we are getting data from the daemon
-#: ../contrib/browser-plugin/pk-plugin-install.c:461
+#: ../contrib/browser-plugin/pk-plugin-install.c:433
 msgid "Getting package information..."
 msgstr "Obtendo informações do pacote..."
 
 #. TRANSLATORS: run an applicaiton
-#: ../contrib/browser-plugin/pk-plugin-install.c:467
+#: ../contrib/browser-plugin/pk-plugin-install.c:439
 #, c-format
 msgid "Run %s"
 msgstr "Executar %s"
 
 #. TRANSLATORS: show the installed version of a package
-#: ../contrib/browser-plugin/pk-plugin-install.c:473
+#: ../contrib/browser-plugin/pk-plugin-install.c:445
 msgid "Installed version"
 msgstr "Versão instalada"
 
 #. TRANSLATORS: run the application now
-#: ../contrib/browser-plugin/pk-plugin-install.c:481
+#: ../contrib/browser-plugin/pk-plugin-install.c:453
 #, c-format
 msgid "Run version %s now"
 msgstr "Executar a versão %s agora"
 
 #. TRANSLATORS: run the application now
-#: ../contrib/browser-plugin/pk-plugin-install.c:487
+#: ../contrib/browser-plugin/pk-plugin-install.c:459
 msgid "Run now"
 msgstr "Executar agora"
 
 #. TRANSLATORS: update to a new version of the package
-#: ../contrib/browser-plugin/pk-plugin-install.c:493
+#: ../contrib/browser-plugin/pk-plugin-install.c:465
 #, c-format
 msgid "Update to version %s"
 msgstr "Atualizar para a versão %s"
 
 #. TRANSLATORS: To install a package
-#: ../contrib/browser-plugin/pk-plugin-install.c:499
+#: ../contrib/browser-plugin/pk-plugin-install.c:471
 #, c-format
 msgid "Install %s now"
 msgstr "Instalar %s agora"
 
 #. TRANSLATORS: the version of the package
-#: ../contrib/browser-plugin/pk-plugin-install.c:502
+#: ../contrib/browser-plugin/pk-plugin-install.c:474
 msgid "Version"
 msgstr "Versão"
 
 #. TRANSLATORS: noting found, so can't install
-#: ../contrib/browser-plugin/pk-plugin-install.c:507
+#: ../contrib/browser-plugin/pk-plugin-install.c:479
 msgid "No packages found for your system"
 msgstr "Nenhum pacote localizado para o seu sistema"
 
 #. TRANSLATORS: package is being installed
-#: ../contrib/browser-plugin/pk-plugin-install.c:512
+#: ../contrib/browser-plugin/pk-plugin-install.c:484
 msgid "Installing..."
 msgstr "Instalando..."
 
 #. TRANSLATORS: we are starting to install the packages
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:186
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:187
 msgid "Starting install"
 msgstr "Iniciando a instalação"
 
 #. TRANSLATORS: we couldn't find the package name, non-fatal
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:379
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:397
 #, c-format
 msgid "Failed to find the package %s, or already installed: %s"
 msgstr "Falha ao localizar o pacote %s ou ele já está instalado: %s"
 
 #. command line argument, simulate what would be done, but don't actually do it
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:535
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:553
 msgid "Don't actually install any packages, only simulate what would be installed"
 msgstr "Não instala os pacotes na realidade, apenas simula o que seria instalado"
 
 #. command line argument, do we skip packages that depend on the ones specified
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:538
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:556
 msgid "Do not install dependencies of the core packages"
 msgstr "Não instala dependências dos pacotes principais"
 
 #. command line argument, do we operate quietly
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:541
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:559
 msgid "Do not display information or progress"
 msgstr "Não exibe informações ou o progresso"
 
 #. TRANSLATORS: tool that gets called when the command is not found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:559
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:577
 msgid "PackageKit Debuginfo Installer"
 msgstr "Instalador de Informações de Depuração do PackageKit"
 
 #. TRANSLATORS: the use needs to specify a list of package names on the command line
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:571
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:589
 #, c-format
 msgid "ERROR: Specify package names to install."
 msgstr "ERRO: Especifique os nomes dos pacotes a serem instalados."
 
 #. TRANSLATORS: we are getting the list of repositories
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:605
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:623
 #, c-format
 msgid "Getting sources list"
 msgstr "Obtendo lista de fontes"
 
 #. TRANSLATORS: all completed 100%
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:623
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:663
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:698
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:782
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:826
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:893
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:937
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:641
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:681
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:716
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:800
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:844
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:911
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:955
 #, c-format
 msgid "OK."
 msgstr "OK."
 
 #. TRANSLATORS: tell the user what we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:626
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:644
 #, c-format
 msgid "Found %i enabled and %i disabled sources."
 msgstr "Localizadas %i fontes habilitadas e %i desabilitadas."
 
 #. TRANSLATORS: we're finding repositories that match out pattern
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:633
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:651
 #, c-format
 msgid "Finding debugging sources"
 msgstr "Localizando fontes de depuração"
 
 #. TRANSLATORS: tell the user what we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:666
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:684
 #, c-format
 msgid "Found %i disabled debuginfo repos."
 msgstr "%i repositórios de informações de depuração desabilitados encontrados"
 
 #. TRANSLATORS: we're now enabling all the debug sources we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:673
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:691
 #, c-format
 msgid "Enabling debugging sources"
 msgstr "Habilitando fontes de depuração"
 
 #. TRANSLATORS: operation was not successful
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:683
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:767
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:811
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:878
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:922
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:701
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:785
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:829
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:896
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:940
 msgid "FAILED."
 msgstr "FALHOU."
 
 #. TRANSLATORS: tell the user how many we enabled
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:701
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:719
 #, c-format
 msgid "Enabled %i debugging sources."
 msgstr "%i fontes de depuração habilitadas."
 
 #. TRANSLATORS: we're now finding packages that match in all the repos
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:708
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:726
 #, c-format
 msgid "Finding debugging packages"
 msgstr "Localizando pacotes de depuração"
 
 #. TRANSLATORS: we couldn't find the package name, non-fatal
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:720
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:738
 #, c-format
 msgid "Failed to find the package %s: %s"
 msgstr "Falha ao localizar o pacote %s: %s"
 
 #. TRANSLATORS: we couldn't find the debuginfo package name, non-fatal
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:743
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:761
 #, c-format
 msgid "Failed to find the debuginfo package %s: %s"
 msgstr "Falha ao localizar o pacote de depuração %s: %s"
 
 #. TRANSLATORS: no debuginfo packages could be found to be installed
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:771
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:789
 #, c-format
 msgid "Found no packages to install."
 msgstr "Nenhum pacote localizado para ser instalado."
 
 #. TRANSLATORS: tell the user we found some packages, and then list them
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:785
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:803
 #, c-format
 msgid "Found %i packages:"
 msgstr "%i pacotes localizados:"
 
 #. TRANSLATORS: tell the user we are searching for deps
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:801
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:819
 #, c-format
 msgid "Finding packages that depend on these packages"
 msgstr "Localizando pacotes que dependem destes pacotes"
 
 #. TRANSLATORS: could not install, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:814
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:832
 #, c-format
 msgid "Could not find dependant packages: %s"
 msgstr "Não foi possível localizar os pacotes dependentes: %s"
 
 #. TRANSLATORS: tell the user we found some more packages
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:830
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:848
 #, c-format
 msgid "Found %i extra packages."
 msgstr "%i pacotes extras localizados."
 
 #. TRANSLATORS: tell the user we found some more packages
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:834
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:852
 #, c-format
 msgid "No extra packages required."
 msgstr "Nenhum pacote extra é requerido."
 
 #. TRANSLATORS: tell the user we found some packages (and deps), and then list them
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:843
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:861
 #, c-format
 msgid "Found %i packages to install:"
 msgstr "%i pacotes localizados para serem instalados:"
 
 #. TRANSLATORS: simulate mode is a testing mode where we quit before the action
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:856
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:874
 #, c-format
 msgid "Not installing packages in simulate mode"
 msgstr "Os pacotes não serão instalados no modo de simulação"
 
-#. TRANSLATORS: coul dnot install, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:881
+#. TRANSLATORS: could not install, detailed error follows
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:899
 #, c-format
 msgid "Could not install packages: %s"
 msgstr "Não foi possível instalar os pacotes: %s"
 
 #. TRANSLATORS: we are now disabling all debuginfo repos we previously enabled
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:913
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:931
 #, c-format
 msgid "Disabling sources previously enabled"
 msgstr "Desabilitando fontes habilitadas anteriormente"
 
 #. TRANSLATORS: no debuginfo packages could be found to be installed, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:925
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:943
 #, c-format
 msgid "Could not disable the debugging sources: %s"
 msgstr "Não foi possível desabilitar as fontes de depuração: %s"
 
 #. TRANSLATORS: we disabled all the debugging repos that we enabled before
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:940
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:958
 #, c-format
 msgid "Disabled %i debugging sources."
 msgstr "%i fontes de depuração desabilitadas."
@@ -1372,7 +1400,7 @@ msgid "Cannot connect to the system bus"
 msgstr "Não foi possível conectar ao barramento do sistema"
 
 #. TRANSLATORS: cannot register on system bus, unknown reason -- geeky error follows
-#: ../src/pk-main.c:331
+#: ../src/pk-main.c:334
 msgid "Error trying to start:"
 msgstr "Erro ao tentar iniciar:"
 
@@ -1403,7 +1431,7 @@ msgid "Do not install this package unless you are sure it is safe to do so."
 msgstr "Não instale este pacote a não ser que você esteja certo de que é seguro fazer isso."
 
 #. TRANSLATORS: if the transaction is forced to install only trusted packages
-#: ../src/pk-polkit-action-lookup.c:263
+#: ../src/pk-polkit-action-lookup.c:304
 msgid "Only trusted"
 msgstr "Somente confiáveis"
 
commit 891dbfa2c27191e63fd8765e3400886c44198c70
Author: Muayyad Alsadi <alsadi at ojuba.org>
Date:   Wed Jul 29 17:00:58 2009 +0100

    Ignore physical media when refreshing
    
    Signed-off-by: Richard Hughes <richard at hughsie.com>

diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 9ef8b9c..7328366 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1417,6 +1417,9 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
             bump = (95/len(self.yumbase.repos.listEnabled()))/2
 
             for repo in self.yumbase.repos.listEnabled():
+                # is physical media
+                if repo.mediaid:
+                    continue
                 repo.metadata_expire = 0
                 self.yumbase.repos.populateSack(which=[repo.id], mdtype='metadata', cacheonly=1)
                 pct += bump
@@ -2479,12 +2482,18 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
         # we don't care about freshest data
         elif lazy_cache:
             for repo in self.yumbase.repos.listEnabled():
+                # is physical media
+                if repo.mediaid:
+                    continue
                 repo.metadata_expire = 60 * 60 * 24  # 24 hours
                 repo.mdpolicy = "group:all"
 
         # default
         else:
             for repo in self.yumbase.repos.listEnabled():
+                # is physical media
+                if repo.mediaid:
+                    continue
                 repo.metadata_expire = 60 * 60 * 1.5 # 1.5 hours, the default
                 repo.mdpolicy = "group:primary"
 
commit 9d9a9433a2272197d3fc2f5cfa1abd2a5fee979b
Author: Thomas Liu <tliu at redhat.com>
Date:   Wed Jul 29 11:19:49 2009 -0400

    Trivial patch to fix the python frontend.
    
    The old one was probably for an old version of PackageKit, or
    just flat out broken.  This patch fixed the frontend to comply
    with the correct DBUS signatures and signals as found on
    http://www.packagekit.org/gtk-doc/Transaction.html.
    
    Also added PolicyKit authorization.
    
    To use, extend the PackageKit class and override the callbacks
    and have them do what you want them to do.
    
    Signed-off-by: Thomas Liu <tliu at redhat.com>

diff --git a/lib/python/packagekit/frontend.py b/lib/python/packagekit/frontend.py
index ec83a94..3c63827 100644
--- a/lib/python/packagekit/frontend.py
+++ b/lib/python/packagekit/frontend.py
@@ -17,9 +17,11 @@
 # Copyright (C) 2007
 #    Tim Lauridsen <timlau at fedoraproject.org>
 #    Tom Parker <palfrey at tevp.net>
+#    Thomas Liu <tliu at redhat.com>
 #    Robin Norwood <rnorwood at redhat.com>
 
 import dbus
+import os
 from dbus.mainloop.glib import DBusGMainLoop
 import gobject
 from enums import PackageKitEnum
@@ -30,6 +32,7 @@ from pkexceptions import PackageKitBackendFailure
 
 class PackageKit(PackageKitDbusInterface):
     def __init__(self):
+        self.loop = gobject.MainLoop()
         PackageKitDbusInterface.__init__(self,
                          'org.freedesktop.PackageKit',
                          'org.freedesktop.PackageKit',
@@ -37,125 +40,208 @@ class PackageKit(PackageKitDbusInterface):
 
     def tid(self):
         return self.pk_iface.GetTid()
+    
+    def get_iface(self):
+        DBusGMainLoop(set_as_default=True)
+        interface = 'org.freedesktop.PackageKit.Transaction'
+        bus = dbus.SystemBus()
+        bus.add_signal_receiver(self.catchall_signal_handler, interface_keyword='dbus_interface', member_keyword='member', dbus_interface=interface)
+        return dbus.Interface(bus.get_object('org.freedesktop.PackageKit', self.tid()), interface)
 
     def job_id(func):
         def wrapper(*args, **kwargs):
-            jid = func(*args, **kwargs)
+            self = args[0]
+            jid = polkit_auth_wrapper(func, *args)
             if jid == -1:
                 raise PackageKitTransactionFailure
+            elif jid == None:
+                self.run()
             else:
                 return jid
         return wrapper
 
     def run(self):
-        self.loop = gobject.MainLoop()
         self.loop.run()
 
     def catchall_signal_handler(self, *args, **kwargs):
-        if kwargs['member'] == "Finished":
+        member = kwargs['member'] 
+        if member == "AllowCancel":
+            self.AllowCancel(args[0])
+        elif member == "CallerActiveChanged":
+            self.CallerActiveChanged(args[0]) 
+        elif member == "Category":
+            self.Category(args[0], args[1], args[2], args[3], args[4])
+        elif member == "Details":
+            self.Details(args[0], args[1], args[2], args[3], args[4], args[5])
+        elif member == "ErrorCode":
+            self.ErrorCode(args[0], args[1])
+        elif member == "Files":
+            self.Files(args[0], args[1])
+        elif member == "Finished":
             self.loop.quit()
-            self.Finished(args[0], args[1], args[2])
-        elif kwargs['member'] == "ProgressChanged":
-            self.ProgressChanged(args[0], float(args[1])+(float(args[2])/100.0), args[3], args[4])
-        elif kwargs['member'] == "StatusChanged":
-            self.JobStatus(args[0], args[1])
-        elif kwargs['member'] == "Package":
-            self.Package(args[0], args[1], args[2], args[3])
-        elif kwargs['member'] == "UpdateDetail":
-            self.UpdateDetail(args[0], args[1], args[2], args[3], args[4], args[5], args[6])
-        elif kwargs['member'] == "Details":
-            self.Details(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7])
-        elif kwargs['member'] == "ErrorCode":
-            self.ErrorCode(args[0], args[1], args[2])
-        elif kwargs['member'] == "RequireRestart":
-            self.RequireRestart(args[0], args[1], args[2])
-        elif kwargs['member'] == "Transaction":
-            self.Transaction(args[0], args[1], args[2], args[3], args[4], args[5])
-        elif kwargs['member'] in ["TransactionListChanged",
-                      "AllowCancel", "JobListChanged", "Locked"]:
+            self.Finished(args[0], args[1])
+        elif member == "Message":
+            self.Message(args[0], args[1]) 
+        elif member == "Package":
+            self.Package(args[0], args[1], args[2])
+        elif member == "ProgressChanged":
+            self.ProgressChanged(args[0], args[1], args[2], args[3])
+        elif member == "RepoDetail":
+            self.RepoDetail(args[0], args[1], args[2])
+        elif member == "RepoSignatureRequired":
+            self.RepoSignatureRequired(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7])
+        elif member == "EulaRequired":
+            self.EulaRequired(args[0], args[1], args[2], args[3])
+        elif member == "MediaChangeRequired":
+            self.MediaChangeRequired(args[0], args[1], args[2])
+        elif member == "RequireRestart":
+            self.RequireRestart(args[0], args[1])
+        elif member == "StatusChanged":
+            self.StatusChanged(args[0])
+        elif member == "Transaction":
+            self.Transaction(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7])
+        elif member == "UpdateDetail":
+            self.UpdateDetail(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9], args[10], args[11])
+        elif member == "DistroUpgrade":
+            self.DistroUpgrade(args[0], args[1], args[2])
+        elif member in ["Destroy", "Locked", "TransactionListChanged"]:
             pass
         else:
-            print "Caught unhandled signal %s"% kwargs['member']
+            print "Caught unhandled signal %s"% member
             print "  args:"
             for arg in args:
                 print "        " + str(arg)
 
 # --- PK Signal Handlers ---
+# See http://www.packagekit.org/gtk-doc/Transaction.html
 
-    def Finished(self,
-            jid,         # Job ID
-            status,      # enum - unknown, success, failed, canceled
-            running_time  # amount of time transaction has been running in seconds
-            ):
+    def AllowCancel(self,
+                    allow_cancel):
         pass
 
-    def ProgressChanged(self,
-            jid,       # Job ID
-            percent,   # 0.0 - 100.0
-            elapsed,     # time
-            remaining    # time
-            ):
+    def CallerActiveChanged(self,
+                            is_active):
+        pass
+
+    def Category(self,
+                 parent_id,
+                 cat_id,
+                 name,
+                 summary,
+                 icon):
+        pass
+
+    def Details(self,
+                package_id,
+                license,
+                group,
+                detail,
+                url,
+                size):
+        pass
+
+    def ErrorCode(self,
+                  code,
+                  details):
+        pass
+
+    def Files(self,
+              package_id,
+              file_list):
         pass
 
-    def JobStatus(self,
-            jid,       # Job ID
-            status      # enum - invalid, setup, download, install, update, exit
-            ):
+    def Finished(self,
+                 exit,
+                 runtime):
+        pass
+
+    def Message(self,
+                type,
+                details):
         pass
 
     def Package(self,
-            jid,       # Job ID
-            value,     # installed=1, not-installed=0 | security=1, normal=0
-            package_id,
-            package_summary
-            ):
+                info,
+                package_id,
+                summary):
         pass
 
-    def UpdateDetail(self,
-             jid,       # Job ID
-             package_id,
-             updates,
-             obsoletes,
-             url,
-             restart_required,
-             update_text
-             ):
+    def ProgressChanged(self,
+                        percentage,
+                        subpercentage,
+                        elapsed,
+                        remaining):
         pass
 
-    def Details(self,
-            jid,       # Job ID
-            package_id,
-            license,
-            group,
-            detail,
-            url,
-            size,      # in bytes
-            file_list   # separated by ';'
-            ):
+    def RepoDetail(self,
+                   repo_id,
+                   description,
+                   enabled):
         pass
 
-    def ErrorCode(self,
-            jid,       # Job ID
-            error_code, # enumerated - see pk-enum.c in PackageKit source
-            details     # non-localized details
-            ):
+    def RepoSignatureRequired(self,
+                              package_id,
+                              repository_name,
+                              key_url,
+                              key_userid,
+                              key_id,
+                              key_fingerprint,
+                              key_timestamp,
+                              type):
+        pass
+
+    def EulaRequired(self,
+                     eula_id,
+                     package_id,
+                     vendor_name,
+                     license_agreement):
+        pass
+
+    def MediaChangeRequired(self,
+                            media_type,
+                            media_id,
+                            media_text):
         pass
 
     def RequireRestart(self,
-            jid,       # Job ID
-            type,      # enum - system, application, session
-            details     # non-localized details
-            ):
+                       type,
+                       package_id):
+        pass
+
+    def StatusChanged(self,
+                      status):
         pass
 
     def Transaction(self,
-            jid,      # Job ID
-            old_jid,  # Old Job ID
-            timespec, # Time (2007-09-27T15:29:22Z)
-            succeeded, # 1 or 0
-            role,     # enum, see task_role in pk-enum.c
-            duration   # in seconds
-            ):
+                    old_tid,
+                    timespec,
+                    succeeded,
+                    role,
+                    duration,
+                    data,
+                    uid,
+                    cmdline):
+        pass
+
+    def UpdateDetail(self,
+                     package_id,
+                     updates,
+                     obsoletes,
+                     vendor_url,
+                     bugzilla_url,
+                     cve_url,
+                     restart,
+                     update_text,
+                     changelog,
+                     state,
+                     issued,
+                     updated):
+        pass
+
+    def DistroUpgrade(self, 
+                      type,
+                      name,
+                      summary):
         pass
 
 # --- PK Methods ---
@@ -169,7 +255,7 @@ class PackageKit(PackageKitDbusInterface):
         Lists packages which could be updated.
         Causes 'Package' signals for each available package.
         """
-        return self.pk_iface.GetUpdates(self.tid(), filter)
+        return self.get_iface().GetUpdates(filter)
 
     @dbusException
     @job_id
@@ -177,16 +263,41 @@ class PackageKit(PackageKitDbusInterface):
         """
         Refreshes the backend's cache.
         """
-        return self.pk_iface.RefreshCache(self.tid(), force)
+        return self.get_iface().RefreshCache(force)
+
+    @dbusException
+    @job_id
+    def RepoEnable(self, repo, enabled):
+        """
+        Enable or disable the repository
+        """
+        return self.get_iface().RepoEnable(repo, enabled)
 
     @dbusException
     @job_id
+    def GetRepoList(self, filter):
+        """
+        Enable or disable the repository
+        """
+        return self.get_iface().GetRepoList(filter)
+    
+    @dbusException
+    @job_id
     def UpdateSystem(self):
         """
         Applies all available updates.
         Asynchronous
         """
-        return self.pk_iface.UpdateSystem(self.tid())
+        return self.get_iface().UpdateSystem()
+
+    @dbusException
+    @job_id
+    def UpdatePackages(self, package_ids):
+        """
+        Applies all available updates.
+        Asynchronous
+        """
+        return self.get_iface().UpdateSystem(package_ids)
 
     @dbusException
     @job_id
@@ -195,7 +306,7 @@ class PackageKit(PackageKitDbusInterface):
         Finds a package with the given name, and gives back a Package that matches that name exactly
         (not yet supported in yum backend, and maybe others)
         """
-        return self.pk_iface.Resolve(self.tid(), filter, package_name)
+        return self.get_iface().Resolve(filter, package_name)
 
     @dbusException
     @job_id
@@ -205,7 +316,7 @@ class PackageKit(PackageKitDbusInterface):
         'filter' could be 'installed', a repository name, or 'none'.
         Causes 'Package' signals for each package found.
         """
-        return self.pk_iface.SearchName(self.tid(), filter, pattern)
+        return self.get_iface().SearchName(filter, pattern)
 
     @dbusException
     @job_id
@@ -215,7 +326,7 @@ class PackageKit(PackageKitDbusInterface):
         'filter' could be 'installed', a repository name, or 'none'.
         Causes 'Package' signals for each package found.
         """
-        return self.pk_iface.SearchDetails(self.tid(), filter, pattern)
+        return self.get_iface().SearchDetails(filter, pattern)
 
     @dbusException
     @job_id
@@ -225,7 +336,7 @@ class PackageKit(PackageKitDbusInterface):
         'filter' could be 'installed', a repository name, or 'none'.
         Causes 'Package' signals for each package found.
         """
-        return self.pk_iface.SearchGroup(self.tid(), filter, pattern)
+        return self.get_iface().SearchGroup(filter, pattern)
 
     @dbusException
     @job_id
@@ -235,58 +346,58 @@ class PackageKit(PackageKitDbusInterface):
         'filter' could be 'installed', a repository name, or 'none'.
         Causes 'Package' signals for each package found.
         """
-        return self.pk_iface.SearchFile(self.tid(), filter, pattern)
+        return self.get_iface().SearchFile(filter, pattern)
 
     @dbusException
     @job_id
-    def GetDepends(self, package_id, recursive=False):
+    def GetDepends(self, package_ids, filter="none", recursive=False):
         """
         Lists package dependancies
         """
-        return self.pk_iface.GetDepends(self.tid(), package_id, recursive)
+        return self.get_iface().GetDepends(filter, package_ids, recursive)
 
     @dbusException
     @job_id
-    def GetRequires(self, package_id, recursive):
+    def GetRequires(self, package_ids, filter="none", recursive=False):
         """
         Lists package requires
         """
-        return self.pk_iface.GetRequires(self.tid(), package_id, recursive)
+        return self.get_iface().GetRequires(filter, package_id, recursive)
 
     @dbusException
     @job_id
-    def GetUpdateDetail(self, package_id):
+    def GetUpdateDetail(self, package_ids):
         """
         More details about an update.
         """
-        return self.pk_iface.GetUpdateDetail(self.tid(), package_id)
+        return self.get_iface().GetUpdateDetail(package_ids)
 
     @dbusException
     @job_id
-    def GetDetails(self, package_id):
+    def GetDetails(self, package_ids):
         """
-        Gets the Details of a given package_id.
+        Gets the Details of given package_ids.
         Causes a 'Details' signal.
         """
-        return self.pk_iface.GetDetails(self.tid(), package_id)
+        return self.get_iface().GetDetails(package_ids)
 
     @dbusException
     @job_id
-    def RemovePackages(self, package_ids, allow_deps=False ):
+    def RemovePackages(self, package_ids, allow_deps=False, auto_remove=False):
         """
-        Removes a package.
+        Removes packages.
         Asynchronous
         """
-        return self.pk_iface.RemovePackages(self.tid(), package_ids, allow_deps)
+        return self.get_iface().RemovePackages(package_ids, allow_deps, auto_remove)
 
     @dbusException
     @job_id
     def InstallPackages(self, package_ids):
         """
-        Installs a package.
+        Installs packages.
         Asynchronous
         """
-        return self.pk_iface.InstallPackages(self.tid(), package_ids)
+        return self.get_iface().InstallPackages(package_ids)
 
     @dbusException
     @job_id
@@ -295,129 +406,176 @@ class PackageKit(PackageKitDbusInterface):
         Updates a package.
         Asynchronous
         """
-        return self.pk_iface.UpdatePackages(self.tid(), package_ids)
+        return self.get_iface().UpdatePackages(package_ids)
 
     @dbusException
     @job_id
-    def InstallFiles(self, full_paths):
+    def InstallFiles(self, full_paths, only_trusted=False):
         """
         Installs a package which provides given file?
         Asynchronous
         """
-        return self.pk_iface.InstallFiles(self.tid(), full_paths)
-
+        return self.get_iface().InstallFiles(only_trusted, full_paths)
+    
     @dbusException
     @job_id
-    def ServicePack(self, location, enabled):
+    def SetLocale(self, code):
         """
-        Updates a service pack from a location
-        Asynchronous
+        Set system locale.
+        """
+        return self.get_iface().SetLocale(code)
+    
+    @dbusException
+    @job_id
+    def AcceptEula(self, eula_id):
+        """
+        This method allows the user to accept an end user licence agreement.
+        """
+        return self.get_iface().AcceptEula(eula_id)
+ 
+    @dbusException
+    @job_id
+    def DownloadPackages(self, package_ids):
         """
-        return self.pk_iface.ServicePack(self.tid(), location, enabled)
+        This method allows the user to accept an end user licence agreement.
+        """
+        return self.get_iface().DownloadPackages(package_ids)
+    
+    @dbusException
+    @job_id
+    def GetAllowCancel(self):
+        """
+        Get if cancel is allowed for the transaction 
+        """
+        return self.get_iface().GetAllowCancel()
 
-## Do things or query transactions
     @dbusException
     @job_id
-    def Cancel(self):
+    def GetCategories(self):
         """
-        Might not succeed for all manner or reasons.
-        throws NoSuchTransaction
+        This method returns the collection categories
+        """
+        return self.get_iface().GetCategories()
+    
+    @dbusException
+    @job_id
+    def GetFiles(self, package_ids):
         """
-        return self.pk_iface.Cancel(self.tid())
+        This method should return the file list of the package_ids
+        """
+        return self.get_iface().GetFiles(package_ids)
 
     @dbusException
     @job_id
-    def GetStatus(self):
+    def GetPackageLast(self):
         """
-        This is what the transaction is currrently doing, and might change.
-        Returns status (query, download, install, exit)
-        throws NoSuchTransaction
+        This method emits the package that was last emmitted from the daemon.
         """
-        return self.pk_iface.GetStatus(self.tid())
+        return self.get_iface().GetPackageLast()
 
     @dbusException
     @job_id
-    def GetRole(self):
+    def GetDistroUpgrades(self):
         """
-        This is the master role, i.e. won't change for the lifetime of the transaction
-        Returns status (query, download, install, exit) and package_id (package acted upon, or NULL
-        throws NoSuchTransaction
+        This method should return a list of distribution upgrades that are available.
         """
-        return self.pk_iface.GetRole(self.tid())
+        return self.get_iface().GetDistroUpgrades()
 
     @dbusException
     @job_id
-    def GetPercentage(self):
+    def InstallSignature(self, sig_type, key_id, package_id):
         """
-        Returns percentage of transaction complete
-        throws NoSuchTransaction
+        This method allows us to install new security keys.
         """
-        return self.pk_iface.GetPercentage(self.tid())
+        return self.get_iface().InstallSignature(sig_type, key_id, package_id)
 
     @dbusException
     @job_id
-    def GetSubPercentage(self):
+    def IsCallerActive(self):
         """
-        Returns percentage of this part of transaction complete
-        throws NoSuchTransaction
+        This method allows us to find if the original caller of the method is still connected to the session bus.
         """
-        return self.pk_iface.GetSubPercentage(self.tid())
+        return self.get_iface().IsCallerActive()
 
     @dbusException
     @job_id
-    def GetPackage(self):
+    def RepoSetData(self, repo_id, parameter, value):
         """
-        Returns package being acted upon at this very moment
-        throws NoSuchTransaction
+        This method allows arbitary data to be passed to the repository handler.
         """
-        return self.pk_iface.GetPackage(self.tid())
+        return self.get_iface().RepoSetData(repo_id, parameter, value)
 
-## Get lists of transactions
+    @dbusException
+    @job_id
+    def Rollback(self, transaction_id):
+        """
+        This method rolls back the package database to a previous transaction.
+        """
+        return self.get_iface().Rollback(transaction_id)
 
     @dbusException
-    def GetTransactionList(self):
+    @job_id
+    def WhatProvides(self, filter, type, search):
         """
-        Returns list of (active) transactions.
+        This method returns packages that provide the supplied attributes.
         """
-        return self.pk_iface.GetTransactionList()
+        return self.get_iface().WhatProvides(filter, type, search)
 
+## Do things or query transactions
     @dbusException
     @job_id
-    def GetOldTransactions(self, number=5):
+    def Cancel(self):
         """
-        Causes Transaction signals for each Old transaction.
+        Might not succeed for all manner or reasons.
+        throws NoSuchTransaction
         """
-        return self.pk_iface.GetOldTransactions(self.tid(), number)
+        return self.get_iface().Cancel()
 
-## General methods
+    @dbusException
+    @job_id
+    def GetStatus(self):
+        """
+        This is what the transaction is currrently doing, and might change.
+        Returns status (query, download, install, exit)
+        throws NoSuchTransaction
+        """
+        return self.get_iface().GetStatus()
 
     @dbusException
-    def GetBackendDetail(self):
+    @job_id
+    def GetRole(self):
         """
-        Returns name, author, and version of backend.
+        This is the master role, i.e. won't change for the lifetime of the transaction
+        Returns status (query, download, install, exit) and package_id (package acted upon, or NULL
+        throws NoSuchTransaction
         """
-        return self.pk_iface.GetBackendDetail()
+        return self.get_iface().GetRole()
 
     @dbusException
-    def GetActions(self):
+    @job_id
+    def GetProgress(self):
         """
-        Returns list of supported actions.
+        Returns progress of transaction
         """
-        return self.pk_iface.GetActions()
+        return self.get_iface().GetSubPercentage()
 
     @dbusException
-    def GetGroups(self):
+    @job_id
+    def GetPackages(self, filter="none"):
         """
-        Returns list of supported groups.
+        Returns packages being acted upon at this very moment
+        throws NoSuchTransaction
         """
-        return self.pk_iface.GetGroups()
+        return self.get_iface().GetPackage(filter)
 
+## Get lists of transactions
     @dbusException
-    def GetFilters(self):
+    @job_id
+    def GetOldTransactions(self, number=5):
         """
-        Returns list of supported filters.
+        Causes Transaction signals for each Old transaction.
         """
-        return self.pk_iface.GetFilters()
+        return self.get_iface().GetOldTransactions(number)
 
 class DumpingPackageKit(PackageKit):
     """
@@ -432,3 +590,35 @@ class DumpingPackageKit(PackageKit):
         for arg in args:
             print "        " + str(arg)
 
+#### PolicyKit authentication borrowed wrapper ##
+class PermissionDeniedByPolicy(dbus.DBusException):
+    _dbus_error_name = 'org.freedesktop.PackageKit.Transaction.RefusedByPolicy'
+
+def polkit_auth_wrapper(fn, *args, **kwargs):
+    '''Function call wrapper for PolicyKit authentication.
+
+    Call fn(*args, **kwargs). If it fails with a PermissionDeniedByPolicy
+    and the caller can authenticate to get the missing privilege, the PolicyKit
+    authentication agent is called, and the function call is attempted again.
+    '''
+    try:
+        return fn(*args, **kwargs)
+    except dbus.DBusException, e:
+        if e._dbus_error_name == PermissionDeniedByPolicy._dbus_error_name:
+            # last words in message are privilege and auth result
+            (priv, auth_result) = e.message.split()[-2:]
+            if auth_result.startswith('auth_'):
+                pk_auth = dbus.SessionBus().get_object(
+                    'org.freedesktop.PolicyKit.AuthenticationAgent', '/',
+                    'org.gnome.PolicyKit.AuthorizationManager.SingleInstance')
+                # TODO: provide xid
+                res = pk_auth.ObtainAuthorization(priv, dbus.UInt32(0),
+                    dbus.UInt32(os.getpid()), timeout=300)
+                print res
+                if res:
+                    return fn(*args, **kwargs)
+            raise PermissionDeniedByPolicy(priv + ' ' + auth_result)
+        else:
+            raise
+
+
commit 8ce1fdd11a6cc414c97281ca8f121a374786139e
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Jul 29 15:41:50 2009 +0100

    Remove the homegrown egg_strequal() and egg_strnumber() and use g_strcmp0 instead

diff --git a/backends/alpm/pk-backend-alpm.c b/backends/alpm/pk-backend-alpm.c
index dceab77..0a82bf3 100644
--- a/backends/alpm/pk-backend-alpm.c
+++ b/backends/alpm/pk-backend-alpm.c
@@ -89,13 +89,13 @@ pkg_from_package_id_str (const gchar *package_id_str)
 	PkPackageId *pkg_id = pk_package_id_new_from_string (package_id_str);
 
 	/* do all this fancy stuff */
-	if (egg_strequal (ALPM_LOCAL_DB_ALIAS, pk_package_id_get_data (pkg_id)))
+	if (g_strcmp0 (ALPM_LOCAL_DB_ALIAS, pk_package_id_get_data(pkg_id)) == 0)
 		repo = alpm_option_get_localdb ();
 	else {
 		alpm_list_t *iterator;
 		for (iterator = alpm_option_get_syncdbs (); iterator; iterator = alpm_list_next (iterator)) {
 			repo = alpm_list_getdata (iterator);
-			if (egg_strequal (alpm_db_get_name (repo), pk_package_id_get_data (pkg_id)))
+			if (g_strcmp0 (alpm_db_get_name(repo), pk_package_id_get_data(pkg_id)) == 0)
 				break;
 		}
 	}
@@ -250,7 +250,7 @@ cb_dl_progress (const char *filename, off_t file_xfered, off_t file_total)
 	int trans_percent;
 
 	if (g_str_has_suffix (filename, ALPM_PKG_EXT)) {
-		if (!egg_strequal (filename, current_file)) {
+		if (g_strcmp0 (filename, current_file) != 0) {
 			alpm_list_t *repos;
 			alpm_list_t *packages;
 			pmpkg_t *current_pkg = NULL;
@@ -499,7 +499,7 @@ parse_config (const char *file, const char *givensection, pmdb_t * const givendb
 			}
 
 			/* if we are not looking at the options section, register a db */
-			if (!egg_strequal (section, "options"))
+			if (g_strcmp0 (section, "options") != 0)
 				db = alpm_db_register_sync (section);
 		} else {
 			/* directive */
@@ -520,15 +520,15 @@ parse_config (const char *file, const char *givensection, pmdb_t * const givendb
 				return 1;
 			}
 
-			if (ptr == NULL && egg_strequal (section, "options")) {
+			if (ptr == NULL && g_strcmp0 (section, "options") == 0) {
 				/* directives without settings, all in [options] */
-				if (egg_strequal (key, "NoPassiveFTP")) {
+				if (g_strcmp0 (key, "NoPassiveFTP") == 0) {
 					alpm_option_set_nopassiveftp (1);
 					egg_debug ("config: nopassiveftp");
-				} else if (egg_strequal (key, "UseSyslog")) {
+				} else if (g_strcmp0 (key, "UseSyslog") == 0) {
 					alpm_option_set_usesyslog (1);
 					egg_debug ("config: usesyslog");
-				} else if (egg_strequal (key, "UseDelta")) {
+				} else if (g_strcmp0 (key, "UseDelta") == 0) {
 					alpm_option_set_usedelta (1);
 					egg_debug ("config: usedelta");
 				} else {
@@ -537,45 +537,45 @@ parse_config (const char *file, const char *givensection, pmdb_t * const givendb
 				}
 			} else {
 				/* directives with settings */
-				if (egg_strequal (key, "Include")) {
+				if (g_strcmp0 (key, "Include") == 0) {
 					egg_debug ("config: including %s", ptr);
 					parse_config(ptr, section, db);
 					/* Ignore include failures... assume non-critical */
-				} else if (egg_strequal (section, "options")) {
-					if (egg_strequal (key, "NoUpgrade")) {
+				} else if (g_strcmp0 (section, "options") == 0) {
+					if (g_strcmp0 (key, "NoUpgrade") == 0) {
 						set_repeating_option (ptr, "NoUpgrade", alpm_option_add_noupgrade);
-					} else if (egg_strequal (key, "NoExtract")) {
+					} else if (g_strcmp0 (key, "NoExtract") == 0) {
 						set_repeating_option (ptr, "NoExtract", alpm_option_add_noextract);
-					} else if (egg_strequal (key, "IgnorePkg")) {
+					} else if (g_strcmp0 (key, "IgnorePkg") == 0) {
 						set_repeating_option (ptr, "IgnorePkg", alpm_option_add_ignorepkg);
-					} else if (egg_strequal (key, "IgnoreGroup")) {
+					} else if (g_strcmp0 (key, "IgnoreGroup") == 0) {
 						set_repeating_option (ptr, "IgnoreGroup", alpm_option_add_ignoregrp);
-					} else if (egg_strequal (key, "HoldPkg")) {
+					} else if (g_strcmp0 (key, "HoldPkg") == 0) {
 						set_repeating_option (ptr, "HoldPkg", alpm_option_add_holdpkg);
-					} else if (egg_strequal (key, "SyncFirst")) {
+					} else if (g_strcmp0 (key, "SyncFirst") == 0) {
 						set_repeating_option (ptr, "SyncFirst", option_add_syncfirst);
-					} else if (egg_strequal (key, "DBPath")) {
+					} else if (g_strcmp0 (key, "DBPath") == 0) {
 						alpm_option_set_dbpath (ptr);
-					} else if (egg_strequal (key, "CacheDir")) {
+					} else if (g_strcmp0 (key, "CacheDir") == 0) {
 						if (alpm_option_add_cachedir(ptr) != 0) {
 							egg_error ("problem adding cachedir '%s' (%s)", ptr, alpm_strerrorlast ());
 							return 1;
 						}
 						egg_debug ("config: cachedir: %s", ptr);
-					} else if (egg_strequal (key, "RootDir")) {
+					} else if (g_strcmp0 (key, "RootDir") == 0) {
 						alpm_option_set_root (ptr);
 						egg_debug ("config: rootdir: %s", ptr);
-					} else if (egg_strequal (key, "LogFile")) {
+					} else if (g_strcmp0 (key, "LogFile") == 0) {
 						alpm_option_set_logfile (ptr);
 						egg_debug ("config: logfile: %s", ptr);
-					} else if (egg_strequal (key, "XferCommand")) {
+					} else if (g_strcmp0 (key, "XferCommand") == 0) {
 						alpm_option_set_xfercommand (ptr);
 						egg_debug ("config: xfercommand: %s", ptr);
 					} else {
 						egg_error ("config file %s, line %d: directive '%s' not recognized.", file, linenum, key);
 						return 1;
 					}
-				} else if (egg_strequal (key, "Server")) {
+				} else if (g_strcmp0 (key, "Server") == 0) {
 					/* let's attempt a replacement for the current repo */
 					char *server = strreplace (ptr, "$repo", section);
 
@@ -1004,7 +1004,7 @@ backend_search (PkBackend *backend, pmdb_t *repo, const gchar *needle, PkAlpmSea
 				match = TRUE;
 				break;
 			case PK_ALPM_SEARCH_TYPE_RESOLVE:
-				match = egg_strequal (alpm_pkg_get_name (pkg), needle);
+				match = (g_strcmp0 (alpm_pkg_get_name(pkg), needle) == 0);
 				break;
 			case PK_ALPM_SEARCH_TYPE_NAME:
 				match = strstr (alpm_pkg_get_name (pkg), needle) != NULL;
@@ -1024,14 +1024,14 @@ backend_search (PkBackend *backend, pmdb_t *repo, const gchar *needle, PkAlpmSea
 					gchar *group = (gchar *) g_hash_table_lookup (group_map, (char *) alpm_list_getdata (groups));
 					if (group == NULL)
 						group = (gchar *) "other";
-					match = egg_strequal (group, needle);
+					match = (g_strcmp0 (group, needle) == 0);
 				}
 				break;
 			case PK_ALPM_SEARCH_TYPE_PROVIDES:
 				match = FALSE;
 				/* iterate provides */
 				for (provides = alpm_pkg_get_provides (pkg); provides && !match; provides = alpm_list_next (provides))
-					match = egg_strequal (needle, alpm_list_getdata (provides));
+					match = (g_strcmp0 (needle, alpm_list_getdata(provides)) == 0);
 				break;
 			default:
 				match = FALSE;
diff --git a/backends/dummy/pk-backend-dummy.c b/backends/dummy/pk-backend-dummy.c
index aad1fe6..e0295dc 100644
--- a/backends/dummy/pk-backend-dummy.c
+++ b/backends/dummy/pk-backend-dummy.c
@@ -138,7 +138,7 @@ backend_get_depends (PkBackend *backend, PkBitfield filters, gchar **package_ids
 {
 	pk_backend_set_status (backend, PK_STATUS_ENUM_QUERY);
 
-	if (egg_strequal (package_ids[0], "scribus;1.3.4-1.fc8;i386;fedora")) {
+	if (g_strcmp0 (package_ids[0], "scribus;1.3.4-1.fc8;i386;fedora") == 0) {
 		pk_backend_package (backend, PK_INFO_ENUM_AVAILABLE,
 				    "scribus-clipart;1.3.4-1.fc8;i386;fedora", "Clipart for scribus");
 	} else {
@@ -166,25 +166,25 @@ backend_get_details (PkBackend *backend, gchar **package_ids)
 	len = g_strv_length (package_ids);
 	for (i=0; i<len; i++) {
 		package_id = package_ids[i];
-		if (egg_strequal (package_id, "powertop;1.8-1.fc8;i386;fedora")) {
+		if (g_strcmp0 (package_id, "powertop;1.8-1.fc8;i386;fedora") == 0) {
 			pk_backend_details (backend, "powertop;1.8-1.fc8;i386;fedora", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
 					    "PowerTOP is a tool that finds the software component(s) that make your "
 					    "computer use more power than necessary while it is idle.", "http://live.gnome.org/powertop", 101*1024);
-		} else if (egg_strequal (package_id, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed")) {
+		} else if (g_strcmp0 (package_id, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed") == 0) {
 			pk_backend_details (backend, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
 					    "The kernel package contains the Linux kernel (vmlinuz), the core of any "
 					    "Linux operating system.  The kernel handles the basic functions of the "
 					    "operating system: memory allocation, process allocation, device input "
 					    "and output, etc.", "http://www.kernel.org", 33*1024*1024);
-		} else if (egg_strequal (package_id, "gtkhtml2;2.19.1-4.fc8;i386;fedora")) {
+		} else if (g_strcmp0 (package_id, "gtkhtml2;2.19.1-4.fc8;i386;fedora") == 0) {
 			pk_backend_details (backend, "gtkhtml2;2.19.1-4.fc8;i386;fedora", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
 					    "GtkHTML2 (sometimes called libgtkhtml) is a widget for displaying html "
 					    "pages.", "http://live.gnome.org/gtkhtml", 133*1024);
-		} else if (egg_strequal (package_id, "vino;2.24.2.fc9;i386;fedora")) {
+		} else if (g_strcmp0 (package_id, "vino;2.24.2.fc9;i386;fedora") == 0) {
 			pk_backend_details (backend, "vino;2.24.2.fc9;i386;fedora", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
 					    "Vino is a VNC server for GNOME. It allows remote users to "
 					    "connect to a running GNOME session using VNC.", "http://live.gnome.org/powertop", 3*1024*1024);
-		} else if (egg_strequal (package_id, "gnome-power-manager;2.6.19;i386;fedora")) {
+		} else if (g_strcmp0 (package_id, "gnome-power-manager;2.6.19;i386;fedora") == 0) {
 			pk_backend_details (backend, "gnome-power-manager;2.6.19;i386;fedora", "GPL2", PK_GROUP_ENUM_PROGRAMMING,
 					    "GNOME Power Manager uses the information and facilities provided by HAL "
 					    "displaying icons and handling user callbacks in an interactive GNOME session.\n"
@@ -238,11 +238,11 @@ backend_get_files (PkBackend *backend, gchar **package_ids)
 	len = g_strv_length (package_ids);
 	for (i=0; i<len; i++) {
 		package_id = package_ids[i];
-		if (egg_strequal (package_id, "powertop;1.8-1.fc8;i386;fedora"))
+		if (g_strcmp0 (package_id, "powertop;1.8-1.fc8;i386;fedora") == 0)
 			pk_backend_files (backend, package_id, "/usr/share/man/man1/boo;/usr/bin/xchat-gnome");
-		else if (egg_strequal (package_id, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed"))
+		else if (g_strcmp0 (package_id, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed") == 0)
 			pk_backend_files (backend, package_id, "/usr/share/man/man1;/usr/share/man/man1/gnome-power-manager.1.gz");
-		else if (egg_strequal (package_id, "gtkhtml2;2.19.1-4.fc8;i386;fedora"))
+		else if (g_strcmp0 (package_id, "gtkhtml2;2.19.1-4.fc8;i386;fedora") == 0)
 			pk_backend_files (backend, package_id, "/usr/share/man/man1;/usr/bin/ck-xinit-session;/lib/libselinux.so.1");
 		else
 			pk_backend_files (backend, package_id, "/usr/share/gnome-power-manager;/usr/bin/ck-xinit-session");
@@ -299,14 +299,14 @@ backend_get_update_detail_timeout (gpointer data)
 	len = g_strv_length (_package_ids);
 	for (i=0; i<len; i++) {
 		package_id = _package_ids[i];
-		if (egg_strequal (package_id, "powertop;1.8-1.fc8;i386;fedora")) {
+		if (g_strcmp0 (package_id, "powertop;1.8-1.fc8;i386;fedora") == 0) {
 			pk_backend_update_detail (backend, package_id,
 						  "powertop;1.7-1.fc8;i386;installed", "",
 						  "http://www.distro-update.org/page?moo;Bugfix release for powertop",
 						  "http://bgzilla.fd.org/result.php?#12344;Freedesktop Bugzilla #12344",
 						  "", PK_RESTART_ENUM_NONE, "Update to newest upstream source",
 						  changelog, PK_UPDATE_STATE_ENUM_STABLE, "2008-07-31", NULL);
-		} else if (egg_strequal (package_id, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed")) {
+		} else if (g_strcmp0 (package_id, "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed") == 0) {
 			pk_backend_update_detail (backend, package_id,
 						  "kernel;2.6.22-0.104.rc3.git6.fc8;i386;installed"
 						  PK_PACKAGE_IDS_DELIM
@@ -320,7 +320,7 @@ backend_get_update_detail_timeout (gpointer data)
 						  "* This should fix many driver bugs when using nouveau\n"
 						  " * This also introduces the new `frobnicator` driver for *vibrating* rabbit hardware.",
 						  changelog, PK_UPDATE_STATE_ENUM_UNSTABLE, "2008-06-28", NULL);
-		} else if (egg_strequal (package_id, "gtkhtml2;2.19.1-4.fc8;i386;fedora")) {
+		} else if (g_strcmp0 (package_id, "gtkhtml2;2.19.1-4.fc8;i386;fedora") == 0) {
 			pk_backend_update_detail (backend, package_id,
 						  "gtkhtml2;2.18.1-22.fc8;i386;installed", "",
 						  "http://www.distro-update.org/page?moo;Bugfix release for gtkhtml",
@@ -332,7 +332,7 @@ backend_get_update_detail_timeout (gpointer data)
 						  "- and that new thing",
 						  changelog, PK_UPDATE_STATE_ENUM_UNKNOWN, "2008-07-25", NULL);
 
-		} else if (egg_strequal (package_id, "vino;2.24.2.fc9;i386;fedora")) {
+		} else if (g_strcmp0 (package_id, "vino;2.24.2.fc9;i386;fedora") == 0) {
 			pk_backend_update_detail (backend, package_id,
 						  "vino;2.24.1.fc9;i386;fedora", "",
 						  "", "", NULL, PK_RESTART_ENUM_NONE,
@@ -460,7 +460,7 @@ backend_install_packages (PkBackend *backend, gboolean only_trusted, gchar **pac
 
 	/* FIXME: support only_trusted */
 
-	if (egg_strequal (package_ids[0], "vips-doc;7.12.4-2.fc8;noarch;linva")) {
+	if (g_strcmp0 (package_ids[0], "vips-doc;7.12.4-2.fc8;noarch;linva") == 0) {
 		if (_use_gpg && !_has_signature) {
 			pk_backend_repo_signature_required (backend, package_ids[0], "updates",
 							    "http://example.com/gpgkey",
@@ -529,7 +529,7 @@ backend_install_signature (PkBackend *backend, PkSigTypeEnum type,
 	pk_backend_set_status (backend, PK_STATUS_ENUM_INSTALL);
 	if (type == PK_SIGTYPE_ENUM_GPG &&
 	    /* egg_strequal (package_id, "vips-doc;7.12.4-2.fc8;noarch;linva") && */
-	    egg_strequal (key_id, "BB7576AC")) {
+	    g_strcmp0 (key_id, "BB7576AC") == 0) {
 		egg_debug ("installed signature %s for %s", key_id, package_id);
 		_has_signature = TRUE;
 	} else {
@@ -612,19 +612,19 @@ backend_resolve (PkBackend *backend, PkBitfield filters, gchar **packages)
 	/* each one has a different detail for testing */
 	len = g_strv_length (packages);
 	for (i=0; i<len; i++) {
-		if (egg_strequal (packages[i], "vips-doc"))
+		if (g_strcmp0 (packages[i], "vips-doc") == 0)
 			pk_backend_package (backend, PK_INFO_ENUM_AVAILABLE,
 					    "vips-doc;7.12.4-2.fc8;noarch;linva", "The vips documentation package.");
-		else if (egg_strequal (packages[i], "glib2"))
+		else if (g_strcmp0 (packages[i], "glib2") == 0)
 			pk_backend_package (backend, PK_INFO_ENUM_INSTALLED,
 					    "glib2;2.14.0;i386;fedora", "The GLib library");
-		else if (egg_strequal (packages[i], "powertop"))
+		else if (g_strcmp0 (packages[i], "powertop") == 0)
 			pk_backend_package (backend, PK_INFO_ENUM_UPDATING,
 					    "powertop;1.8-1.fc8;i386;fedora", "Power consumption monitor");
-		else if (egg_strequal (packages[i], "kernel"))
+		else if (g_strcmp0 (packages[i], "kernel") == 0)
 			pk_backend_package (backend, PK_INFO_ENUM_UPDATING,
 					    "kernel;2.6.23-0.115.rc3.git1.fc8;i386;installed", "The Linux kernel (the core of the Linux operating system)");
-		else if (egg_strequal (packages[i], "gtkhtml2"))
+		else if (g_strcmp0 (packages[i], "gtkhtml2") == 0)
 			pk_backend_package (backend, PK_INFO_ENUM_UPDATING,
 					    "gtkhtml2;2.19.1-4.fc8;i386;fedora", "An HTML widget for GTK+ 2.0");
 	}
@@ -663,7 +663,7 @@ static void
 backend_rollback (PkBackend *backend, const gchar *transaction_id)
 {
 	/* allow testing error condition */
-	if (egg_strequal (transaction_id, "/397_eeecadad_data")) {
+	if (g_strcmp0 (transaction_id, "/397_eeecadad_data") == 0) {
 		pk_backend_error_code (backend, PK_ERROR_ENUM_TRANSACTION_ERROR, "invalid transaction_id");
 		pk_backend_finished (backend);
 		return;
@@ -747,7 +747,7 @@ backend_search_name_timeout (gpointer data)
 	locale = pk_backend_get_locale (backend);
 
 	egg_debug ("locale is %s", locale);
-	if (!egg_strequal (locale, "en_GB.utf8")) {
+	if (g_strcmp0 (locale, "en_GB.utf8") != 0) {
 		pk_backend_package (backend, PK_INFO_ENUM_INSTALLED,
 				    "evince;0.9.3-5.fc8;i386;installed",
 				    "PDF Dokument Ƥrŏgrȃɱ");
@@ -1027,16 +1027,16 @@ backend_repo_enable (PkBackend *backend, const gchar *rid, gboolean enabled)
 {
 	pk_backend_set_status (backend, PK_STATUS_ENUM_REQUEST);
 
-	if (egg_strequal (rid, "local")) {
+	if (g_strcmp0 (rid, "local") == 0) {
 		egg_debug ("local repo: %i", enabled);
 		_repo_enabled_local = enabled;
-	} else if (egg_strequal (rid, "development")) {
+	} else if (g_strcmp0 (rid, "development") == 0) {
 		egg_debug ("devel repo: %i", enabled);
 		_repo_enabled_devel = enabled;
-	} else if (egg_strequal (rid, "fedora")) {
+	} else if (g_strcmp0 (rid, "fedora") == 0) {
 		egg_debug ("fedora repo: %i", enabled);
 		_repo_enabled_fedora = enabled;
-	} else if (egg_strequal (rid, "livna-development")) {
+	} else if (g_strcmp0 (rid, "livna-development") == 0) {
 		egg_debug ("livna repo: %i", enabled);
 		_repo_enabled_livna = enabled;
 	} else {
@@ -1077,11 +1077,11 @@ backend_what_provides_timeout (gpointer data)
 {
 	PkBackend *backend = (PkBackend *) data;
 	if (_progress_percentage == 100) {
-		if (egg_strequal (_search, "gstreamer0.10(decoder-audio/x-wma)(wmaversion=3)")) {
+		if (g_strcmp0 (_search, "gstreamer0.10(decoder-audio/x-wma)(wmaversion=3)") == 0) {
 			pk_backend_package (backend, PK_INFO_ENUM_AVAILABLE,
 					    "gstreamer-plugins-bad;0.10.3-5.lvn;i386;available",
 					    "GStreamer streaming media framework \"bad\" plug-ins");
-		} else if (egg_strequal (_search, "gstreamer0.10(decoder-video/x-wma)(wmaversion=3)")) {
+		} else if (g_strcmp0 (_search, "gstreamer0.10(decoder-video/x-wma)(wmaversion=3)") == 0) {
 			pk_backend_package (backend, PK_INFO_ENUM_AVAILABLE,
 					    "gstreamer-plugins-flumpegdemux;0.10.15-5.lvn;i386;available",
 					    "MPEG demuxer for GStreamer");
diff --git a/backends/razor/pk-backend-razor.c b/backends/razor/pk-backend-razor.c
index f7dc1cf..9301c62 100644
--- a/backends/razor/pk-backend-razor.c
+++ b/backends/razor/pk-backend-razor.c
@@ -122,7 +122,7 @@ backend_resolve_thread (PkBackend *backend)
 					    RAZOR_DETAIL_SUMMARY, &summary,
 					    RAZOR_DETAIL_LAST)) {
 		for (i=0; i<length; i++) {
-			if (egg_strequal (name, package_ids[i])) {
+			if (g_strcmp0 (name, package_ids[i]) == 0) {
 				pk_razor_emit_package (backend, name, version, arch, summary);
 			}
 		}
@@ -171,7 +171,7 @@ backend_get_details_thread (PkBackend *backend)
 		for (i=0; i<length; i++) {
 			/* TODO: we should cache this */
 			id = pk_package_id_new_from_string (package_ids[i]);
-			if (egg_strequal (name, id->name)) {
+			if (g_strcmp0 (name, id->name) == 0) {
 				package_id = pk_package_id_build (name, version, arch, "installed");
 				razor_package_get_details (set, package,
 							   RAZOR_DETAIL_SUMMARY, &summary,
@@ -216,7 +216,7 @@ backend_resolve_package_id (const PkPackageId *id)
 					    RAZOR_DETAIL_VERSION, &version,
 					    RAZOR_DETAIL_ARCH, &arch,
 					    RAZOR_DETAIL_LAST)) {
-		if (egg_strequal (name, id->name)) {
+		if (g_strcmp0 (name, id->name) == 0) {
 			package_retval = package;
 			break;
 		}
diff --git a/client/pk-console.c b/client/pk-console.c
index de8d5b4..fd196fe 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -2287,7 +2287,7 @@ egg_test_console (EggTest *test)
 	 ************************************************************/
 	egg_test_title (test, "pad smaller");
 	text_safe = pk_strpad ("richard", 10);
-	if (egg_strequal (text_safe, "richard   "))
+	if (g_strcmp0 (text_safe, "richard   ") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "failed the padd '%s'", text_safe);
@@ -2296,7 +2296,7 @@ egg_test_console (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "pad NULL");
 	text_safe = pk_strpad (NULL, 10);
-	if (egg_strequal (text_safe, "          "))
+	if (g_strcmp0 (text_safe, "          ") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "failed the padd '%s'", text_safe);
@@ -2305,7 +2305,7 @@ egg_test_console (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "pad nothing");
 	text_safe = pk_strpad ("", 10);
-	if (egg_strequal (text_safe, "          "))
+	if (g_strcmp0 (text_safe, "          ") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "failed the padd '%s'", text_safe);
@@ -2314,7 +2314,7 @@ egg_test_console (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "pad over");
 	text_safe = pk_strpad ("richardhughes", 10);
-	if (egg_strequal (text_safe, "richardhughes"))
+	if (g_strcmp0 (text_safe, "richardhughes") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "failed the padd '%s'", text_safe);
@@ -2323,7 +2323,7 @@ egg_test_console (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "pad zero");
 	text_safe = pk_strpad ("rich", 0);
-	if (egg_strequal (text_safe, "rich"))
+	if (g_strcmp0 (text_safe, "rich") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "failed the padd '%s'", text_safe);
diff --git a/lib/packagekit-glib/egg-string.c b/lib/packagekit-glib/egg-string.c
index 7eb7a09..6203029 100644
--- a/lib/packagekit-glib/egg-string.c
+++ b/lib/packagekit-glib/egg-string.c
@@ -46,43 +46,6 @@
 #include "egg-string.h"
 
 /**
- * egg_strnumber:
- * @text: The text the validate
- *
- * Tests a string to see if it is a number. Both positive and negative numbers
- * are allowed.
- *
- * Return value: %TRUE if the string represents a numeric value
- **/
-gboolean
-egg_strnumber (const gchar *text)
-{
-	guint i;
-	guint length;
-
-	/* check explicitly */
-	if (egg_strzero (text))
-		return FALSE;
-
-	/* max length is 10 */
-	length = egg_strlen (text, 10);
-	if (length == 10) {
-		egg_warning ("input too long: %s", text);
-		return FALSE;
-	}
-
-	for (i=0; i<length; i++) {
-		if (i == 0 && text[i] == '-') {
-			/* negative sign */
-		} else if (g_ascii_isdigit (text[i]) == FALSE) {
-			egg_warning ("not a number '%c' in text!", text[i]);
-			return FALSE;
-		}
-	}
-	return TRUE;
-}
-
-/**
  * egg_strtoint:
  * @text: The text the convert
  * @value: The return numeric return value
@@ -201,24 +164,6 @@ egg_strlen (const gchar *text, guint len)
 }
 
 /**
- * egg_strequal:
- * @id1: the first item of text to test
- * @id2: the second item of text to test
- *
- * 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 both non-%NULL and the same.
- **/
-gboolean
-egg_strequal (const gchar *id1, const gchar *id2)
-{
-	if (id1 == NULL || id2 == NULL)
-		return FALSE;
-	return (strcmp (id1, id2) == 0);
-}
-
-/**
  * egg_strvequal:
  * @id1: the first item of text to test
  * @id2: the second item of text to test
@@ -250,7 +195,7 @@ egg_strvequal (gchar **id1, gchar **id2)
 
 	/* text equal each one */
 	for (i=0; i<length1; i++) {
-		if (!egg_strequal (id1[i], id2[i]))
+		if (g_strcmp0 (id1[i], id2[i]) != 0)
 			return FALSE;
 	}
 
@@ -308,23 +253,6 @@ egg_string_test (EggTest *test)
 		return;
 
 	/************************************************************
-	 ****************       String equal       ******************
-	 ************************************************************/
-	egg_test_title (test, "egg_strequal same argument");
-	temp = "dave";
-	if (egg_strequal (temp, temp))
-		egg_test_success (test, NULL);
-	else
-		egg_test_failed (test, "incorrect ret when both same");
-
-	/************************************************************/
-	egg_test_title (test, "egg_strequal both const");
-	if (egg_strequal ("dave", "dave"))
-		egg_test_success (test, NULL);
-	else
-		egg_test_failed (test, "incorrect ret when both same");
-
-	/************************************************************
 	 ****************    String array equal    ******************
 	 ************************************************************/
 	egg_test_title (test, "egg_strvequal same argument");
@@ -397,12 +325,12 @@ egg_string_test (EggTest *test)
 
 	/************************************************************/
 	egg_test_title (test, "id strcmp pass");
-	ret = egg_strequal ("moo;0.0.1;i386;fedora", "moo;0.0.1;i386;fedora");
+	ret = (g_strcmp0 ("moo;0.0.1;i386;fedora", "moo;0.0.1;i386;fedora") == 0);
 	egg_test_assert (test, ret);
 
 	/************************************************************/
 	egg_test_title (test, "id strcmp fail");
-	ret = egg_strequal ("moo;0.0.1;i386;fedora", "moo;0.0.2;i386;fedora");
+	ret = (g_strcmp0 ("moo;0.0.1;i386;fedora", "moo;0.0.2;i386;fedora") == 0);
 	egg_test_assert (test, !ret);
 
 	/************************************************************
@@ -436,7 +364,7 @@ egg_string_test (EggTest *test)
 	 ************************************************************/
 	egg_test_title (test, "replace start");
 	text_safe = egg_strreplace ("richard\nhughes", "r", "e");
-	if (egg_strequal (text_safe, "eichaed\nhughes"))
+	if (g_strcmp0 (text_safe, "eichaed\nhughes") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "failed the replace '%s'", text_safe);
@@ -445,7 +373,7 @@ egg_string_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "replace none");
 	text_safe = egg_strreplace ("richard\nhughes", "dave", "e");
-	if (egg_strequal (text_safe, "richard\nhughes"))
+	if (g_strcmp0 (text_safe, "richard\nhughes") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "failed the replace '%s'", text_safe);
@@ -454,7 +382,7 @@ egg_string_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "replace end");
 	text_safe = egg_strreplace ("richard\nhughes", "s", "e");
-	if (egg_strequal (text_safe, "richard\nhughee"))
+	if (g_strcmp0 (text_safe, "richard\nhughee") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "failed the replace '%s'", text_safe);
@@ -463,60 +391,13 @@ egg_string_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "replace unicode");
 	text_safe = egg_strreplace ("richard\n- hughes", "\n- ", "\n• ");
-	if (egg_strequal (text_safe, "richard\n• hughes"))
+	if (g_strcmp0 (text_safe, "richard\n• hughes") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "failed the replace '%s'", text_safe);
 	g_free (text_safe);
 
 	/************************************************************
-	 **************       Check for numbers      ****************
-	 ************************************************************/
-	egg_test_title (test, "check number valid");
-	ret = egg_strnumber ("123");
-	egg_test_assert (test, ret);
-
-	/************************************************************/
-	egg_test_title (test, "check number valid");
-	ret = egg_strnumber ("-123");
-	egg_test_assert (test, ret);
-
-	/************************************************************/
-	egg_test_title (test, "check number zero");
-	ret = egg_strnumber ("0");
-	egg_test_assert (test, ret);
-
-	/************************************************************/
-	egg_test_title (test, "check number oversize");
-	ret = egg_strnumber ("123456891234");
-	egg_test_assert (test, !ret);
-
-	/************************************************************/
-	egg_test_title (test, "check number NULL");
-	ret = egg_strnumber (NULL);
-	egg_test_assert (test, !ret);
-
-	/************************************************************/
-	egg_test_title (test, "check number blank");
-	ret = egg_strnumber ("");
-	egg_test_assert (test, !ret);
-
-	/************************************************************/
-	egg_test_title (test, "check number not negative");
-	ret = egg_strnumber ("503-");
-	egg_test_assert (test, !ret);
-
-	/************************************************************/
-	egg_test_title (test, "check number positive");
-	ret = egg_strnumber ("+503");
-	egg_test_assert (test, !ret);
-
-	/************************************************************/
-	egg_test_title (test, "check number random chars");
-	ret = egg_strnumber ("dave");
-	egg_test_assert (test, !ret);
-
-	/************************************************************
 	 **************        Convert numbers       ****************
 	 ************************************************************/
 	egg_test_title (test, "convert valid number");
diff --git a/lib/packagekit-glib/egg-string.h b/lib/packagekit-glib/egg-string.h
index 5414907..668a824 100644
--- a/lib/packagekit-glib/egg-string.h
+++ b/lib/packagekit-glib/egg-string.h
@@ -31,14 +31,9 @@ guint		 egg_strlen				(const gchar	*text,
 							 G_GNUC_WARN_UNUSED_RESULT;
 gboolean	 egg_strzero				(const gchar	*text)
 							 G_GNUC_WARN_UNUSED_RESULT;
-gboolean	 egg_strequal				(const gchar	*id1,
-							 const gchar	*id2)
-							 G_GNUC_WARN_UNUSED_RESULT;
 gboolean	 egg_strvequal				(gchar		**id1,
 							 gchar		**id2)
 							 G_GNUC_WARN_UNUSED_RESULT;
-gboolean	 egg_strnumber				(const gchar	*text)
-							 G_GNUC_WARN_UNUSED_RESULT;
 gboolean	 egg_strtoint				(const gchar	*text,
 							 gint		*value);
 gboolean	 egg_strtouint				(const gchar	*text,
diff --git a/lib/packagekit-glib/pk-bitfield.c b/lib/packagekit-glib/pk-bitfield.c
index 5e96c3d..347966e 100644
--- a/lib/packagekit-glib/pk-bitfield.c
+++ b/lib/packagekit-glib/pk-bitfield.c
@@ -336,7 +336,7 @@ pk_bitfield_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "check we can convert filter bitfield to text (none)");
 	text = pk_filter_bitfield_to_text (pk_bitfield_value (PK_FILTER_ENUM_NONE));
-	if (egg_strequal (text, "none"))
+	if (g_strcmp0 (text, "none") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "text was %s", text);
@@ -363,7 +363,7 @@ pk_bitfield_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "check we can convert filter bitfield to text (single)");
 	text = pk_filter_bitfield_to_text (pk_bitfield_value (PK_FILTER_ENUM_NOT_DEVELOPMENT));
-	if (egg_strequal (text, "~devel"))
+	if (g_strcmp0 (text, "~devel") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "text was %s", text);
@@ -374,7 +374,7 @@ pk_bitfield_test (EggTest *test)
 	text = pk_filter_bitfield_to_text (pk_bitfield_value (PK_FILTER_ENUM_NOT_DEVELOPMENT) |
 					   pk_bitfield_value (PK_FILTER_ENUM_GUI) |
 					   pk_bitfield_value (PK_FILTER_ENUM_NEWEST));
-	if (egg_strequal (text, "~devel;gui;newest"))
+	if (g_strcmp0 (text, "~devel;gui;newest") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "text was %s", text);
@@ -414,7 +414,7 @@ pk_bitfield_test (EggTest *test)
 	pk_bitfield_add (filter, PK_FILTER_ENUM_NOT_FREE);
 	pk_bitfield_remove (filter, PK_FILTER_ENUM_NOT_DEVELOPMENT);
 	text = pk_filter_bitfield_to_text (filter);
-	if (egg_strequal (text, "gui;~free;newest"))
+	if (g_strcmp0 (text, "gui;~free;newest") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "text was %s", text);
@@ -442,7 +442,7 @@ pk_bitfield_test (EggTest *test)
 	filter = pk_bitfield_value (PK_FILTER_ENUM_NOT_DEVELOPMENT);
 	pk_bitfield_remove (filter, PK_FILTER_ENUM_NOT_DEVELOPMENT);
 	text = pk_filter_bitfield_to_text (filter);
-	if (egg_strequal (text, "none"))
+	if (g_strcmp0 (text, "none") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "text was %s", text);
@@ -485,7 +485,7 @@ pk_bitfield_test (EggTest *test)
 	egg_test_title (test, "group bitfield to text (unknown)");
 	values = pk_bitfield_from_enums (PK_GROUP_ENUM_UNKNOWN, -1);
 	text = pk_group_bitfield_to_text (values);
-	if (egg_strequal (text, "unknown"))
+	if (g_strcmp0 (text, "unknown") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "returned bitfield text %s (%" PK_BITFIELD_FORMAT ")", text, values);
@@ -495,7 +495,7 @@ pk_bitfield_test (EggTest *test)
 	egg_test_title (test, "group bitfield to text (first and last)");
 	values = pk_bitfield_from_enums (PK_GROUP_ENUM_ACCESSIBILITY, PK_GROUP_ENUM_UNKNOWN, -1);
 	text = pk_group_bitfield_to_text (values);
-	if (egg_strequal (text, "accessibility;unknown"))
+	if (g_strcmp0 (text, "accessibility;unknown") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "returned bitfield text %s (%" PK_BITFIELD_FORMAT ")", text, values);
@@ -505,7 +505,7 @@ pk_bitfield_test (EggTest *test)
 	egg_test_title (test, "group bitfield to text (random)");
 	values = pk_bitfield_from_enums (PK_GROUP_ENUM_UNKNOWN, PK_GROUP_ENUM_REPOS, -1);
 	text = pk_group_bitfield_to_text (values);
-	if (egg_strequal (text, "repos;unknown"))
+	if (g_strcmp0 (text, "repos;unknown") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "returned bitfield text %s (%" PK_BITFIELD_FORMAT ")", text, values);
diff --git a/lib/packagekit-glib/pk-catalog.c b/lib/packagekit-glib/pk-catalog.c
index 9319b97..1c6f8aa 100644
--- a/lib/packagekit-glib/pk-catalog.c
+++ b/lib/packagekit-glib/pk-catalog.c
@@ -143,11 +143,11 @@ pk_catalog_process_type (PkCatalog *catalog)
 	pk_catalog_process_type_part (catalog, array, catalog->priv->distro_id);
 
 	/* find mode */
-	if (egg_strequal (catalog->priv->type, "InstallPackages")) {
+	if (g_strcmp0 (catalog->priv->type, "InstallPackages") == 0) {
 		mode = PK_CATALOG_PROGRESS_PACKAGES;
-	} else if (egg_strequal (catalog->priv->type, "InstallFiles")) {
+	} else if (g_strcmp0 (catalog->priv->type, "InstallFiles") == 0) {
 		mode = PK_CATALOG_PROGRESS_FILES;
-	} else if (egg_strequal (catalog->priv->type, "InstallProvides")) {
+	} else if (g_strcmp0 (catalog->priv->type, "InstallProvides") == 0) {
 		mode = PK_CATALOG_PROGRESS_PROVIDES;
 	}
 
diff --git a/lib/packagekit-glib/pk-client.c b/lib/packagekit-glib/pk-client.c
index d17bc81..76a3318 100644
--- a/lib/packagekit-glib/pk-client.c
+++ b/lib/packagekit-glib/pk-client.c
@@ -3408,7 +3408,7 @@ pk_client_install_files (PkClient *client, gboolean only_trusted, gchar **files_
 	for (i=0; i<length; i++) {
 		file = pk_resolve_local_path (files[i]);
 		/* only replace if different */
-		if (!egg_strequal (file, files[i])) {
+		if (g_strcmp0 (file, files[i]) != 0) {
 			egg_debug ("resolved %s to %s", files[i], file);
 			/* replace */
 			g_free (files[i]);
@@ -4949,7 +4949,7 @@ pk_client_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "test resolve /etc/hosts");
 	file = pk_resolve_local_path ("/etc/hosts");
-	if (file != NULL && egg_strequal (file, "/etc/hosts"))
+	if (file != NULL && g_strcmp0 (file, "/etc/hosts") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "got: %s", file);
@@ -4958,7 +4958,7 @@ pk_client_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "test resolve /etc/../etc/hosts");
 	file = pk_resolve_local_path ("/etc/../etc/hosts");
-	if (file != NULL && egg_strequal (file, "/etc/hosts"))
+	if (file != NULL && g_strcmp0 (file, "/etc/hosts") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "got: %s", file);
diff --git a/lib/packagekit-glib/pk-common.c b/lib/packagekit-glib/pk-common.c
index abf3580..2e737aa 100644
--- a/lib/packagekit-glib/pk-common.c
+++ b/lib/packagekit-glib/pk-common.c
@@ -585,7 +585,7 @@ pk_common_test (EggTest *test)
 	 ************************************************************/
 	egg_test_title (test, "va_list_to_argv single");
 	array = pk_va_list_to_argv_test ("richard", NULL);
-	if (egg_strequal (array[0], "richard") &&
+	if (g_strcmp0 (array[0], "richard") == 0 &&
 	    array[1] == NULL)
 		egg_test_success (test, NULL);
 	else
@@ -595,9 +595,9 @@ pk_common_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "va_list_to_argv triple");
 	array = pk_va_list_to_argv_test ("richard", "phillip", "hughes", NULL);
-	if (egg_strequal (array[0], "richard") &&
-	    egg_strequal (array[1], "phillip") &&
-	    egg_strequal (array[2], "hughes") &&
+	if (g_strcmp0 (array[0], "richard") == 0 &&
+	    g_strcmp0 (array[1], "phillip") == 0 &&
+	    g_strcmp0 (array[2], "hughes") == 0 &&
 	    array[3] == NULL)
 		egg_test_success (test, NULL);
 	else
@@ -636,7 +636,7 @@ pk_common_test (EggTest *test)
 	 ************************************************************/
 	egg_test_title (test, "test replace unsafe (okay)");
 	text_safe = pk_strsafe ("Richard Hughes");
-	if (egg_strequal (text_safe, "Richard Hughes"))
+	if (g_strcmp0 (text_safe, "Richard Hughes") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "failed the replace unsafe '%s'", text_safe);
@@ -645,7 +645,7 @@ pk_common_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "test replace UTF8 unsafe (okay)");
 	text_safe = pk_strsafe ("Gölas");
-	if (egg_strequal (text_safe, "Gölas"))
+	if (g_strcmp0 (text_safe, "Gölas") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "failed the replace unsafe '%s'", text_safe);
@@ -654,7 +654,7 @@ pk_common_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "test replace unsafe (one invalid)");
 	text_safe = pk_strsafe ("Richard\rHughes");
-	if (egg_strequal (text_safe, "Richard Hughes"))
+	if (g_strcmp0 (text_safe, "Richard Hughes") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "failed the replace unsafe '%s'", text_safe);
@@ -663,7 +663,7 @@ pk_common_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "test replace unsafe (multiple invalid)");
 	text_safe = pk_strsafe (" Richard\rHughes\f");
-	if (egg_strequal (text_safe, " Richard Hughes "))
+	if (g_strcmp0 (text_safe, " Richard Hughes ") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "failed the replace unsafe '%s'", text_safe);
diff --git a/lib/packagekit-glib/pk-desktop.c b/lib/packagekit-glib/pk-desktop.c
index 1d7f3a4..4785694 100644
--- a/lib/packagekit-glib/pk-desktop.c
+++ b/lib/packagekit-glib/pk-desktop.c
@@ -366,12 +366,12 @@ pk_desktop_test (EggTest *test)
 	package = pk_desktop_get_package_for_file (desktop, "/usr/share/applications/gpk-update-viewer.desktop", NULL);
 
 	/* dummy, not yum */
-	if (egg_strequal (package, "vips-doc")) {
+	if (g_strcmp0 (package, "vips-doc") == 0) {
 		egg_test_success (test, "created db with dummy, skipping remaining tests");
 		goto out;
 	}
 
-	if (egg_strequal (package, "gnome-packagekit"))
+	if (g_strcmp0 (package, "gnome-packagekit") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "package was: %s", package);
diff --git a/lib/packagekit-glib/pk-enum.c b/lib/packagekit-glib/pk-enum.c
index e9ab344..ba2f2bc 100644
--- a/lib/packagekit-glib/pk-enum.c
+++ b/lib/packagekit-glib/pk-enum.c
@@ -1018,7 +1018,7 @@ pk_enum_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "find string");
 	string = pk_enum_find_string (enum_role, PK_ROLE_ENUM_SEARCH_FILE);
-	if (egg_strequal (string, "search-file"))
+	if (g_strcmp0 (string, "search-file") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, NULL);
@@ -1034,7 +1034,7 @@ pk_enum_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "find string");
 	string = pk_role_enum_to_text (PK_ROLE_ENUM_SEARCH_FILE);
-	if (egg_strequal (string, "search-file"))
+	if (g_strcmp0 (string, "search-file") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, NULL);
diff --git a/lib/packagekit-glib/pk-package-id.c b/lib/packagekit-glib/pk-package-id.c
index f1259d8..384081a 100644
--- a/lib/packagekit-glib/pk-package-id.c
+++ b/lib/packagekit-glib/pk-package-id.c
@@ -324,10 +324,10 @@ pk_package_id_free (PkPackageId *id)
 static gboolean
 pk_arch_base_ix86 (const gchar *arch)
 {
-	if (egg_strequal (arch, "i386") ||
-	    egg_strequal (arch, "i486") ||
-	    egg_strequal (arch, "i586") ||
-	    egg_strequal (arch, "i686"))
+	if (g_strcmp0 (arch, "i386") == 0 ||
+	    g_strcmp0 (arch, "i486") == 0 ||
+	    g_strcmp0 (arch, "i586") == 0 ||
+	    g_strcmp0 (arch, "i686") == 0)
 		return TRUE;
 	return FALSE;
 }
@@ -344,7 +344,7 @@ pk_arch_base_ix86 (const gchar *arch)
 static gboolean
 pk_arch_fuzzy_equal (const gchar *arch1, const gchar *arch2)
 {
-	if (egg_strequal (arch1, arch2))
+	if (g_strcmp0 (arch1, arch2) == 0)
 		return TRUE;
 	if (pk_arch_base_ix86 (arch1) && pk_arch_base_ix86 (arch2))
 		return TRUE;
@@ -363,8 +363,8 @@ pk_arch_fuzzy_equal (const gchar *arch1, const gchar *arch2)
 gboolean
 pk_package_id_equal_fuzzy_arch (const PkPackageId *id1, const PkPackageId *id2)
 {
-	if (egg_strequal (id1->name, id2->name) &&
-	    egg_strequal (id1->version, id2->version) &&
+	if (g_strcmp0 (id1->name, id2->name) == 0 &&
+	    g_strcmp0 (id1->version, id2->version) == 0 &&
 	    pk_arch_fuzzy_equal (id1->arch, id2->arch))
 		return TRUE;
 	return FALSE;
@@ -382,9 +382,9 @@ pk_package_id_equal_fuzzy_arch (const PkPackageId *id1, const PkPackageId *id2)
 gboolean
 pk_package_id_equal (const PkPackageId *id1, const PkPackageId *id2)
 {
-	if (egg_strequal (id1->name, id2->name) &&
-	    egg_strequal (id1->version, id2->version) &&
-	    egg_strequal (id1->arch, id2->arch))
+	if (g_strcmp0 (id1->name, id2->name) == 0 &&
+	    g_strcmp0 (id1->version, id2->version) == 0 &&
+	    g_strcmp0 (id1->arch, id2->arch) == 0)
 		return TRUE;
 	return FALSE;
 }
@@ -419,7 +419,7 @@ pk_strcmp_sections (const gchar *id1, const gchar *id2, guint parts, guint compa
 		return FALSE;
 	}
 	if (compare == parts) {
-		return egg_strequal (id1, id2);
+		return (g_strcmp0 (id1, id2) == 0);
 	}
 
 	/* split, NULL will be returned if error */
@@ -438,7 +438,7 @@ pk_strcmp_sections (const gchar *id1, const gchar *id2, guint parts, guint compa
 
 	/* only compare preceeding sections */
 	for (i=0; i<compare; i++) {
-		if (egg_strequal (sections1[i], sections2[i]) == FALSE) {
+		if (g_strcmp0 (sections1[i], sections2[i]) != 0) {
 			goto out;
 		}
 	}
@@ -490,7 +490,7 @@ pk_package_id_test (EggTest *test)
 
 	egg_test_title (test, "id build valid");
 	text = pk_package_id_build ("moo", "0.0.1", "i386", "fedora");
-	if (egg_strequal (text, "moo;0.0.1;i386;fedora"))
+	if (g_strcmp0 (text, "moo;0.0.1;i386;fedora") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, NULL);
@@ -498,7 +498,7 @@ pk_package_id_test (EggTest *test)
 
 	egg_test_title (test, "id build partial");
 	text = pk_package_id_build ("moo", NULL, NULL, NULL);
-	if (egg_strequal (text, "moo;;;"))
+	if (g_strcmp0 (text, "moo;;;") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "got '%s', expected '%s'", text, "moo;;;");
@@ -545,10 +545,10 @@ pk_package_id_test (EggTest *test)
 	egg_test_title (test, "parse package_id from string");
 	id = pk_package_id_new_from_string ("moo;0.0.1;i386;fedora");
 	if (id != NULL &&
-	    egg_strequal (id->name, "moo") &&
-	    egg_strequal (id->arch, "i386") &&
-	    egg_strequal (id->data, "fedora") &&
-	    egg_strequal (id->version, "0.0.1"))
+	    g_strcmp0 (id->name, "moo") == 0 &&
+	    g_strcmp0 (id->arch, "i386") == 0 &&
+	    g_strcmp0 (id->data, "fedora") == 0 &&
+	    g_strcmp0 (id->version, "0.0.1") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, NULL);
@@ -564,7 +564,7 @@ pk_package_id_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "test id building with valid data");
 	text = pk_package_id_to_string (id2);
-	if (egg_strequal (text, "moo;0.0.1;i386;fedora"))
+	if (g_strcmp0 (text, "moo;0.0.1;i386;fedora") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "package_id is '%s'", text);
@@ -576,7 +576,7 @@ pk_package_id_test (EggTest *test)
 	egg_test_title (test, "test id building with partial data");
 	id = pk_package_id_new_from_string ("moo;;;");
 	text = pk_package_id_to_string (id);
-	if (egg_strequal (text, "moo;;;"))
+	if (g_strcmp0 (text, "moo;;;") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "package_id is '%s', should be '%s'", text, "moo;;;");
@@ -587,8 +587,8 @@ pk_package_id_test (EggTest *test)
 	egg_test_title (test, "parse short package_id from string");
 	id = pk_package_id_new_from_string ("moo;0.0.1;;");
 	if (id != NULL &&
-	    egg_strequal (id->name, "moo") &&
-	    egg_strequal (id->version, "0.0.1") &&
+	    (g_strcmp0 (id->name, "moo") == 0) &&
+	    (g_strcmp0 (id->version, "0.0.1") == 0) &&
 	    id->data == NULL &&
 	    id->arch == NULL)
 		egg_test_success (test, NULL);
@@ -630,7 +630,7 @@ pk_package_id_test (EggTest *test)
 	egg_test_title (test, "test pass 1");
 	array = pk_strsplit ("foo", 1);
 	if (array != NULL &&
-	    egg_strequal (array[0], "foo"))
+	    g_strcmp0 (array[0], "foo") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "got %s", array[0]);
@@ -640,8 +640,8 @@ pk_package_id_test (EggTest *test)
 	egg_test_title (test, "test pass 2");
 	array = pk_strsplit ("foo;moo", 2);
 	if (array != NULL &&
-	    egg_strequal (array[0], "foo") &&
-	    egg_strequal (array[1], "moo"))
+	    g_strcmp0 (array[0], "foo") == 0 &&
+	    g_strcmp0 (array[1], "moo") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "got %s, %s", array[0], array[1]);
@@ -651,9 +651,9 @@ pk_package_id_test (EggTest *test)
 	egg_test_title (test, "test pass 3");
 	array = pk_strsplit ("foo;moo;bar", 3);
 	if (array != NULL &&
-	    egg_strequal (array[0], "foo") &&
-	    egg_strequal (array[1], "moo") &&
-	    egg_strequal (array[2], "bar"))
+	    g_strcmp0 (array[0], "foo") == 0 &&
+	    g_strcmp0 (array[1], "moo") == 0 &&
+	    g_strcmp0 (array[2], "bar") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "got %s, %s, %s, %s", array[0], array[1], array[2], array[3]);
@@ -663,10 +663,10 @@ pk_package_id_test (EggTest *test)
 	egg_test_title (test, "test on real packageid");
 	array = pk_strsplit ("kde-i18n-csb;4:3.5.8~pre20071001-0ubuntu1;all;", 4);
 	if (array != NULL &&
-	    egg_strequal (array[0], "kde-i18n-csb") &&
-	    egg_strequal (array[1], "4:3.5.8~pre20071001-0ubuntu1") &&
-	    egg_strequal (array[2], "all") &&
-	    egg_strequal (array[3], ""))
+	    g_strcmp0 (array[0], "kde-i18n-csb") == 0 &&
+	    g_strcmp0 (array[1], "4:3.5.8~pre20071001-0ubuntu1") == 0 &&
+	    g_strcmp0 (array[2], "all") == 0 &&
+	    g_strcmp0 (array[3], "") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "got %s, %s, %s, %s", array[0], array[1], array[2], array[3]);
@@ -676,10 +676,10 @@ pk_package_id_test (EggTest *test)
 	egg_test_title (test, "test on short packageid");
 	array = pk_strsplit ("kde-i18n-csb;4:3.5.8~pre20071001-0ubuntu1;;", 4);
 	if (array != NULL &&
-	    egg_strequal (array[0], "kde-i18n-csb") &&
-	    egg_strequal (array[1], "4:3.5.8~pre20071001-0ubuntu1") &&
-	    egg_strequal (array[2], "") &&
-	    egg_strequal (array[3], ""))
+	    g_strcmp0 (array[0], "kde-i18n-csb") == 0 &&
+	    g_strcmp0 (array[1], "4:3.5.8~pre20071001-0ubuntu1") == 0 &&
+	    g_strcmp0 (array[2], "") == 0 &&
+	    g_strcmp0 (array[3], "") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "got %s, %s, %s, %s", array[0], array[1], array[2], array[3]);
diff --git a/lib/packagekit-glib/pk-package-list.c b/lib/packagekit-glib/pk-package-list.c
index 449ac31..c2fa9d7 100644
--- a/lib/packagekit-glib/pk-package-list.c
+++ b/lib/packagekit-glib/pk-package-list.c
@@ -419,7 +419,7 @@ pk_package_list_test (EggTest *test)
 	egg_test_title (test, "make sure argv is correct");
 	argv = pk_package_list_to_strv (plist);
 	if (argv != NULL &&
-	    egg_strequal (argv[0], "gnome;1.23;i386;data") &&
+	    g_strcmp0 (argv[0], "gnome;1.23;i386;data") == 0 &&
 	    argv[1] == NULL)
 		egg_test_success (test, NULL);
 	else
@@ -446,7 +446,7 @@ pk_package_list_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "add entry");
 	text = pk_obj_list_to_string (PK_OBJ_LIST(plist));
-	if (egg_strequal (text, "installed\tgnome;1.23;i386;data\tGNOME!"))
+	if (g_strcmp0 (text, "installed\tgnome;1.23;i386;data\tGNOME!") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "get string incorrect '%s'", text);
@@ -493,9 +493,9 @@ pk_package_list_test (EggTest *test)
 	r0_text = pk_package_id_to_string (r0->id);
 	r1_text = pk_package_id_to_string (r1->id);
 	r2_text = pk_package_id_to_string (r2->id);
-	if (egg_strequal (r0_text, "abc;1.23;i386;data") &&
-	    egg_strequal (r1_text, "def;1.23;i386;data") &&
-	    egg_strequal (r2_text, "ghi;1.23;i386;data"))
+	if (g_strcmp0 (r0_text, "abc;1.23;i386;data") == 0 &&
+	    g_strcmp0 (r1_text, "def;1.23;i386;data") == 0 &&
+	    g_strcmp0 (r2_text, "ghi;1.23;i386;data") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "could not sort: %s,%s,%s", r0_text, r1_text, r2_text);
@@ -509,9 +509,9 @@ pk_package_list_test (EggTest *test)
 	r0 = pk_package_list_get_obj (plist, 0);
 	r1 = pk_package_list_get_obj (plist, 1);
 	r2 = pk_package_list_get_obj (plist, 2);
-	if (egg_strequal (r0->summary, "aed") &&
-	    egg_strequal (r1->summary, "fed") &&
-	    egg_strequal (r2->summary, "zed"))
+	if (g_strcmp0 (r0->summary, "aed") == 0 &&
+	    g_strcmp0 (r1->summary, "fed") == 0 &&
+	    g_strcmp0 (r2->summary, "zed") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "could not sort: %s,%s,%s", r0->summary, r1->summary, r2->summary);
@@ -555,9 +555,9 @@ pk_package_list_test (EggTest *test)
 	r0_text = pk_package_id_to_string (r0->id);
 	r1_text = pk_package_id_to_string (r1->id);
 	r2_text = pk_package_id_to_string (r2->id);
-	if (egg_strequal (r0_text, "abc;1.23;i386;data") &&
-	    egg_strequal (r1_text, "def;1.23;i386;data") &&
-	    egg_strequal (r2_text, "ghi;1.23;i386;data"))
+	if (g_strcmp0 (r0_text, "abc;1.23;i386;data") == 0 &&
+	    g_strcmp0 (r1_text, "def;1.23;i386;data") == 0 &&
+	    g_strcmp0 (r2_text, "ghi;1.23;i386;data") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "could not sort: %s,%s,%s", r0_text, r1_text, r2_text);
diff --git a/lib/packagekit-glib/pk-package-obj.c b/lib/packagekit-glib/pk-package-obj.c
index e65e25b..3a963e8 100644
--- a/lib/packagekit-glib/pk-package-obj.c
+++ b/lib/packagekit-glib/pk-package-obj.c
@@ -267,7 +267,7 @@ pk_package_obj_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "check to string");
 	text = pk_package_obj_to_string (obj1);
-	if (egg_strequal (text, "installed\tgnome;1.23;i386;data\tGNOME!"))
+	if (g_strcmp0 (text, "installed\tgnome;1.23;i386;data\tGNOME!") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "got %s", text);
@@ -277,7 +277,7 @@ pk_package_obj_test (EggTest *test)
 	obj3 = pk_package_obj_from_string (text);
 	if (obj3->info == PK_INFO_ENUM_INSTALLED &&
 	    pk_package_id_equal (obj3->id, obj1->id) &&
-	    egg_strequal (obj3->summary, "GNOME!"))
+	    g_strcmp0 (obj3->summary, "GNOME!") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "got incorrect data %s,%s,%s",
diff --git a/lib/packagekit-glib/pk-service-pack.c b/lib/packagekit-glib/pk-service-pack.c
index 196314a..7156f94 100644
--- a/lib/packagekit-glib/pk-service-pack.c
+++ b/lib/packagekit-glib/pk-service-pack.c
@@ -150,7 +150,7 @@ pk_service_pack_check_metadata_file (const gchar *full_path, GError **error)
 	}
 
 	/* check the types we support */
-	if (!egg_strequal (type, "update") && !egg_strequal (type, "install")) {
+	if (g_strcmp0 (type, "update") != 0 && g_strcmp0 (type, "install") != 0) {
 		*error = g_error_new (1, 0, "does not have correct type key: %s", type);
 		ret = FALSE;
 		goto out;
@@ -160,7 +160,7 @@ pk_service_pack_check_metadata_file (const gchar *full_path, GError **error)
 	distro_id_us = pk_get_distro_id ();
 
 	/* do we match? */
-	ret = egg_strequal (distro_id_us, distro_id);
+	ret = (g_strcmp0 (distro_id_us, distro_id) == 0);
 	if (!ret)
 		*error = g_error_new (1, 0, "distro id did not match %s == %s", distro_id_us, distro_id);
 
@@ -366,7 +366,7 @@ pk_service_pack_check_valid (PkServicePack *pack, GError **error)
 	/* find the file, and check the metadata */
 	while ((filename_entry = g_dir_read_name (dir))) {
 		metafile = g_build_filename (directory, filename_entry, NULL);
-		if (egg_strequal (filename_entry, "metadata.conf")) {
+		if (g_strcmp0 (filename_entry, "metadata.conf") == 0) {
 			ret = pk_service_pack_check_metadata_file (metafile, &error_local);
 			if (!ret) {
 				*error = g_error_new (PK_SERVICE_PACK_ERROR, PK_SERVICE_PACK_ERROR_NOT_COMPATIBLE,
diff --git a/src/pk-backend-spawn.c b/src/pk-backend-spawn.c
index dffc2a8..8d463c2 100644
--- a/src/pk-backend-spawn.c
+++ b/src/pk-backend-spawn.c
@@ -98,7 +98,7 @@ pk_backend_spawn_set_filter_stderr (PkBackendSpawn *backend_spawn, PkBackendSpaw
  * If you are editing this function creating a new backend,
  * then you are probably doing something wrong.
  **/
-G_GNUC_WARN_UNUSED_RESULT static gboolean
+static gboolean
 pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
 {
 	gchar **sections;
@@ -133,7 +133,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
 	/* get size */
 	size = g_strv_length (sections);
 
-	if (egg_strequal (command, "package")) {
+	if (g_strcmp0 (command, "package") == 0) {
 		if (size != 4) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
@@ -152,7 +152,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
 			goto out;
 		}
 		pk_backend_package (backend_spawn->priv->backend, info, sections[2], sections[3]);
-	} else if (egg_strequal (command, "details")) {
+	} else if (g_strcmp0 (command, "details") == 0) {
 		if (size != 7) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
@@ -173,36 +173,36 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
 		pk_backend_details (backend_spawn->priv->backend, sections[1], sections[2],
 					group, text, sections[5], package_size);
 		g_free (text);
-	} else if (egg_strequal (command, "finished")) {
+	} else if (g_strcmp0 (command, "finished") == 0) {
 		if (size != 1) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
 			goto out;
 		}
 		pk_backend_finished (backend_spawn->priv->backend);
-	} else if (egg_strequal (command, "files")) {
+	} else if (g_strcmp0 (command, "files") == 0) {
 		if (size != 3) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
 			goto out;
 		}
 		pk_backend_files (backend_spawn->priv->backend, sections[1], sections[2]);
-	} else if (egg_strequal (command, "repo-detail")) {
+	} else if (g_strcmp0 (command, "repo-detail") == 0) {
 		if (size != 4) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
 			goto out;
 		}
-		if (egg_strequal (sections[3], "true")) {
+		if (g_strcmp0 (sections[3], "true") == 0) {
 			pk_backend_repo_detail (backend_spawn->priv->backend, sections[1], sections[2], TRUE);
-		} else if (egg_strequal (sections[3], "false")) {
+		} else if (g_strcmp0 (sections[3], "false") == 0) {
 			pk_backend_repo_detail (backend_spawn->priv->backend, sections[1], sections[2], FALSE);
 		} else {
 			egg_warning ("invalid qualifier '%s'", sections[3]);
 			ret = FALSE;
 			goto out;
 		}
-	} else if (egg_strequal (command, "updatedetail")) {
+	} else if (g_strcmp0 (command, "updatedetail") == 0) {
 		if (size != 13) {
 			egg_warning ("invalid command '%s', size %i", command, size);
 			ret = FALSE;
@@ -224,7 +224,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
 					  sections[5], sections[6], restart, sections[8],
 					  sections[9], update_state_enum,
 					  sections[11], sections[12]);
-	} else if (egg_strequal (command, "percentage")) {
+	} else if (g_strcmp0 (command, "percentage") == 0) {
 		if (size != 2) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
@@ -239,7 +239,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
 		} else {
 			pk_backend_set_percentage (backend_spawn->priv->backend, percentage);
 		}
-	} else if (egg_strequal (command, "subpercentage")) {
+	} else if (g_strcmp0 (command, "subpercentage") == 0) {
 		if (size != 2) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
@@ -254,7 +254,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
 		} else {
 			pk_backend_set_sub_percentage (backend_spawn->priv->backend, percentage);
 		}
-	} else if (egg_strequal (command, "error")) {
+	} else if (g_strcmp0 (command, "error") == 0) {
 		if (size != 3) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
@@ -278,7 +278,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
 
 		pk_backend_error_code (backend_spawn->priv->backend, error_enum, text);
 		g_free (text);
-	} else if (egg_strequal (command, "requirerestart")) {
+	} else if (g_strcmp0 (command, "requirerestart") == 0) {
 		if (size != 3) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
@@ -297,7 +297,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
 			goto out;
 		}
 		pk_backend_require_restart (backend_spawn->priv->backend, restart_enum, sections[2]);
-	} else if (egg_strequal (command, "message")) {
+	} else if (g_strcmp0 (command, "message") == 0) {
 		if (size != 3) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
@@ -315,14 +315,14 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
 		g_strdelimit (text, ";", '\n');
 		pk_backend_message (backend_spawn->priv->backend, message_enum, text);
 		g_free (text);
-	} else if (egg_strequal (command, "change-transaction-data")) {
+	} else if (g_strcmp0 (command, "change-transaction-data") == 0) {
 		if (size != 2) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
 			goto out;
 		}
 		pk_backend_set_transaction_data (backend_spawn->priv->backend, sections[1]);
-	} else if (egg_strequal (command, "status")) {
+	} else if (g_strcmp0 (command, "status") == 0) {
 		if (size != 2) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
@@ -336,29 +336,29 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
 			goto out;
 		}
 		pk_backend_set_status (backend_spawn->priv->backend, status_enum);
-	} else if (egg_strequal (command, "allow-cancel")) {
+	} else if (g_strcmp0 (command, "allow-cancel") == 0) {
 		if (size != 2) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
 			goto out;
 		}
-		if (egg_strequal (sections[1], "true")) {
+		if (g_strcmp0 (sections[1], "true") == 0) {
 			pk_backend_set_allow_cancel (backend_spawn->priv->backend, TRUE);
-		} else if (egg_strequal (sections[1], "false")) {
+		} else if (g_strcmp0 (sections[1], "false") == 0) {
 			pk_backend_set_allow_cancel (backend_spawn->priv->backend, FALSE);
 		} else {
 			egg_warning ("invalid section '%s'", sections[1]);
 			ret = FALSE;
 			goto out;
 		}
-	} else if (egg_strequal (command, "no-percentage-updates")) {
+	} else if (g_strcmp0 (command, "no-percentage-updates") == 0) {
 		if (size != 1) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
 			goto out;
 		}
 		pk_backend_set_percentage (backend_spawn->priv->backend, PK_BACKEND_PERCENTAGE_INVALID);
-	} else if (egg_strequal (command, "repo-signature-required")) {
+	} else if (g_strcmp0 (command, "repo-signature-required") == 0) {
 
 		if (size != 9) {
 			egg_warning ("invalid command'%s', size %i", command, size);
@@ -391,7 +391,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
 							  sections[2], sections[3], sections[4],
 							  sections[5], sections[6], sections[7], sig_type);
 		goto out;
-	} else if (egg_strequal (command, "media-change-required")) {
+	} else if (g_strcmp0 (command, "media-change-required") == 0) {
 
 		if (size != 4) {
 			egg_warning ("invalid command'%s', size %i", command, size);
@@ -409,7 +409,7 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
 
 		ret = pk_backend_media_change_required (backend_spawn->priv->backend, media_type_enum, sections[2], sections[3]);
 		goto out;
-	} else if (egg_strequal (command, "distro-upgrade")) {
+	} else if (g_strcmp0 (command, "distro-upgrade") == 0) {
 
 		if (size != 4) {
 			egg_warning ("invalid command'%s', size %i", command, size);
@@ -427,14 +427,14 @@ pk_backend_spawn_parse_stdout (PkBackendSpawn *backend_spawn, const gchar *line)
 
 		ret = pk_backend_distro_upgrade (backend_spawn->priv->backend, distro_upgrade_enum, sections[2], sections[3]);
 		goto out;
-	} else if (egg_strequal (command, "category")) {
+	} else if (g_strcmp0 (command, "category") == 0) {
 
 		if (size != 6) {
 			egg_warning ("invalid command'%s', size %i", command, size);
 			ret = FALSE;
 			goto out;
 		}
-		if (egg_strequal (sections[1], sections[2])) {
+		if (g_strcmp0 (sections[1], sections[2]) == 0) {
 			pk_backend_message (backend_spawn->priv->backend, PK_MESSAGE_ENUM_BACKEND_ERROR, "cat_id cannot be the same as parent_id");
 			ret = FALSE;
 			goto out;
@@ -961,7 +961,7 @@ pk_backend_test_spawn (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "get backend name");
 	text = pk_backend_spawn_get_name (backend_spawn);
-	if (egg_strequal(text, "test_spawn"))
+	if (g_strcmp0 (text, "test_spawn") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "invalid name %s", text);
diff --git a/src/pk-backend.c b/src/pk-backend.c
index 5f8d96c..b7dac22 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -2308,7 +2308,7 @@ pk_backend_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "get backend name");
 	text = pk_backend_get_name (backend);
-	if (egg_strequal(text, "dummy"))
+	if (g_strcmp0 (text, "dummy") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "invalid name %s", text);
diff --git a/src/pk-engine.c b/src/pk-engine.c
index 52aebcf..c1163ef 100644
--- a/src/pk-engine.c
+++ b/src/pk-engine.c
@@ -380,7 +380,7 @@ pk_engine_state_has_changed (PkEngine *engine, const gchar *reason, GError **err
 	}
 
 	/* don't bombard the user 10 seconds after resuming */
-	if (egg_strequal (reason, "resume"))
+	if (g_strcmp0 (reason, "resume") == 0)
 		is_priority = FALSE;
 
 	/* are we normal, and already scheduled normal? */
diff --git a/src/pk-network-stack-unix.c b/src/pk-network-stack-unix.c
index 5d5fd8f..c5bdfd0 100644
--- a/src/pk-network-stack-unix.c
+++ b/src/pk-network-stack-unix.c
@@ -79,11 +79,11 @@ pk_network_stack_unix_is_valid (const gchar *line)
 	}
 
 	/* is header? */
-	if (egg_strequal (sections[0], "Iface"))
+	if (g_strcmp0 (sections[0], "Iface") == 0)
 		goto out;
 
 	/* is loopback? */
-	if (egg_strequal (sections[0], "lo"))
+	if (g_strcmp0 (sections[0], "lo") == 0)
 		goto out;
 
 	/* is correct parameters? */
@@ -94,14 +94,14 @@ pk_network_stack_unix_is_valid (const gchar *line)
 	}
 
 	/* is destination zero (default route)? */
-	if (egg_strequal (sections[1], "00000000")) {
+	if (g_strcmp0 (sections[1], "00000000") == 0) {
 		egg_debug ("destination %s is valid", sections[0]);
 		online = TRUE;
 		goto out;
 	}
 
 	/* is gateway nonzero? */
-	if (!egg_strequal (sections[2], "00000000")) {
+	if (g_strcmp0 (sections[2], "00000000") != 0) {
 		egg_debug ("interface %s is valid", sections[0]);
 		online = TRUE;
 		goto out;
diff --git a/src/pk-spawn.c b/src/pk-spawn.c
index 968c742..a2472a8 100644
--- a/src/pk-spawn.c
+++ b/src/pk-spawn.c
@@ -473,7 +473,7 @@ pk_spawn_argv (PkSpawn *spawn, gchar **argv, gchar **envp)
 	 *  - argv[0] (executable name is the same)
 	 *  - all of envp are the same (proxy and locale settings) */
 	if (spawn->priv->stdin_fd != -1) {
-		if (!egg_strequal (spawn->priv->last_argv0, argv[0])) {
+		if (g_strcmp0 (spawn->priv->last_argv0, argv[0]) != 0) {
 			egg_debug ("argv did not match, not reusing");
 		} else if (!egg_strvequal (spawn->priv->last_envp, envp)) {
 			egg_debug ("envp did not match, not reusing");
diff --git a/src/pk-store.c b/src/pk-store.c
index a971cb7..f2b4a2e 100644
--- a/src/pk-store.c
+++ b/src/pk-store.c
@@ -418,7 +418,7 @@ pk_store_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "get a blank string");
 	data_string = pk_store_get_string (store, "dave2");
-	if (egg_strequal (data_string, ""))
+	if (g_strcmp0 (data_string, "") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "data was %s", data_string);
@@ -457,7 +457,7 @@ pk_store_test (EggTest *test)
 	/************************************************************/
 	egg_test_title (test, "get a string");
 	data_string = pk_store_get_string (store, "dave");
-	if (egg_strequal (data_string, "ania"))
+	if (g_strcmp0 (data_string, "ania") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "data was %s", data_string);
diff --git a/src/pk-transaction-db.c b/src/pk-transaction-db.c
index a1e515e..8d98d67 100644
--- a/src/pk-transaction-db.c
+++ b/src/pk-transaction-db.c
@@ -140,7 +140,7 @@ pk_transaction_sqlite_transaction_cb (void *data, gint argc, gchar **argv, gchar
 	for (i=0; i<argc; i++) {
 		col = col_name[i];
 		value = argv[i];
-		if (egg_strequal (col, "succeeded")) {
+		if (g_strcmp0 (col, "succeeded") == 0) {
 			ret = egg_strtouint (value, &temp);
 			if (!ret)
 				egg_warning ("failed to parse succeeded: %s", value);
@@ -152,26 +152,26 @@ pk_transaction_sqlite_transaction_cb (void *data, gint argc, gchar **argv, gchar
 				egg_warning ("item.succeeded %i! Resetting to 1", item.succeeded);
 				item.succeeded = 1;
 			}
-		} else if (egg_strequal (col, "role")) {
+		} else if (g_strcmp0 (col, "role") == 0) {
 			if (value != NULL)
 				item.role = pk_role_enum_from_text (value);
-		} else if (egg_strequal (col, "transaction_id")) {
+		} else if (g_strcmp0 (col, "transaction_id") == 0) {
 			if (value != NULL)
 				item.tid = g_strdup (value);
-		} else if (egg_strequal (col, "timespec")) {
+		} else if (g_strcmp0 (col, "timespec") == 0) {
 			if (value != NULL)
 				item.timespec = g_strdup (value);
-		} else if (egg_strequal (col, "cmdline")) {
+		} else if (g_strcmp0 (col, "cmdline") == 0) {
 			if (value != NULL)
 				item.cmdline = g_strdup (value);
-		} else if (egg_strequal (col, "data")) {
+		} else if (g_strcmp0 (col, "data") == 0) {
 			if (value != NULL)
 				item.data = g_strdup (value);
-		} else if (egg_strequal (col, "uid")) {
+		} else if (g_strcmp0 (col, "uid") == 0) {
 			ret = egg_strtouint (value, &temp);
 			if (ret)
 				item.uid = temp;
-		} else if (egg_strequal (col, "duration")) {
+		} else if (g_strcmp0 (col, "duration") == 0) {
 			ret = egg_strtouint (value, &item.duration);
 			if (!ret) {
 				egg_warning ("failed to parse duration: %s", value);
@@ -236,7 +236,7 @@ pk_time_action_sqlite_callback (void *data, gint argc, gchar **argv, gchar **col
 	for (i=0; i<argc; i++) {
 		col = col_name[i];
 		value = argv[i];
-		if (egg_strequal (col, "timespec"))
+		if (g_strcmp0 (col, "timespec") == 0)
 			*timespec = g_strdup (value);
 		else
 			egg_warning ("%s = %s\n", col, value);
@@ -594,10 +594,10 @@ pk_transaction_sqlite_proxy_cb (void *data, gint argc, gchar **argv, gchar **col
 	g_return_val_if_fail (item != NULL, 0);
 
 	for (i=0; i<argc; i++) {
-		if (egg_strequal (col_name[i], "proxy_http")) {
+		if (g_strcmp0 (col_name[i], "proxy_http") == 0) {
 			item->proxy_http = g_strdup (argv[i]);
 			item->set = TRUE;
-		} else if (egg_strequal (col_name[i], "proxy_ftp")) {
+		} else if (g_strcmp0 (col_name[i], "proxy_ftp") == 0) {
 			item->proxy_ftp = g_strdup (argv[i]);
 			item->set = TRUE;
 		} else {
diff --git a/src/pk-transaction-list.c b/src/pk-transaction-list.c
index e9975d0..66b2bc1 100644
--- a/src/pk-transaction-list.c
+++ b/src/pk-transaction-list.c
@@ -104,7 +104,7 @@ pk_transaction_list_get_from_tid (PkTransactionList *tlist, const gchar *tid)
 	for (i=0; i<array->len; i++) {
 		item = (PkTransactionItem *) g_ptr_array_index (array, i);
 		tmptid = pk_transaction_get_tid (item->transaction);
-		if (egg_strequal (tmptid, tid))
+		if (g_strcmp0 (tmptid, tid) == 0)
 			return item;
 	}
 	return NULL;
@@ -958,7 +958,7 @@ pk_transaction_list_test (EggTest *test)
 	egg_test_title (test, "make sure we get the right object back");
 	item = pk_transaction_list_get_from_tid (tlist, tid);
 	if (item != NULL &&
-	    egg_strequal (item->tid, tid) &&
+	    (g_strcmp0 (item->tid, tid) == 0) &&
 	    item->transaction != NULL)
 		egg_test_success (test, NULL);
 	else
@@ -1045,7 +1045,7 @@ pk_transaction_list_test (EggTest *test)
 	egg_test_title (test, "get from db");
 	item = pk_transaction_list_get_from_tid (tlist, tid);
 	if (item != NULL &&
-	    egg_strequal (item->tid, tid) &&
+	    (g_strcmp0 (item->tid, tid) == 0) &&
 	    item->transaction != NULL)
 		egg_test_success (test, NULL);
 	else
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 7dad87b..655749a 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -1911,7 +1911,7 @@ pk_transaction_verify_sender (PkTransaction *transaction, DBusGMethodInvocation
 
 	/* check is the same as the sender that did GetTid */
 	sender = dbus_g_method_get_sender (context);
-	ret = egg_strequal (transaction->priv->sender, sender);
+	ret = (g_strcmp0 (transaction->priv->sender, sender) == 0);
 	if (!ret) {
 		*error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_REFUSED_BY_POLICY,
 				      "sender does not match (%s vs %s)", sender, transaction->priv->sender);
@@ -4644,7 +4644,7 @@ egg_test_transaction (EggTest *test)
 #ifdef USE_SECURITY_POLKIT
 	egg_test_title (test, "map valid role to action");
 	action = pk_transaction_role_to_action_only_trusted (PK_ROLE_ENUM_UPDATE_PACKAGES);
-	if (egg_strequal (action, "org.freedesktop.packagekit.system-update"))
+	if (g_strcmp0 (action, "org.freedesktop.packagekit.system-update") == 0)
 		egg_test_success (test, NULL);
 	else
 		egg_test_failed (test, "did not get correct action '%s'", action);
commit db6a663f1734f4624f27f55879275edcf7250a39
Author: Richard Hughes <richard at hughsie.com>
Date:   Wed Jul 29 14:43:43 2009 +0100

    Fix a crash in the egg_strtouint() code when the text is NULL

diff --git a/lib/packagekit-glib/egg-string.c b/lib/packagekit-glib/egg-string.c
index e92526c..7eb7a09 100644
--- a/lib/packagekit-glib/egg-string.c
+++ b/lib/packagekit-glib/egg-string.c
@@ -97,6 +97,10 @@ egg_strtoint (const gchar *text, gint *value)
 	gchar *endptr = NULL;
 	gint64 value_raw;
 
+	/* invalid */
+	if (text == NULL)
+		return FALSE;
+
 	/* parse */
 	value_raw = g_ascii_strtoll (text, &endptr, 10);
 
@@ -128,6 +132,10 @@ egg_strtouint (const gchar *text, guint *value)
 	gchar *endptr = NULL;
 	guint64 value_raw;
 
+	/* invalid */
+	if (text == NULL)
+		return FALSE;
+
 	/* parse */
 	value_raw = g_ascii_strtoull (text, &endptr, 10);
 
@@ -535,6 +543,14 @@ egg_string_test (EggTest *test)
 		egg_test_failed (test, "value is %i", value);
 
 	/************************************************************/
+	egg_test_title (test, "convert NULL to a number");
+	ret = egg_strtouint (NULL, &uvalue);
+	if (!ret)
+		egg_test_success (test, NULL);
+	else
+		egg_test_failed (test, "value is %i", uvalue);
+
+	/************************************************************/
 	egg_test_title (test, "convert valid uint number");
 	ret = egg_strtouint ("234", &uvalue);
 	if (ret && uvalue == 234)


More information about the PackageKit-commit mailing list