[PackageKit-commit] packagekit: Branch 'master' - 14 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Thu Aug 28 01:20:38 PDT 2008
RELEASE | 14 -
backends/smart/helpers/Makefile.am | 4
backends/smart/helpers/download-packages.py | 22 ++
backends/smart/helpers/get-depends.py | 7
backends/smart/helpers/get-packages.py | 21 ++
backends/smart/helpers/get-requires.py | 22 ++
backends/smart/helpers/install-packages.py | 4
backends/smart/helpers/remove-packages.py | 4
backends/smart/helpers/search-group.py | 22 ++
backends/smart/helpers/smartBackend.py | 210 ++++++++++++++++++++++++----
backends/smart/helpers/update-packages.py | 4
backends/smart/pk-backend-smart.c | 137 +++++++++++++++---
backends/yum/helpers/yumBackend.py | 20 ++
client/pk-console.c | 21 +-
configure.ac | 2
docs/api/spec/pk-concepts.xml | 11 +
libpackagekit/pk-enum.c | 2
libpackagekit/pk-enum.h | 2
po/pl.po | 158 +++++++++++----------
po/pt_BR.po | 182 +++++++++++++-----------
20 files changed, 638 insertions(+), 231 deletions(-)
New commits:
commit dfacfb177b625f6fdd45524d8d388ca85ce2c37f
Author: Piotr DrÄ
g <piotrdrag at gmail.com>
Date: Thu Aug 28 08:08:55 2008 +0000
Updated Polish translation
Transmitted-via: Transifex (translate.fedoraproject.org)
diff --git a/po/pl.po b/po/pl.po
index 8444059..7384345 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -5,274 +5,288 @@ msgid ""
msgstr ""
"Project-Id-Version: pl\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-08-09 17:20+0000\n"
-"PO-Revision-Date: 2008-08-10 01:50+0200\n"
+"POT-Creation-Date: 2008-08-26 09:23+0000\n"
+"PO-Revision-Date: 2008-08-26 11:28+0200\n"
"Last-Translator: Piotr DrÄ
g <piotrdrag at gmail.com>\n"
"Language-Team: Polish <pl at li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../client/pk-console.c:220
+#: ../client/pk-console.c:235
msgid "Update detail"
msgstr "SzczegóÅy aktualizacji"
-#: ../client/pk-console.c:437
+#: ../client/pk-console.c:452
msgid "A system restart is required"
msgstr "Wymagane jest ponowne uruchomienie systemu"
-#: ../client/pk-console.c:439
+#: ../client/pk-console.c:454
msgid "A logout and login is required"
msgstr "Wymagane jest wylogowanie siÄ i ponowne zalogowanie"
-#: ../client/pk-console.c:441
+#: ../client/pk-console.c:456
msgid "An application restart is required"
msgstr "Wymagane jest ponowne uruchomienie aplikacji"
-#: ../client/pk-console.c:534 ../client/pk-generate-pack.c:115
+#: ../client/pk-console.c:549 ../client/pk-generate-pack.c:124
msgid "There are multiple package matches"
msgstr "Pasuje kilka pakietów"
#. find out what package the user wants to use
-#: ../client/pk-console.c:541 ../client/pk-generate-pack.c:122
+#: ../client/pk-console.c:556 ../client/pk-generate-pack.c:131
msgid "Please enter the package number: "
msgstr "ProszÄ podaÄ numer pakietu: "
-#: ../client/pk-console.c:575
+#: ../client/pk-console.c:590
msgid "Could not find package to install"
msgstr "Nie można znaleÅºÄ pakietu do zainstalowania"
-#: ../client/pk-console.c:679
+#: ../client/pk-console.c:696
msgid "Could not find package to remove"
msgstr "Nie można znaleÅºÄ pakietu do usuniÄcia"
-#: ../client/pk-console.c:740
+#: ../client/pk-console.c:757
msgid "The following packages have to be removed"
msgstr "NastÄpujÄ
ce pakiety muszÄ
zostaÄ usuniÄte"
#. get user input
-#: ../client/pk-console.c:747
+#: ../client/pk-console.c:764
msgid "Okay to remove additional packages?"
msgstr "UsunÄ
Ä dodatkowe pakiety?"
-#: ../client/pk-console.c:751 ../client/pk-generate-pack.c:356
-#: ../client/pk-generate-pack.c:487
+#: ../client/pk-console.c:768 ../client/pk-generate-pack.c:523
+#: ../client/pk-generate-pack-main.c:131
msgid "Cancelled!"
msgstr "Anulowano!"
-#: ../client/pk-console.c:785
-msgid "Could not find package to download:"
-msgstr "Nie można znaleÅºÄ pakietu do pobrania:"
+#: ../client/pk-console.c:802
+msgid "Could not find package to download"
+msgstr "Nie można znaleÅºÄ pakietu do pobrania"
-#: ../client/pk-console.c:836
+#: ../client/pk-console.c:853
msgid "Could not find package to update"
msgstr "Nie można znaleÅºÄ pakietu do zaktualizowania"
-#: ../client/pk-console.c:858
+#: ../client/pk-console.c:875
msgid "Could not find what packages require"
msgstr "Nie można znaleÅºÄ pakietów, które wymagajÄ
"
-#: ../client/pk-console.c:879
+#: ../client/pk-console.c:896
msgid "Could not get dependencies for"
msgstr "Nie można uzyskaÄ zależnoÅci dla"
-#: ../client/pk-console.c:900
+#: ../client/pk-console.c:917
msgid "Could not find details for"
msgstr "Nie można znaleÅºÄ szczegóÅów dla"
-#: ../client/pk-console.c:923
+#: ../client/pk-console.c:940
msgid "Could not find the files for this package"
msgstr "Nie można znaleÅºÄ plików tego pakietu"
-#: ../client/pk-console.c:930
+#: ../client/pk-console.c:947
msgid "Could not get the file list"
msgstr "Nie można uzyskaÄ listy plików"
-#: ../client/pk-console.c:949
+#: ../client/pk-console.c:966
msgid "Could not find the update details for"
msgstr "Nie można znaleÅºÄ szczegóÅów aktualizacji dla"
-#: ../client/pk-console.c:1010
+#: ../client/pk-console.c:1027
msgid "Package description"
msgstr "Opis pakietu"
-#: ../client/pk-console.c:1033
+#: ../client/pk-console.c:1060
msgid "Package files"
msgstr "Pliki pakietu"
-#: ../client/pk-console.c:1041
+#: ../client/pk-console.c:1068
msgid "No files"
msgstr "Brak plików"
#. get user input
-#: ../client/pk-console.c:1073
+#: ../client/pk-console.c:1100
msgid "Okay to import key?"
msgstr "ZaimportowaÄ klucz?"
-#: ../client/pk-console.c:1076
+#: ../client/pk-console.c:1103
msgid "Did not import key"
msgstr "Nie zaimportowano klucza"
#. get user input
-#: ../client/pk-console.c:1116
+#: ../client/pk-console.c:1143
msgid "Do you agree?"
msgstr "Zgadzasz siÄ?"
-#: ../client/pk-console.c:1119
+#: ../client/pk-console.c:1146
msgid "Did not agree to licence, task will fail"
msgstr "Nie zaakceptowano licencji, zadanie nie powiedzie siÄ"
-#: ../client/pk-console.c:1148
+#: ../client/pk-console.c:1175
msgid "The daemon crashed mid-transaction!"
msgstr "Demon zawiesiÅ siÄ w poÅowie transakcji!"
#. header
-#: ../client/pk-console.c:1201
+#: ../client/pk-console.c:1228
msgid "PackageKit Console Interface"
msgstr "Interfejs konsoli PackageKit"
-#: ../client/pk-console.c:1201
+#: ../client/pk-console.c:1228
msgid "Subcommands:"
msgstr "Podpolecenia:"
-#: ../client/pk-console.c:1309 ../client/pk-generate-pack.c:420
+#: ../client/pk-console.c:1338 ../client/pk-generate-pack-main.c:64
#: ../client/pk-monitor.c:104 ../src/pk-main.c:189
msgid "Show extra debugging information"
msgstr "WyÅwietla dodatkowe informacje o debugowaniu"
-#: ../client/pk-console.c:1311 ../client/pk-monitor.c:106
+#: ../client/pk-console.c:1340 ../client/pk-monitor.c:106
msgid "Show the program version and exit"
msgstr "WyÅwietla wersjÄ programu i wyÅÄ
cza"
-#: ../client/pk-console.c:1313
+#: ../client/pk-console.c:1342
msgid "Set the filter, e.g. installed"
msgstr "Ustawia filtr, np. zainstalowane"
-#: ../client/pk-console.c:1315
+#: ../client/pk-console.c:1344
msgid "Exit without waiting for actions to complete"
msgstr "WyÅÄ
cza bez oczekiwania na zakoÅczenie dziaÅaÅ"
-#: ../client/pk-console.c:1338
+#: ../client/pk-console.c:1367
msgid "Could not connect to system DBUS."
msgstr "Nie można poÅÄ
czyÄ siÄ z systemowym D-Bus."
-#: ../client/pk-console.c:1432
+#: ../client/pk-console.c:1464
msgid "You need to specify a search type, e.g. name"
msgstr "Należy podaÄ typ wyszukiwania, np. po nazwie"
-#: ../client/pk-console.c:1437 ../client/pk-console.c:1444
-#: ../client/pk-console.c:1451 ../client/pk-console.c:1458
-#: ../client/pk-console.c:1564 ../client/pk-console.c:1571
-#: ../client/pk-console.c:1578 ../client/pk-console.c:1585
+#: ../client/pk-console.c:1469 ../client/pk-console.c:1476
+#: ../client/pk-console.c:1483 ../client/pk-console.c:1490
+#: ../client/pk-console.c:1601 ../client/pk-console.c:1611
+#: ../client/pk-console.c:1618 ../client/pk-console.c:1625
msgid "You need to specify a search term"
msgstr "Należy podaÄ termin wyszukiwania"
-#: ../client/pk-console.c:1463
+#: ../client/pk-console.c:1495
msgid "Invalid search type"
msgstr "NieprawidÅowy typ wyszukiwania"
-#: ../client/pk-console.c:1468
+#: ../client/pk-console.c:1500
msgid "You need to specify a package or file to install"
msgstr "Należy podaÄ pakiet lub plik do zainstalowania"
-#: ../client/pk-console.c:1475
+#: ../client/pk-console.c:1507
msgid "You need to specify a type, key_id and package_id"
msgstr "Należy podaÄ typ, key_id i package_id"
-#: ../client/pk-console.c:1482
+#: ../client/pk-console.c:1514
msgid "You need to specify a package to remove"
msgstr "Należy podaÄ pakiet do usuniÄcia"
-#: ../client/pk-console.c:1488
+#: ../client/pk-console.c:1520
msgid ""
-"You need to specify the package to download and the destination directory"
-msgstr "Należy podaÄ pakiet do pobrania i katalog docelowy"
+"You need to specify the destination directory and then the packages to "
+"download"
+msgstr "Należy podaÄ katalog docelowy, a nastÄpnie pakiety do pobrania"
-#: ../client/pk-console.c:1494
+#: ../client/pk-console.c:1525
+msgid "Directory not found"
+msgstr "Nie znaleziono katalogu"
+
+#: ../client/pk-console.c:1531
msgid "You need to specify a eula-id"
msgstr "Należy podaÄ eula-id"
-#: ../client/pk-console.c:1510
+#: ../client/pk-console.c:1547
msgid "You need to specify a package name to resolve"
msgstr "Należy podaÄ nazwÄ pakietu do rozwiÄ
zania"
-#: ../client/pk-console.c:1519 ../client/pk-console.c:1526
+#: ../client/pk-console.c:1556 ../client/pk-console.c:1563
msgid "You need to specify a repo name"
msgstr "Należy podaÄ nazwÄ repozytorium"
-#: ../client/pk-console.c:1533
+#: ../client/pk-console.c:1570
msgid "You need to specify a repo name/parameter and value"
msgstr "Należy podaÄ nazwÄ/parametr repozytorium i wartoÅÄ"
-#: ../client/pk-console.c:1546
+#: ../client/pk-console.c:1583
msgid "You need to specify a time term"
msgstr "Należy podaÄ termin czasu"
-#: ../client/pk-console.c:1551
+#: ../client/pk-console.c:1588
msgid "You need to specify a correct role"
msgstr "Należy podaÄ poprawnÄ
rolÄ"
-#: ../client/pk-console.c:1556
+#: ../client/pk-console.c:1593
msgid "Failed to get last time"
msgstr "Uzyskanie ostatniego czasu nie powiodÅo siÄ"
-#: ../client/pk-console.c:1592
+#: ../client/pk-console.c:1632
msgid "You need to specify a package to find the details for"
msgstr "Należy podaÄ pakiet do znalezienia szczegóÅów dla"
-#: ../client/pk-console.c:1599
+#: ../client/pk-console.c:1639
msgid "You need to specify a package to find the files for"
msgstr "Należy podaÄ pakiet do znalezienia plików dla"
-#: ../client/pk-console.c:1648
+#: ../client/pk-console.c:1688
#, c-format
msgid "Option '%s' not supported"
msgstr "Opcja \"%s\" nie jest obsÅugiwana"
-#: ../client/pk-console.c:1661
+#: ../client/pk-console.c:1701
msgid "You don't have the necessary privileges for this operation"
msgstr "Nie posiadasz niezbÄdnych uprawnieÅ dla tej operacji"
-#: ../client/pk-console.c:1663
+#: ../client/pk-console.c:1703
msgid "Command failed"
msgstr "Polecenie nie powiodÅo siÄ"
-#: ../client/pk-generate-pack.c:106
+#: ../client/pk-generate-pack.c:115
msgid "Could not find a package match"
msgstr "Nie można znaleÅºÄ pasujÄ
cego pakietu"
+#: ../client/pk-generate-pack.c:149
+msgid "failed to download: invalid package_id and/or directory"
+msgstr "pobranie nie powiodÅo siÄ: nieprawidÅowe package_id i/lub katalog"
+
+#: ../client/pk-generate-pack.c:230
+msgid "Could not find a valid metadata file"
+msgstr "Nie można znaleÅºÄ prawidÅowego pliku metadanych"
+
#. get user input
-#: ../client/pk-generate-pack.c:352
+#: ../client/pk-generate-pack.c:519
msgid "Okay to download the additional packages"
msgstr "PobraÄ dodatkowe pakiety?"
-#: ../client/pk-generate-pack.c:422
+#: ../client/pk-generate-pack-main.c:66
msgid ""
"Set the path of the file with the list of packages/dependencies to be "
"excluded"
msgstr ""
"ProszÄ ustawiÄ ÅcieżkÄ pliku z listÄ
pakietów/zależnoÅci do wykluczenia"
-#: ../client/pk-generate-pack.c:467
+#: ../client/pk-generate-pack-main.c:111
msgid "You need to specify the pack name and packages to be packed\n"
msgstr "Należy podaÄ nazwÄ pakietu serwisowego i pakiety do zapakowania\n"
-#: ../client/pk-generate-pack.c:473
+#: ../client/pk-generate-pack-main.c:117
msgid ""
-"Invalid name for the service pack, Specify a name with .pack extension\n"
+"Invalid name for the service pack, Specify a name with .servicepack "
+"extension\n"
msgstr ""
"NieprawidÅowa nazwa pakietu serwisowego. ProszÄ podaÄ nazwÄ z rozszerzeniem ."
"pack\n"
-#: ../client/pk-generate-pack.c:485
+#: ../client/pk-generate-pack-main.c:129
msgid "A pack with the same name already exists, do you want to overwrite it?"
msgstr "Pakiet serwisowy o tej samej nazwie już istnieje, zastÄ
piÄ go?"
-#: ../client/pk-generate-pack.c:498
+#: ../client/pk-generate-pack-main.c:142
msgid "Failed to create directory"
msgstr "Utworzenie katalogu nie powiodÅo siÄ"
-#: ../client/pk-generate-pack.c:505
+#: ../client/pk-generate-pack-main.c:149
msgid "Failed to create pack"
msgstr "Utworzenie pakietu serwisowego nie powiodÅo siÄ"
commit 3f8e544ca5ac46e5e76bf1dc889b5f6d7c784cf6
Merge: 0165445... ad98389...
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date: Thu Aug 28 09:31:40 2008 +0200
Merge branch 'master' of git+ssh://afb@git.packagekit.org/srv/git/PackageKit
commit 0165445715a13aae3be50970d09ea90fa801ef3a
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date: Thu Aug 28 09:20:55 2008 +0200
smart: add get_requires
diff --git a/backends/smart/helpers/Makefile.am b/backends/smart/helpers/Makefile.am
index 7fa93c1..cdfbca3 100644
--- a/backends/smart/helpers/Makefile.am
+++ b/backends/smart/helpers/Makefile.am
@@ -9,6 +9,7 @@ dist_helper_DATA = \
get-files.py \
get-repo-list.py \
get-packages.py \
+ get-requires.py \
get-updates.py \
install-files.py \
install-packages.py \
diff --git a/backends/smart/helpers/get-depends.py b/backends/smart/helpers/get-depends.py
index 635b1a1..64843cf 100755
--- a/backends/smart/helpers/get-depends.py
+++ b/backends/smart/helpers/get-depends.py
@@ -13,7 +13,10 @@
import sys
from smartBackend import PackageKitSmartBackend
-package = sys.argv[1]
+filters = sys.argv[1]
+package = sys.argv[2]
+recursive = sys.argv[3]
+
backend = PackageKitSmartBackend(sys.argv[1:])
-backend.get_depends(package.split('|'))
+backend.get_depends(filters, package.split('|'), recursive)
sys.exit(0)
diff --git a/backends/smart/helpers/get-requires.py b/backends/smart/helpers/get-requires.py
new file mode 100755
index 0000000..bb24cdf
--- /dev/null
+++ b/backends/smart/helpers/get-requires.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2007 Richard Hughes <richard at hughsie.com>
+# Copyright (C) 2007 James Bowes <jbowes at dangerouslyinc.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.
+
+import sys
+
+from smartBackend import PackageKitSmartBackend
+filters = sys.argv[1]
+package = sys.argv[2]
+recursive = sys.argv[3]
+
+backend = PackageKitSmartBackend(sys.argv[1:])
+backend.get_requires(filters, package.split('|'), recursive)
+sys.exit(0)
diff --git a/backends/smart/helpers/smartBackend.py b/backends/smart/helpers/smartBackend.py
index cfb6b81..9b4e2cf 100644
--- a/backends/smart/helpers/smartBackend.py
+++ b/backends/smart/helpers/smartBackend.py
@@ -366,8 +366,17 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
self.files(packageid, ";".join(paths))
+ def _text_to_boolean(self,text):
+ if text == 'true' or text == 'TRUE':
+ return True
+ elif text == 'yes' or text == 'YES':
+ return True
+ return False
+
@needs_cache
- def get_depends(self, packageids):
+ def get_depends(self, filters, packageids, recursive_text):
+ # FIXME: use filters
+ recursive = self._text_to_boolean(recursive_text)
for packageid in packageids:
ratio, results, suggestions = self._search_packageid(packageid)
@@ -388,6 +397,34 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
for package in providers.keys():
self._show_package(package)
+ @needs_cache
+ def get_requires(self, filters, packageids, recursive_text):
+ # FIXME: use filters
+ recursive = self._text_to_boolean(recursive_text)
+ for packageid in packageids:
+ ratio, results, suggestions = self._search_packageid(packageid)
+
+ packages = self._process_search_results(results)
+
+ if len(packages) != 1:
+ return
+
+ package = packages[0]
+
+ providers = {}
+ def addproviders(package):
+ for required in package.requires:
+ for provider in self.ctrl.getCache().getProvides(str(required)):
+ for package in provider.packages:
+ if not providers.has_key(package):
+ providers[package] = True
+ if recursive:
+ addproviders(package)
+ addproviders(package)
+
+ for package in providers.keys():
+ self._show_package(package)
+
def get_repo_list(self, filters):
channels = smart.sysconf.get("channels", ())
for alias in channels:
diff --git a/backends/smart/pk-backend-smart.c b/backends/smart/pk-backend-smart.c
index a6f0d54..f9bd8e0 100644
--- a/backends/smart/pk-backend-smart.c
+++ b/backends/smart/pk-backend-smart.c
@@ -92,6 +92,18 @@ backend_get_filters (PkBackend *backend)
}
/**
+ * pk_backend_bool_to_text:
+ */
+static const gchar *
+pk_backend_bool_to_text (gboolean value)
+{
+ if (value == TRUE) {
+ return "yes";
+ }
+ return "no";
+}
+
+/**
* backend_download_packages:
*/
static void
@@ -111,12 +123,11 @@ backend_download_packages (PkBackend *backend, gchar **package_ids, const gchar
static void
backend_get_depends (PkBackend *backend, PkBitfield filters, gchar **package_ids, gboolean recursive)
{
- gchar *filters_text;
gchar *package_ids_temp;
- /* FIXME: Use recursive and filter here */
- filters_text = pk_filter_bitfield_to_text (filters);
package_ids_temp = pk_package_ids_to_text (package_ids, "|");
- pk_backend_spawn_helper (spawn, "get-depends.py", package_ids_temp, NULL);
+ gchar *filters_text;
+ filters_text = pk_filter_bitfield_to_text (filters);
+ pk_backend_spawn_helper (spawn, "get-depends.py", filters_text, package_ids_temp, pk_backend_bool_to_text (recursive), NULL);
g_free (filters_text);
g_free (package_ids_temp);
}
@@ -146,6 +157,21 @@ backend_get_files (PkBackend *backend, gchar **package_ids)
}
/**
+ * backend_get_requires:
+ */
+static void
+backend_get_requires (PkBackend *backend, PkBitfield filters, gchar **package_ids, gboolean recursive)
+{
+ gchar *package_ids_temp;
+ package_ids_temp = pk_package_ids_to_text (package_ids, "|");
+ gchar *filters_text;
+ filters_text = pk_filter_bitfield_to_text (filters);
+ pk_backend_spawn_helper (spawn, "get-requires.py", filters_text, package_ids_temp, pk_backend_bool_to_text (recursive), NULL);
+ g_free (filters_text);
+ g_free (package_ids_temp);
+}
+
+/**
* backend_get_updates:
*/
static void
@@ -191,18 +217,6 @@ backend_install_packages (PkBackend *backend, gchar **package_ids)
}
/**
- * pk_backend_bool_to_text:
- */
-static const gchar *
-pk_backend_bool_to_text (gboolean value)
-{
- if (value == TRUE) {
- return "yes";
- }
- return "no";
-}
-
-/**
* backend_install_files:
*/
static void
@@ -369,7 +383,7 @@ PK_BACKEND_OPTIONS (
backend_get_files, /* get_files */
backend_get_packages, /* get_packages */
backend_get_repo_list, /* get_repo_list */
- NULL, /* get_requires */
+ backend_get_requires, /* get_requires */
NULL, /* get_update_detail */
backend_get_updates, /* get_updates */
backend_install_files, /* install_files */
commit ad98389b55e35b0cff2b7953134c9630a4b395e4
Author: Igor Pires Soares <igorsoares at gmail.com>
Date: Thu Aug 28 04:07:06 2008 +0000
Updated Brazilian Portuguese translation
Transmitted-via: Transifex (translate.fedoraproject.org)
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 7be8e0e..2d5b080 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -2,14 +2,14 @@
# Copyright (C) 2008 Free Software Foundation, Inc.
# This file is distributed under the same license as the packagekit package.
#
-# Igor Pires Soares <igor at projetofedora.org>, 2008
+# Igor Pires Soares <igor at projetofedora.org>, 2008.
#
msgid ""
msgstr ""
"Project-Id-Version: PackageKit\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-08-08 09:21+0000\n"
-"PO-Revision-Date: 2008-08-14 00:42-0300\n"
+"POT-Creation-Date: 2008-08-28 01:24+0000\n"
+"PO-Revision-Date: 2008-08-28 01:05-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"
@@ -19,270 +19,282 @@ msgstr ""
"X-Poedit-Language: Portuguese\n"
"X-Poedit-Country: BRAZIL\n"
-#: ../client/pk-console.c:220
+#: ../client/pk-console.c:235
msgid "Update detail"
msgstr "Detalhe da atualização"
-#: ../client/pk-console.c:437
+#: ../client/pk-console.c:452
msgid "A system restart is required"
msgstr "à necessário reiniciar o sistema"
-#: ../client/pk-console.c:439
+#: ../client/pk-console.c:454
msgid "A logout and login is required"
msgstr "à necessário sair da sessão e autenticar novamente"
-#: ../client/pk-console.c:441
+#: ../client/pk-console.c:456
msgid "An application restart is required"
msgstr "à necessário reiniciar a aplicação"
-#: ../client/pk-console.c:534
-#: ../client/pk-generate-pack.c:115
+#: ../client/pk-console.c:549
+#: ../client/pk-generate-pack.c:124
msgid "There are multiple package matches"
msgstr "Há múltiplos pacotes correspondentes"
#. find out what package the user wants to use
-#: ../client/pk-console.c:541
-#: ../client/pk-generate-pack.c:122
+#: ../client/pk-console.c:556
+#: ../client/pk-generate-pack.c:131
msgid "Please enter the package number: "
msgstr "Por favor, insira o número do pacote: "
-#: ../client/pk-console.c:575
+#: ../client/pk-console.c:590
msgid "Could not find package to install"
msgstr "Não foi possÃvel localizar o pacote a ser instalado"
-#: ../client/pk-console.c:679
+#: ../client/pk-console.c:696
msgid "Could not find package to remove"
msgstr "Não foi possÃvel localizar o pacote a ser removido"
-#: ../client/pk-console.c:740
+#: ../client/pk-console.c:757
msgid "The following packages have to be removed"
msgstr "Os seguintes pacotes têm que ser removidos"
#. get user input
-#: ../client/pk-console.c:747
+#: ../client/pk-console.c:764
msgid "Okay to remove additional packages?"
msgstr "Os pacotes adicionais podem ser removidos?"
-#: ../client/pk-console.c:751
-#: ../client/pk-generate-pack.c:356
-#: ../client/pk-generate-pack.c:487
+#: ../client/pk-console.c:768
+#: ../client/pk-generate-pack.c:523
+#: ../client/pk-generate-pack-main.c:131
msgid "Cancelled!"
msgstr "Cancelado!"
-#: ../client/pk-console.c:785
-msgid "Could not find package to download:"
-msgstr "Não foi possÃvel localizar o pacote a ser baixado:"
+#: ../client/pk-console.c:802
+msgid "Could not find package to download"
+msgstr "Não foi possÃvel localizar um pacote a ser baixado"
-#: ../client/pk-console.c:836
+#: ../client/pk-console.c:853
msgid "Could not find package to update"
msgstr "Não foi possÃvel localizar o pacote a ser atualizado"
-#: ../client/pk-console.c:858
+#: ../client/pk-console.c:875
msgid "Could not find what packages require"
msgstr "Não foi possÃvel localizar quais pacotes necessitam desse pacote"
-#: ../client/pk-console.c:879
+#: ../client/pk-console.c:896
msgid "Could not get dependencies for"
msgstr "Não foi possÃvel obter as dependências para"
-#: ../client/pk-console.c:900
+#: ../client/pk-console.c:917
msgid "Could not find details for"
msgstr "Não foi possÃvel localizar os detalhes para"
-#: ../client/pk-console.c:923
+#: ../client/pk-console.c:940
msgid "Could not find the files for this package"
msgstr "Não foi possÃvel encontrar os arquivos para este pacote"
-#: ../client/pk-console.c:930
+#: ../client/pk-console.c:947
msgid "Could not get the file list"
msgstr "Não foi possÃvel obter a lista de arquivos"
-#: ../client/pk-console.c:949
+#: ../client/pk-console.c:966
msgid "Could not find the update details for"
msgstr "Não foi possÃvel localizar os detalhes de atualização para"
-#: ../client/pk-console.c:1010
+#: ../client/pk-console.c:1027
msgid "Package description"
msgstr "Descrição do pacote"
-#: ../client/pk-console.c:1033
+#: ../client/pk-console.c:1060
msgid "Package files"
msgstr "Arquivos do pacote"
-#: ../client/pk-console.c:1041
+#: ../client/pk-console.c:1068
msgid "No files"
msgstr "Nenhum arquivo"
#. get user input
-#: ../client/pk-console.c:1073
+#: ../client/pk-console.c:1100
msgid "Okay to import key?"
msgstr "A chave pode ser importada?"
-#: ../client/pk-console.c:1076
+#: ../client/pk-console.c:1103
msgid "Did not import key"
msgstr "Não importar a chave"
#. get user input
-#: ../client/pk-console.c:1116
+#: ../client/pk-console.c:1143
msgid "Do you agree?"
msgstr "Você concorda?"
-#: ../client/pk-console.c:1119
+#: ../client/pk-console.c:1146
msgid "Did not agree to licence, task will fail"
msgstr "Se você não concordar com a licença a tarefa irá falhar"
-#: ../client/pk-console.c:1148
+#: ../client/pk-console.c:1175
msgid "The daemon crashed mid-transaction!"
msgstr "O daemon travou no meio da transação!"
#. header
-#: ../client/pk-console.c:1201
+#: ../client/pk-console.c:1228
msgid "PackageKit Console Interface"
msgstr "Interface em Console do PackageKit"
-#: ../client/pk-console.c:1201
+#: ../client/pk-console.c:1228
msgid "Subcommands:"
msgstr "Subcomandos:"
-#: ../client/pk-console.c:1309
-#: ../client/pk-generate-pack.c:420
+#: ../client/pk-console.c:1338
+#: ../client/pk-generate-pack-main.c:64
#: ../client/pk-monitor.c:104
#: ../src/pk-main.c:189
msgid "Show extra debugging information"
msgstr "Mostrar informações extras de depuração"
-#: ../client/pk-console.c:1311
+#: ../client/pk-console.c:1340
#: ../client/pk-monitor.c:106
msgid "Show the program version and exit"
msgstr "Mostrar a versão do programa e sair"
-#: ../client/pk-console.c:1313
+#: ../client/pk-console.c:1342
msgid "Set the filter, e.g. installed"
msgstr "Definir o filtro, p. ex.: instalados"
-#: ../client/pk-console.c:1315
+#: ../client/pk-console.c:1344
msgid "Exit without waiting for actions to complete"
msgstr "Sair sem esperar pelo término das ações"
-#: ../client/pk-console.c:1338
+#: ../client/pk-console.c:1367
msgid "Could not connect to system DBUS."
msgstr "Não foi possÃvel conectar ao DBUS do sistema."
-#: ../client/pk-console.c:1432
+#: ../client/pk-console.c:1464
msgid "You need to specify a search type, e.g. name"
msgstr "Você precisa especificar um tipo de pesquisa, p. ex. nome"
-#: ../client/pk-console.c:1437
-#: ../client/pk-console.c:1444
-#: ../client/pk-console.c:1451
-#: ../client/pk-console.c:1458
-#: ../client/pk-console.c:1564
-#: ../client/pk-console.c:1571
-#: ../client/pk-console.c:1578
-#: ../client/pk-console.c:1585
+#: ../client/pk-console.c:1469
+#: ../client/pk-console.c:1476
+#: ../client/pk-console.c:1483
+#: ../client/pk-console.c:1490
+#: ../client/pk-console.c:1601
+#: ../client/pk-console.c:1611
+#: ../client/pk-console.c:1618
+#: ../client/pk-console.c:1625
msgid "You need to specify a search term"
msgstr "Você precisa especificar um termo de pesquisa"
-#: ../client/pk-console.c:1463
+#: ../client/pk-console.c:1495
msgid "Invalid search type"
msgstr "Tipo de pesquisa inválido"
-#: ../client/pk-console.c:1468
+#: ../client/pk-console.c:1500
msgid "You need to specify a package or file to install"
msgstr "Você precisa especificar um pacote ou programa a ser instalado"
-#: ../client/pk-console.c:1475
+#: ../client/pk-console.c:1507
msgid "You need to specify a type, key_id and package_id"
msgstr "Você precisa especificar um tipo, key_id e package_id"
-#: ../client/pk-console.c:1482
+#: ../client/pk-console.c:1514
msgid "You need to specify a package to remove"
msgstr "Você precisa especificar um pacote a ser removido"
-#: ../client/pk-console.c:1488
-msgid "You need to specify the package to download and the destination directory"
-msgstr "Você precisa especificar o pacote a ser baixado e o diretório de destino"
+#: ../client/pk-console.c:1520
+msgid "You need to specify the destination directory and then the packages to download"
+msgstr "Você precisa especificar o diretório de destino e em seguida os pacotes a serem baixados"
-#: ../client/pk-console.c:1494
+#: ../client/pk-console.c:1525
+msgid "Directory not found"
+msgstr "Diretório não encontrado"
+
+#: ../client/pk-console.c:1531
msgid "You need to specify a eula-id"
msgstr "Você precisa especificar um eula-id"
-#: ../client/pk-console.c:1510
+#: ../client/pk-console.c:1547
msgid "You need to specify a package name to resolve"
msgstr "Você precisa especificar um nome de pacote a ser analisado"
-#: ../client/pk-console.c:1519
-#: ../client/pk-console.c:1526
+#: ../client/pk-console.c:1556
+#: ../client/pk-console.c:1563
msgid "You need to specify a repo name"
msgstr "Você precisa especificar um nome de repositório"
-#: ../client/pk-console.c:1533
+#: ../client/pk-console.c:1570
msgid "You need to specify a repo name/parameter and value"
msgstr "Você precisa especificar um nome/parâmetro de repositório e um valor"
-#: ../client/pk-console.c:1546
+#: ../client/pk-console.c:1583
msgid "You need to specify a time term"
msgstr "Você precisa especificar um termo de horário"
-#: ../client/pk-console.c:1551
+#: ../client/pk-console.c:1588
msgid "You need to specify a correct role"
msgstr "Você precisa especificar um papel correto"
-#: ../client/pk-console.c:1556
+#: ../client/pk-console.c:1593
msgid "Failed to get last time"
msgstr "Falha ao obter o último horário"
-#: ../client/pk-console.c:1592
+#: ../client/pk-console.c:1632
msgid "You need to specify a package to find the details for"
msgstr "Você precisa especificar o pacote para o qual você quer localizar os detalhes"
-#: ../client/pk-console.c:1599
+#: ../client/pk-console.c:1639
msgid "You need to specify a package to find the files for"
msgstr "Você precisa especificar o pacote para o qual você quer localizar os arquivos"
-#: ../client/pk-console.c:1648
+#: ../client/pk-console.c:1688
#, c-format
msgid "Option '%s' not supported"
msgstr "A opção \"%s\" não é suportada"
-#: ../client/pk-console.c:1661
+#: ../client/pk-console.c:1701
msgid "You don't have the necessary privileges for this operation"
msgstr "Você não tem os privilégios necessários para esta operação"
-#: ../client/pk-console.c:1663
+#: ../client/pk-console.c:1703
msgid "Command failed"
msgstr "O comando falhou"
-#: ../client/pk-generate-pack.c:106
+#: ../client/pk-generate-pack.c:115
msgid "Could not find a package match"
msgstr "Não foi possÃvel encontrar um pacote correspondente"
+#: ../client/pk-generate-pack.c:149
+msgid "failed to download: invalid package_id and/or directory"
+msgstr "falha ao baixar: package_id e/ou diretório inválidos"
+
+#: ../client/pk-generate-pack.c:230
+msgid "Could not find a valid metadata file"
+msgstr "Não foi possÃvel localizar um arquivo de metadados válido"
+
#. get user input
-#: ../client/pk-generate-pack.c:352
+#: ../client/pk-generate-pack.c:519
msgid "Okay to download the additional packages"
msgstr "Os pacotes adicionais podem ser baixados"
-#: ../client/pk-generate-pack.c:422
+#: ../client/pk-generate-pack-main.c:66
msgid "Set the path of the file with the list of packages/dependencies to be excluded"
msgstr "Defina o caminho do arquivo com a lista de pacotes/dependências a serem excluÃdas"
-#: ../client/pk-generate-pack.c:467
+#: ../client/pk-generate-pack-main.c:111
msgid "You need to specify the pack name and packages to be packed\n"
msgstr "Você precisa especificar o nome do conjunto e os pacotes a serem incluÃdos\n"
-#: ../client/pk-generate-pack.c:473
-msgid "Invalid name for the service pack, Specify a name with .pack extension\n"
-msgstr "Nome inválido para o conjunto de atualizações. Especifique um nome com extensão .pack\n"
+#: ../client/pk-generate-pack-main.c:117
+msgid "Invalid name for the service pack, Specify a name with .servicepack extension\n"
+msgstr "Nome inválido para o conjunto de atualizações. Especifique um nome com a extensão .servicepack\n"
-#: ../client/pk-generate-pack.c:485
+#: ../client/pk-generate-pack-main.c:129
msgid "A pack with the same name already exists, do you want to overwrite it?"
msgstr "Um conjunto com o mesmo nome já existe, você deseja sobrescrevê-lo?"
-#: ../client/pk-generate-pack.c:498
+#: ../client/pk-generate-pack-main.c:142
msgid "Failed to create directory"
msgstr "Falha ao criar o diretório"
-#: ../client/pk-generate-pack.c:505
+#: ../client/pk-generate-pack-main.c:149
msgid "Failed to create pack"
msgstr "Falha ao criar o conjunto"
@@ -451,6 +463,10 @@ msgid "Error trying to start: %s\n"
msgstr "Erro ao tentar iniciar: %s\n"
#~ msgid ""
+#~ "You need to specify the package to download and the destination directory"
+#~ msgstr ""
+#~ "Você precisa especificar o pacote a ser baixado e o diretório de destino"
+#~ msgid ""
#~ "Could not find a package with that name to install, or package already "
#~ "installed"
#~ msgstr ""
commit 57c0180cee63fa689ca80d6de564edec022f9be0
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date: Thu Aug 28 00:42:23 2008 +0200
smart: add RPM/DEB groups
diff --git a/backends/smart/helpers/Makefile.am b/backends/smart/helpers/Makefile.am
index b9ece65..7fa93c1 100644
--- a/backends/smart/helpers/Makefile.am
+++ b/backends/smart/helpers/Makefile.am
@@ -17,6 +17,7 @@ dist_helper_DATA = \
repo-enable.py \
resolve.py \
search-name.py \
+ search-group.py \
search-details.py \
smartBackend.py \
update-packages.py \
diff --git a/backends/smart/helpers/search-group.py b/backends/smart/helpers/search-group.py
new file mode 100755
index 0000000..da01f6d
--- /dev/null
+++ b/backends/smart/helpers/search-group.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2007 Richard Hughes <richard at hughsie.com>
+# Copyright (C) 2007 James Bowes <jbowes at dangerouslyinc.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.
+
+import sys
+
+from smartBackend import PackageKitSmartBackend
+
+options = sys.argv[1]
+searchterms = sys.argv[2]
+
+backend = PackageKitSmartBackend(sys.argv[1:])
+backend.search_group(options,searchterms)
+sys.exit(0)
diff --git a/backends/smart/helpers/smartBackend.py b/backends/smart/helpers/smartBackend.py
index 76d2d6d..cfb6b81 100644
--- a/backends/smart/helpers/smartBackend.py
+++ b/backends/smart/helpers/smartBackend.py
@@ -182,6 +182,18 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
self._show_package(package)
@needs_cache
+ def search_group(self, filters, searchstring):
+ packages = self.ctrl.getCache().getPackages()
+ for package in packages:
+ if self._passes_filters(package, filters):
+ info = package.loaders.keys()[0].getInfo(package)
+ group = info.getGroup()
+ if group in self.GROUPS:
+ group = self.GROUPS[group]
+ if searchstring in group:
+ self._show_package(package)
+
+ @needs_cache
def search_details(self, filters, searchstring):
packages = self.ctrl.getCache().getPackages()
for package in packages:
@@ -202,6 +214,80 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
self.ctrl.reloadChannels(None, caching=smart.const.NEVER)
self.ctrl.saveSysConf()
+ from packagekit.enums import *
+
+ GROUPS = {
+ # RPM
+ 'Amusement/Games' : GROUP_GAMES,
+ 'Amusement/Graphics' : GROUP_GRAPHICS,
+ 'Applications/Archiving' : GROUP_OTHER,
+ 'Applications/Communications' : GROUP_COMMUNICATION,
+ 'Applications/Databases' : GROUP_OTHER,
+ 'Applications/Editors' : GROUP_PUBLISHING,
+ 'Applications/Emulators' : GROUP_OTHER,
+ 'Applications/Engineering' : GROUP_OTHER,
+ 'Applications/File' : GROUP_OTHER,
+ 'Applications/Internet' : GROUP_INTERNET,
+ 'Applications/Multimedia' : GROUP_MULTIMEDIA,
+ 'Applications/Productivity' : GROUP_OTHER,
+ 'Applications/Publishing' : GROUP_PUBLISHING,
+ 'Applications/System' : GROUP_SYSTEM,
+ 'Applications/Text' : GROUP_PUBLISHING,
+ 'Development/Debuggers' : GROUP_PROGRAMMING,
+ 'Development/Languages' : GROUP_PROGRAMMING,
+ 'Development/Libraries' : GROUP_PROGRAMMING,
+ 'Development/System' : GROUP_PROGRAMMING,
+ 'Development/Tools' : GROUP_PROGRAMMING,
+ 'Documentation' : GROUP_DOCUMENTATION,
+ 'System Environment/Base' : GROUP_SYSTEM,
+ 'System Environment/Daemons' : GROUP_SYSTEM,
+ 'System Environment/Kernel' : GROUP_SYSTEM,
+ 'System Environment/Libraries' : GROUP_SYSTEM,
+ 'System Environment/Shells' : GROUP_SYSTEM,
+ 'User Interface/Desktops' : GROUP_DESKTOP_OTHER,
+ 'User Interface/X' : GROUP_DESKTOP_OTHER,
+ 'User Interface/X Hardware Support' : GROUP_DESKTOP_OTHER,
+ # DEB
+ "admin" : GROUP_ADMIN_TOOLS,
+ "base" : GROUP_SYSTEM,
+ "comm" : GROUP_COMMUNICATION,
+ "devel" : GROUP_PROGRAMMING,
+ "doc" : GROUP_DOCUMENTATION,
+ "editors" : GROUP_PUBLISHING,
+ "electronics" : GROUP_ELECTRONICS,
+ "embedded" : GROUP_SYSTEM,
+ "games" : GROUP_GAMES,
+ "GNOME" : GROUP_DESKTOP_GNOME,
+ "graphics" : GROUP_GRAPHICS,
+ "hamradio" : GROUP_COMMUNICATION,
+ "interpreters" : GROUP_PROGRAMMING,
+ "kde" : GROUP_DESKTOP_KDE,
+ "libdevel" : GROUP_PROGRAMMING,
+ "lib" : GROUP_SYSTEM,
+ "mail" : GROUP_INTERNET,
+ "math" : GROUP_SCIENCE,
+ "misc" : GROUP_OTHER,
+ "net" : GROUP_NETWORK,
+ "news" : GROUP_INTERNET,
+ "oldlibs" : GROUP_LEGACY,
+ "otherosfs" : GROUP_SYSTEM,
+ "perl" : GROUP_PROGRAMMING,
+ "python" : GROUP_PROGRAMMING,
+ "science" : GROUP_SCIENCE,
+ "shells" : GROUP_SYSTEM,
+ "sound" : GROUP_MULTIMEDIA,
+ "tex" : GROUP_PUBLISHING,
+ "text" : GROUP_PUBLISHING,
+ "utils" : GROUP_ACCESSORIES,
+ "web" : GROUP_INTERNET,
+ "x11" : GROUP_DESKTOP_OTHER,
+ "unknown" : GROUP_UNKNOWN,
+ "alien" : GROUP_UNKNOWN,
+ "translations" : GROUP_LOCALIZATION,
+ # Slack
+ "Slackware" : GROUP_UNKNOWN
+ }
+
@needs_cache
def get_details(self, packageids):
for packageid in packageids:
@@ -244,7 +330,19 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
if not pkgsize:
pkgsize = "unknown"
- self.details(packageid, "unknown", "unknown", description, url,
+ if info:
+ if hasattr(info, 'getLicense'):
+ license = info.getLicense()
+ else:
+ license = "unknown"
+
+ group = info.getGroup()
+ if group in self.GROUPS:
+ group = self.GROUPS[group]
+ else:
+ group = "unknown"
+
+ self.details(packageid, license, group, description, url,
pkgsize)
@needs_cache
diff --git a/backends/smart/pk-backend-smart.c b/backends/smart/pk-backend-smart.c
index b8ea32f..a6f0d54 100644
--- a/backends/smart/pk-backend-smart.c
+++ b/backends/smart/pk-backend-smart.c
@@ -51,6 +51,36 @@ backend_destroy (PkBackend *backend)
}
/**
+ * backend_get_groups:
+ */
+static PkBitfield
+backend_get_groups (PkBackend *backend)
+{
+ return pk_bitfield_from_enums (
+ PK_GROUP_ENUM_ACCESSORIES,
+ PK_GROUP_ENUM_ADMIN_TOOLS,
+ PK_GROUP_ENUM_COMMUNICATION,
+ PK_GROUP_ENUM_DESKTOP_GNOME,
+ PK_GROUP_ENUM_DESKTOP_KDE,
+ PK_GROUP_ENUM_DESKTOP_OTHER,
+ PK_GROUP_ENUM_DOCUMENTATION,
+ PK_GROUP_ENUM_ELECTRONICS,
+ PK_GROUP_ENUM_GAMES,
+ PK_GROUP_ENUM_GRAPHICS,
+ PK_GROUP_ENUM_INTERNET,
+ PK_GROUP_ENUM_LEGACY,
+ PK_GROUP_ENUM_LOCALIZATION,
+ PK_GROUP_ENUM_MULTIMEDIA,
+ PK_GROUP_ENUM_NETWORK,
+ PK_GROUP_ENUM_OTHER,
+ PK_GROUP_ENUM_PROGRAMMING,
+ PK_GROUP_ENUM_PUBLISHING,
+ PK_GROUP_ENUM_SCIENCE,
+ PK_GROUP_ENUM_SYSTEM,
+ -1);
+}
+
+/**
* backend_get_filters:
*/
static PkBitfield
@@ -245,6 +275,18 @@ backend_search_details (PkBackend *backend, PkBitfield filters, const gchar *sea
}
/**
+ * pk_backend_search_group:
+ */
+static void
+backend_search_group (PkBackend *backend, PkBitfield filters, const gchar *search)
+{
+ gchar *filters_text;
+ filters_text = pk_filter_bitfield_to_text (filters);
+ pk_backend_spawn_helper (spawn, "search-group.py", filters_text, search, NULL);
+ g_free (filters_text);
+}
+
+/**
* pk_backend_search_name:
*/
static void
@@ -317,7 +359,7 @@ PK_BACKEND_OPTIONS (
"James Bowes <jbowes at dangerouslyinc.com>", /* author */
backend_initialize, /* initialize */
backend_destroy, /* destroy */
- NULL, /* get_groups */
+ backend_get_groups, /* get_groups */
backend_get_filters, /* get_filters */
NULL, /* cancel */
backend_download_packages, /* download_packages */
@@ -341,7 +383,7 @@ PK_BACKEND_OPTIONS (
NULL, /* rollback */
backend_search_details, /* search_details */
NULL, /* search_file */
- NULL, /* search_group */
+ backend_search_group, /* search_group */
backend_search_name, /* search_name */
NULL, /* service_pack */
backend_update_packages, /* update_packages */
commit 3e5fa5b7afa2bc207d519f7d683ad84249b91cc5
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date: Wed Aug 27 23:12:21 2008 +0200
smart: note that packageid mapping only works for rpms atm
diff --git a/backends/smart/helpers/smartBackend.py b/backends/smart/helpers/smartBackend.py
index 98eda2a..76d2d6d 100644
--- a/backends/smart/helpers/smartBackend.py
+++ b/backends/smart/helpers/smartBackend.py
@@ -221,7 +221,6 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
infos.sort()
info = infos[0]
- version, arch = package.version.split('@')
description = info.getDescription()
description = description.replace("\n\n", ";")
description = description.replace("\n", " ")
@@ -314,6 +313,7 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
def _search_packageid(self, packageid):
idparts = packageid.split(';')
+ # FIXME: join only works with RPM packages
packagestring = "%s-%s@%s" % (idparts[0], idparts[1], idparts[2])
ratio, results, suggestions = self.ctrl.search(packagestring)
@@ -325,6 +325,7 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
status = INFO_INSTALLED
else:
status = INFO_AVAILABLE
+ # FIXME: split only works with RPM packages
version, arch = package.version.split('@')
for loader in package.loaders:
channel = loader.getChannel()
commit 71dbd1b3f59e235accf9b7f2c46bf45d70410b47
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date: Wed Aug 27 22:13:39 2008 +0200
smart: add get_packages
diff --git a/backends/smart/helpers/Makefile.am b/backends/smart/helpers/Makefile.am
index 61252ab..b9ece65 100644
--- a/backends/smart/helpers/Makefile.am
+++ b/backends/smart/helpers/Makefile.am
@@ -8,6 +8,7 @@ dist_helper_DATA = \
get-details.py \
get-files.py \
get-repo-list.py \
+ get-packages.py \
get-updates.py \
install-files.py \
install-packages.py \
diff --git a/backends/smart/helpers/get-packages.py b/backends/smart/helpers/get-packages.py
new file mode 100755
index 0000000..74eade7
--- /dev/null
+++ b/backends/smart/helpers/get-packages.py
@@ -0,0 +1,21 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2007 Richard Hughes <richard at hughsie.com>
+# Copyright (C) 2007 James Bowes <jbowes at dangerouslyinc.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.
+
+import sys
+
+from smartBackend import PackageKitSmartBackend
+
+filters = sys.argv[1]
+
+backend = PackageKitSmartBackend(sys.argv[1:])
+backend.get_packages(filters)
+sys.exit(0)
diff --git a/backends/smart/helpers/smartBackend.py b/backends/smart/helpers/smartBackend.py
index 770a59e..98eda2a 100644
--- a/backends/smart/helpers/smartBackend.py
+++ b/backends/smart/helpers/smartBackend.py
@@ -190,6 +190,13 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
if searchstring in info.getDescription():
self._show_package(package)
+ @needs_cache
+ def get_packages(self, filters):
+ packages = self.ctrl.getCache().getPackages()
+ for package in packages:
+ if self._passes_filters(package, filters):
+ self._show_package(package)
+
def refresh_cache(self):
self.ctrl.rebuildSysConfChannels()
self.ctrl.reloadChannels(None, caching=smart.const.NEVER)
diff --git a/backends/smart/pk-backend-smart.c b/backends/smart/pk-backend-smart.c
index 31e4ade..b8ea32f 100644
--- a/backends/smart/pk-backend-smart.c
+++ b/backends/smart/pk-backend-smart.c
@@ -128,6 +128,18 @@ backend_get_updates (PkBackend *backend, PkBitfield filters)
}
/**
+ * backend_get_packages:
+ */
+static void
+backend_get_packages (PkBackend *backend, PkBitfield filters)
+{
+ gchar *filters_text;
+ filters_text = pk_filter_bitfield_to_text (filters);
+ pk_backend_spawn_helper (spawn, "get-packages.py", filters_text, NULL);
+ g_free (filters_text);
+}
+
+/**
* backend_install_packages:
*/
static void
@@ -313,7 +325,7 @@ PK_BACKEND_OPTIONS (
backend_get_details, /* get_details */
NULL, /* get_distro_upgrades */
backend_get_files, /* get_files */
- NULL, /* get_packages */
+ backend_get_packages, /* get_packages */
backend_get_repo_list, /* get_repo_list */
NULL, /* get_requires */
NULL, /* get_update_detail */
commit bc55dfb2db1c2314bef42458c853cb04c64dd36c
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date: Wed Aug 27 22:06:50 2008 +0200
smart: add get_filters with installed
diff --git a/backends/smart/pk-backend-smart.c b/backends/smart/pk-backend-smart.c
index 0d6aed8..31e4ade 100644
--- a/backends/smart/pk-backend-smart.c
+++ b/backends/smart/pk-backend-smart.c
@@ -51,6 +51,17 @@ backend_destroy (PkBackend *backend)
}
/**
+ * backend_get_filters:
+ */
+static PkBitfield
+backend_get_filters (PkBackend *backend)
+{
+ return pk_bitfield_from_enums (
+ PK_FILTER_ENUM_INSTALLED,
+ -1);
+}
+
+/**
* backend_download_packages:
*/
static void
@@ -295,7 +306,7 @@ PK_BACKEND_OPTIONS (
backend_initialize, /* initialize */
backend_destroy, /* destroy */
NULL, /* get_groups */
- NULL, /* get_filters */
+ backend_get_filters, /* get_filters */
NULL, /* cancel */
backend_download_packages, /* download_packages */
backend_get_depends, /* get_depends */
commit 8d7dd0316c6262ffa380593df88dc3d7450398de
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date: Wed Aug 27 20:39:29 2008 +0200
smart: allow for multiple packages
diff --git a/backends/smart/helpers/Makefile.am b/backends/smart/helpers/Makefile.am
index bfcf035..61252ab 100644
--- a/backends/smart/helpers/Makefile.am
+++ b/backends/smart/helpers/Makefile.am
@@ -20,6 +20,7 @@ dist_helper_DATA = \
smartBackend.py \
update-packages.py \
update-system.py \
+ download-packages.py \
$(NULL)
install-data-hook:
diff --git a/backends/smart/helpers/download-packages.py b/backends/smart/helpers/download-packages.py
new file mode 100755
index 0000000..d4e989f
--- /dev/null
+++ b/backends/smart/helpers/download-packages.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2007 Richard Hughes <richard at hughsie.com>
+# Copyright (C) 2007 James Bowes <jbowes at dangerouslyinc.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.
+
+import sys
+
+from smartBackend import PackageKitSmartBackend
+
+directory = sys.argv[1]
+packages = sys.argv[2:]
+backend = PackageKitSmartBackend(sys.argv[1:])
+backend.download_packages(directory, packages)
+sys.exit(0)
+
diff --git a/backends/smart/helpers/install-packages.py b/backends/smart/helpers/install-packages.py
index d1c8c7b..3c63de5 100755
--- a/backends/smart/helpers/install-packages.py
+++ b/backends/smart/helpers/install-packages.py
@@ -14,7 +14,7 @@ import sys
from smartBackend import PackageKitSmartBackend
-package = sys.argv[1]
+packages = sys.argv[1:]
backend = PackageKitSmartBackend(sys.argv[1:])
-backend.install(package)
+backend.install_packages(packages)
sys.exit(0)
diff --git a/backends/smart/helpers/remove-packages.py b/backends/smart/helpers/remove-packages.py
index 173037b..c673501 100755
--- a/backends/smart/helpers/remove-packages.py
+++ b/backends/smart/helpers/remove-packages.py
@@ -14,8 +14,8 @@ import sys
from smartBackend import PackageKitSmartBackend
-package = sys.argv[1]
+packages = sys.argv[1:]
backend = PackageKitSmartBackend(sys.argv[1:])
-backend.remove(package)
+backend.remove_packages(packages)
sys.exit(0)
diff --git a/backends/smart/helpers/smartBackend.py b/backends/smart/helpers/smartBackend.py
index 4e30a97..770a59e 100644
--- a/backends/smart/helpers/smartBackend.py
+++ b/backends/smart/helpers/smartBackend.py
@@ -20,7 +20,8 @@ import smart
from packagekit.backend import PackageKitBaseBackend, INFO_INSTALLED, \
INFO_AVAILABLE, INFO_NORMAL, FILTER_NOT_INSTALLED, FILTER_INSTALLED, \
INFO_SECURITY, INFO_BUGFIX, INFO_ENHANCEMENT, \
- ERROR_REPO_NOT_FOUND, ERROR_PACKAGE_ALREADY_INSTALLED
+ ERROR_REPO_NOT_FOUND, ERROR_PACKAGE_ALREADY_INSTALLED, \
+ ERROR_PACKAGE_DOWNLOAD_FAILED
from packagekit.package import PackagekitPackage
# Global vars
@@ -51,24 +52,26 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
smart.initPsyco()
@needs_cache
- def install(self, packageid):
- ratio, results, suggestions = self._search_packageid(packageid)
-
- packages = self._process_search_results(results)
+ def install_packages(self, packageids):
+ packages = []
+ for packageid in packageids:
+ ratio, results, suggestions = self._search_packageid(packageid)
+ packages.extend(self._process_search_results(results))
available = [package for package in packages if not package.installed]
- if len(available) != 1:
+ if len(available) < 1:
return
- package = available[0]
trans = smart.transaction.Transaction(self.ctrl.getCache(),
smart.transaction.PolicyInstall)
- trans.enqueue(package, smart.transaction.INSTALL)
+ for package in available:
+ trans.enqueue(package, smart.transaction.INSTALL)
trans.run()
self.ctrl.commitTransaction(trans, confirm=False)
@needs_cache
def install_files(self, trusted, paths):
- self.ctrl.addFileChannel(path)
+ for path in paths:
+ self.ctrl.addFileChannel(path)
self.ctrl.reloadChannels()
trans = smart.transaction.Transaction(self.ctrl.getCache(),
smart.transaction.PolicyInstall)
@@ -85,37 +88,51 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
self.ctrl.commitTransaction(trans, confirm=False)
@needs_cache
- def remove(self, packageid):
- ratio, results, suggestions = self._search_packageid(packageid)
-
- packages = self._process_search_results(results)
+ def remove_packages(self, packageids):
+ packages = []
+ for packageid in packageids:
+ ratio, results, suggestions = self._search_packageid(packageid)
+ packages.extend(self._process_search_results(results))
installed = [package for package in packages if package.installed]
- if len(installed) != 1:
+ if len(installed) < 1:
return
- package = installed[0]
trans = smart.transaction.Transaction(self.ctrl.getCache(),
smart.transaction.PolicyRemove)
- trans.enqueue(package, smart.transaction.REMOVE)
+ for package in installed:
+ trans.enqueue(package, smart.transaction.REMOVE)
trans.run()
self.ctrl.commitTransaction(trans, confirm=False)
@needs_cache
- def update(self, packageid):
- ratio, results, suggestions = self._search_packageid(packageid)
+ def update_packages(self, packageids):
+ packages = []
+ for packageid in packageids:
+ ratio, results, suggestions = self._search_packageid(packageid)
+ packages.extend(self._process_search_results(results))
- packages = self._process_search_results(results)
installed = [package for package in packages if package.installed]
- if len(installed) != 1:
+ if len(installed) < 1:
return
- package = installed[0]
trans = smart.transaction.Transaction(self.ctrl.getCache(),
smart.transaction.PolicyUpgrade)
- trans.enqueue(package, smart.transaction.UPGRADE)
+ for package in installed:
+ trans.enqueue(package, smart.transaction.UPGRADE)
trans.run()
self.ctrl.commitTransaction(trans, confirm=False)
@needs_cache
+ def download_packages(self, directory, packageids):
+ packages = []
+ for packageid in packageids:
+ ratio, results, suggestions = self._search_packageid(packageid)
+ packages.extend(self._process_search_results(results))
+
+ if len(packages) < 1:
+ return
+ self.ctrl.downloadPackages(packages, targetdir=directory)
+
+ @needs_cache
def update_system(self):
cache = self.ctrl.getCache()
diff --git a/backends/smart/helpers/update-packages.py b/backends/smart/helpers/update-packages.py
index efbd5a1..a304a70 100755
--- a/backends/smart/helpers/update-packages.py
+++ b/backends/smart/helpers/update-packages.py
@@ -14,7 +14,7 @@ import sys
from smartBackend import PackageKitSmartBackend
-package = sys.argv[1]
+packages = sys.argv[1:]
backend = PackageKitSmartBackend(sys.argv[1:])
-backend.update(package)
+backend.update_packages(packages)
sys.exit(0)
diff --git a/backends/smart/pk-backend-smart.c b/backends/smart/pk-backend-smart.c
index c5e86fc..0d6aed8 100644
--- a/backends/smart/pk-backend-smart.c
+++ b/backends/smart/pk-backend-smart.c
@@ -51,6 +51,20 @@ backend_destroy (PkBackend *backend)
}
/**
+ * backend_download_packages:
+ */
+static void
+backend_download_packages (PkBackend *backend, gchar **package_ids, const gchar *directory)
+{
+ gchar *package_ids_temp;
+
+ /* send the complete list as stdin */
+ package_ids_temp = pk_package_ids_to_text (package_ids, "|");
+ pk_backend_spawn_helper (spawn, "download-packages.py", directory, package_ids_temp, NULL);
+ g_free (package_ids_temp);
+}
+
+/**
* backend_get_depends:
*/
static void
@@ -283,7 +297,7 @@ PK_BACKEND_OPTIONS (
NULL, /* get_groups */
NULL, /* get_filters */
NULL, /* cancel */
- NULL, /* download_packages */
+ backend_download_packages, /* download_packages */
backend_get_depends, /* get_depends */
backend_get_details, /* get_details */
NULL, /* get_distro_upgrades */
commit a8c7f2720eca19f1c80dabc6c5f4d2ddf29df762
Merge: 3d2ecbb... 962d677...
Author: Robin Norwood <robin.norwood at gmail.com>
Date: Wed Aug 27 11:51:08 2008 -0400
Merge branch 'master' of git+ssh://rnorwood@git.packagekit.org/srv/git/PackageKit
commit 3d2ecbbe7f85f1273dd1408b11aa5adb47e005e1
Author: Robin Norwood <robin.norwood at gmail.com>
Date: Wed Aug 27 10:57:44 2008 -0400
Fix for rhbz#459870 - give a proper warning if a package is already installed, and a proper error if all packages in the transaction are already installed.
diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 4e3926f..5674db4 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
@@ -892,17 +892,34 @@ class PackageKitYumBackend(PackageKitBaseBackend):
if file.endswith('.rpm'):
inst_files.append(os.path.join(tempdir, file))
+ to_remove = []
+
# remove files of packages that alrady exist
for inst_file in inst_files:
try:
pkg = YumLocalPackage(ts=self.yumbase.rpmdb.readOnlyTS(), filename=inst_file)
if self._is_inst(pkg):
- inst_files.remove(inst_file)
+ to_remove.append(inst_file)
except yum.Errors.YumBaseError,e:
self.error(ERROR_INVALID_PACKAGE_FILE,'Package could not be decompressed')
except:
self.error(ERROR_UNKNOWN,"Failed to open local file -- please report")
+ # Some fiddly code to get the messaging right
+ if len(inst_files) == 1 and len(to_remove) == 1:
+ # The single pkg to be installed was already installed
+ self.error(ERROR_PACKAGE_ALREADY_INSTALLED, '%s is already installed' % inst_files[0])
+
+ for inst_file in to_remove:
+ # More than one pkg to be installed, 1 or more are already installed
+ inst_files.remove(inst_file)
+ self.message(MESSAGE_PACKAGE_ALREADY_INSTALLED, '%s is already installed' % inst_file)
+
+ if len(inst_files) == 0:
+ # More than one pkg to be installed, all of them already installed
+ self.error(ERROR_ALL_PACKAGES_ALREADY_INSTALLED,
+ 'All of the specified packages have already been installed')
+
# If trusted is true, it means that we will only install trusted files
if trusted == 'yes':
# disregard the default
diff --git a/docs/api/spec/pk-concepts.xml b/docs/api/spec/pk-concepts.xml
index 5a0434a..3a12bce 100644
--- a/docs/api/spec/pk-concepts.xml
+++ b/docs/api/spec/pk-concepts.xml
@@ -355,11 +355,20 @@
<row>
<entry><literal>package-already-installed</literal></entry>
<entry>
- The package that is trying to be installed or updated is already
+ The (single) package that is trying to be installed or updated is already
installed
</entry>
</row>
<row>
+ <entry><literal>all-packages-already-installed</literal></entry>
+ <entry>
+ Multiple package installs were attempted, but all of
+ them were already installed. The backend should
+ generate package-already-installed messages (not errors)
+ for each package.
+ </entry>
+ </row>
+ <row>
<entry><literal>package-download-failed</literal></entry>
<entry>A package failed to download correctly</entry>
</row>
diff --git a/libpackagekit/pk-enum.c b/libpackagekit/pk-enum.c
index 1a1c239..c147741 100644
--- a/libpackagekit/pk-enum.c
+++ b/libpackagekit/pk-enum.c
@@ -156,6 +156,7 @@ static PkEnumMatch enum_error[] = {
{PK_ERROR_ENUM_INVALID_PACKAGE_FILE, "invalid-package-file"},
{PK_ERROR_ENUM_PACKAGE_INSTALL_BLOCKED, "package-install-blocked"},
{PK_ERROR_ENUM_PACKAGE_CORRUPT, "package-corrupt"},
+ {PK_ERROR_ENUM_ALL_PACKAGES_ALREADY_INSTALLED, "all-packages-already-installed"},
{0, NULL}
};
@@ -181,6 +182,7 @@ static PkEnumMatch enum_message[] = {
{PK_MESSAGE_ENUM_NEWER_PACKAGE_EXISTS, "newer-package-exists"},
{PK_MESSAGE_ENUM_COULD_NOT_FIND_PACKAGE,"could-not-find-package"},
{PK_MESSAGE_ENUM_CONFIG_FILES_CHANGED, "config-files-changed"},
+ {PK_MESSAGE_ENUM_PACKAGE_ALREADY_INSTALLED, "package-already-installed"},
{0, NULL}
};
diff --git a/libpackagekit/pk-enum.h b/libpackagekit/pk-enum.h
index 505c2bf..5628218 100644
--- a/libpackagekit/pk-enum.h
+++ b/libpackagekit/pk-enum.h
@@ -215,6 +215,7 @@ typedef enum {
PK_MESSAGE_ENUM_NEWER_PACKAGE_EXISTS,
PK_MESSAGE_ENUM_COULD_NOT_FIND_PACKAGE,
PK_MESSAGE_ENUM_CONFIG_FILES_CHANGED,
+ PK_MESSAGE_ENUM_PACKAGE_ALREADY_INSTALLED,
PK_MESSAGE_ENUM_UNKNOWN
} PkMessageEnum;
@@ -263,6 +264,7 @@ typedef enum {
PK_ERROR_ENUM_INVALID_PACKAGE_FILE,
PK_ERROR_ENUM_PACKAGE_INSTALL_BLOCKED,
PK_ERROR_ENUM_PACKAGE_CORRUPT,
+ PK_ERROR_ENUM_ALL_PACKAGES_ALREADY_INSTALLED,
PK_ERROR_ENUM_UNKNOWN
} PkErrorCodeEnum;
commit 962d677afcd9a9cfed9f08b4c862b7e3bb175a8c
Author: Richard Hughes <hughsie at localhost.localdomain>
Date: Wed Aug 27 13:36:37 2008 +0100
yum: don't always prefer the first package returned from returnNewestByNameArch() as this will be i386 on x64, and hence the wrong thing will be installed on multiarch
diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 4e3926f..3dd2b2f 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
@@ -814,7 +814,6 @@ class PackageKitYumBackend(PackageKitBaseBackend):
show = False
if show:
self._show_package(pkg,INFO_AVAILABLE)
- break
@handle_repo_error
def install_packages(self,package_ids):
commit c71eaadafd4115f0d8cf1c39c882f678ce1f004a
Author: Richard Hughes <hughsie at localhost.localdomain>
Date: Wed Aug 27 13:28:43 2008 +0100
bugfix: fix pkcon to treat the filters as bitfields, not enums
diff --git a/client/pk-console.c b/client/pk-console.c
index 91cee17..2bb8bf2 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -506,6 +506,7 @@ pk_console_perhaps_resolve (PkClient *client, PkBitfield filter, const gchar *pa
/* we need to resolve it */
packages = pk_package_ids_from_id (package);
+pk_warning ("%s: %i", packages[0], filter);
ret = pk_client_resolve (client_task, filter, packages, error);
g_strfreev (packages);
if (!ret) {
@@ -585,7 +586,7 @@ pk_console_install_stuff (PkClient *client, gchar **packages, GError **error)
if (is_local) {
g_ptr_array_add (array_files, g_strdup (packages[i]));
} else {
- package_id = pk_console_perhaps_resolve (client, PK_FILTER_ENUM_NOT_INSTALLED, packages[i], error);
+ package_id = pk_console_perhaps_resolve (client, pk_bitfield_value (PK_FILTER_ENUM_NOT_INSTALLED), packages[i], error);
if (package_id == NULL) {
*error = g_error_new (1, 0, "%s: %s", _("Could not find package to install"), packages[i]);
ret = FALSE;
@@ -691,7 +692,7 @@ pk_console_remove_packages (PkClient *client, gchar **packages, GError **error)
list = pk_package_list_new ();
length = g_strv_length (packages);
for (i=2; i<length; i++) {
- package_id = pk_console_perhaps_resolve (client, PK_FILTER_ENUM_INSTALLED, packages[i], error);
+ package_id = pk_console_perhaps_resolve (client, pk_bitfield_value (PK_FILTER_ENUM_INSTALLED), packages[i], error);
if (package_id == NULL) {
*error = g_error_new (1, 0, "%s:%s\n", _("Could not find package to remove"), packages[i]);
ret = FALSE;
@@ -725,7 +726,7 @@ pk_console_remove_packages (PkClient *client, gchar **packages, GError **error)
pk_debug ("Getting installed requires for %s", package_ids[0]);
/* see if any packages require this one */
- ret = pk_client_get_requires (client_task, PK_FILTER_ENUM_INSTALLED, package_ids, TRUE, error);
+ ret = pk_client_get_requires (client_task, pk_bitfield_value (PK_FILTER_ENUM_INSTALLED), package_ids, TRUE, error);
if (!ret) {
pk_warning ("failed to get requires");
goto out;
@@ -797,7 +798,7 @@ pk_console_download_packages (PkClient *client, gchar **packages, const gchar *d
array_packages = g_ptr_array_new ();
length = g_strv_length (packages);
for (i=3; i<length; i++) {
- package_id = pk_console_perhaps_resolve (client, PK_FILTER_ENUM_NONE, packages[i], error);
+ package_id = pk_console_perhaps_resolve (client, pk_bitfield_value (PK_FILTER_ENUM_NONE), packages[i], error);
if (package_id == NULL) {
*error = g_error_new (1, 0, "%s: %s", _("Could not find package to download"), packages[i]);
ret = FALSE;
@@ -848,7 +849,7 @@ pk_console_update_package (PkClient *client, const gchar *package, GError **erro
gchar *package_id;
gchar **package_ids;
- package_id = pk_console_perhaps_resolve (client, PK_FILTER_ENUM_INSTALLED, package, error);
+ package_id = pk_console_perhaps_resolve (client, pk_bitfield_value (PK_FILTER_ENUM_INSTALLED), package, error);
if (package_id == NULL) {
*error = g_error_new (1, 0, "%s: %s", _("Could not find package to update"), package);
return FALSE;
@@ -870,7 +871,7 @@ pk_console_get_requires (PkClient *client, PkBitfield filters, const gchar *pack
gboolean ret;
gchar *package_id;
gchar **package_ids;
- package_id = pk_console_perhaps_resolve (client, PK_FILTER_ENUM_NONE, package, error);
+ package_id = pk_console_perhaps_resolve (client, pk_bitfield_value (PK_FILTER_ENUM_NONE), package, error);
if (package_id == NULL) {
*error = g_error_new (1, 0, "%s %s", _("Could not find what packages require"), package);
return FALSE;
@@ -891,7 +892,7 @@ pk_console_get_depends (PkClient *client, PkBitfield filters, const gchar *packa
gboolean ret;
gchar *package_id;
gchar **package_ids;
- package_id = pk_console_perhaps_resolve (client, PK_FILTER_ENUM_NONE, package, error);
+ package_id = pk_console_perhaps_resolve (client, pk_bitfield_value (PK_FILTER_ENUM_NONE), package, error);
if (package_id == NULL) {
*error = g_error_new (1, 0, "%s %s", _("Could not get dependencies for"), package);
return FALSE;
@@ -912,7 +913,7 @@ pk_console_get_details (PkClient *client, const gchar *package, GError **error)
gboolean ret;
gchar *package_id;
gchar **package_ids;
- package_id = pk_console_perhaps_resolve (client, PK_FILTER_ENUM_NONE, package, error);
+ package_id = pk_console_perhaps_resolve (client, pk_bitfield_value (PK_FILTER_ENUM_NONE), package, error);
if (package_id == NULL) {
*error = g_error_new (1, 0, "%s %s", _("Could not find details for"), package);
return FALSE;
@@ -935,7 +936,7 @@ pk_console_get_files (PkClient *client, const gchar *package, GError **error)
gchar **package_ids;
GError *error_local = NULL;
- package_id = pk_console_perhaps_resolve (client, PK_FILTER_ENUM_NONE, package, &error_local);
+ package_id = pk_console_perhaps_resolve (client, pk_bitfield_value (PK_FILTER_ENUM_NONE), package, &error_local);
if (package_id == NULL) {
*error = g_error_new (1, 0, "%s (%s)", _("Could not find the files for this package"), error_local->message);
g_error_free (error_local);
@@ -961,7 +962,7 @@ pk_console_get_update_detail (PkClient *client, const gchar *package, GError **e
gboolean ret;
gchar *package_id;
gchar **package_ids;
- package_id = pk_console_perhaps_resolve (client, PK_FILTER_ENUM_INSTALLED, package, error);
+ package_id = pk_console_perhaps_resolve (client, pk_bitfield_value (PK_FILTER_ENUM_INSTALLED), package, error);
if (package_id == NULL) {
*error = g_error_new (1, 0, "%s %s", _("Could not find the update details for"), package);
return FALSE;
commit 89dc52f916e1d1f88fdb79b2ef4a085131d097e3
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Aug 27 12:57:20 2008 +0100
post release version bump
diff --git a/RELEASE b/RELEASE
index 43e44dd..20a28bc 100644
--- a/RELEASE
+++ b/RELEASE
@@ -3,7 +3,7 @@ PackageKit Release Notes
1. Write NEWS entries for PackageKit and gnome-packagekit in the same
format as usual. Ignore any trivial commits.
-git-shortlog PACKAGEKIT_0_2_4.. | grep -v trivial | grep -v Merge > NEWS.new
+git-shortlog PACKAGEKIT_0_3_1.. | grep -v trivial | grep -v Merge > NEWS.new
2. Add download date to docs/html/pk-download.html, save file.
@@ -11,8 +11,8 @@ git-shortlog PACKAGEKIT_0_2_4.. | grep -v trivial | grep -v Merge > NEWS.new
4. Commit changes in PackageKit git:
-git commit -a -m "Release version 0.3.1"
-git tag -a -f -m "Release 0.3.1" PACKAGEKIT_0_3_1
+git commit -a -m "Release version 0.3.2"
+git tag -a -f -m "Release 0.3.2" PACKAGEKIT_0_3_2
git push --tags
git push
git push git+ssh://hughsient@git.freedesktop.org/git/packagekit
@@ -20,8 +20,8 @@ git push --tags git+ssh://hughsient@git.freedesktop.org/git/packagekit
5. Commit changes in gnome-packagekit git:
-git commit -a -m "Release version 0.3.1"
-git-tag GNOME_PACKAGEKIT_0_3_1
+git commit -a -m "Release version 0.3.2"
+git-tag GNOME_PACKAGEKIT_0_3_2
git push --tags
git push
@@ -41,9 +41,9 @@ git push
10. Send an email to packagekit at lists.freedesktop.org
=================================================
-Subject: PackageKit and gnome-packagekit 0.3.1 released!
+Subject: PackageKit and gnome-packagekit 0.3.2 released!
-Today I released PackageKit and gnome-packagekit 0.3.1.
+Today I released PackageKit and gnome-packagekit 0.3.2.
PackageKit release notes: http://gitweb.freedesktop.org/?p=packagekit.git;a=blob;f=NEWS
diff --git a/configure.ac b/configure.ac
index ef2f67e..0e83b62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ(2.52)
-AC_INIT(PackageKit, 0.3.1)
+AC_INIT(PackageKit, 0.3.2)
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
More information about the PackageKit-commit
mailing list