[PackageKit-commit] packagekit: Branch 'master' - 26 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Wed Jul 1 13:05:46 PDT 2009
backends/conary/conaryFilter.py | 7
backends/portage/portageBackend.py | 245 +++--
backends/yum/yumFilter.py | 6
client/pk-console.c | 14
contrib/debuginfo-install/Makefile.am | 2
contrib/debuginfo-install/pk-debuginfo-install.c | 364 +++++--
contrib/debuginfo-install/pk-debuginfo-install.xml | 8
contrib/debuginfo-install/pk-progress-bar.c | 376 ++++++++
contrib/debuginfo-install/pk-progress-bar.h | 66 +
docs/api/spec/pk-concepts.xml | 146 ++-
lib/packagekit-glib/Makefile.am | 3
lib/packagekit-glib/packagekit.h | 1
lib/packagekit-glib/pk-client.c | 167 ++-
lib/packagekit-glib/pk-client.h | 10
lib/packagekit-glib/pk-enum.c | 1
lib/packagekit-glib/pk-enum.h | 1
lib/packagekit-glib/pk-require-restart-obj.c | 138 ++
lib/packagekit-glib/pk-require-restart-obj.h | 54 +
lib/packagekit-glib/pk-task-list.c | 1
lib/packagekit-qt/src/client.h | 7
lib/python/packagekit/filter.py | 21
po/cs.po | 970 +++++++++++++--------
po/pl.po | 102 +-
src/org.freedesktop.PackageKit.Transaction.xml | 13
src/pk-transaction-list.c | 9
25 files changed, 2060 insertions(+), 672 deletions(-)
New commits:
commit bef160191d5db73b3569ea69ba93b84fb22acbbd
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Jul 1 20:47:37 2009 +0100
Add a self check for transactions with unknown roles
diff --git a/src/pk-transaction-list.c b/src/pk-transaction-list.c
index 1be4264..63d93c7 100644
--- a/src/pk-transaction-list.c
+++ b/src/pk-transaction-list.c
@@ -609,7 +609,9 @@ pk_transaction_list_is_consistent (PkTransactionList *tlist)
guint wrong = 0;
guint no_commit = 0;
guint length;
+ guint unknown_role = 0;
PkTransactionItem *item;
+ PkRoleEnum role;
g_return_val_if_fail (PK_IS_TRANSACTION_LIST (tlist), 0);
@@ -632,6 +634,9 @@ pk_transaction_list_is_consistent (PkTransactionList *tlist)
wrong++;
if (item->running && item->finished)
wrong++;
+ role = pk_transaction_priv_get_role (item->transaction);
+ if (role == PK_ROLE_ENUM_UNKNOWN)
+ unknown_role++;
}
/* debug */
@@ -643,6 +648,10 @@ pk_transaction_list_is_consistent (PkTransactionList *tlist)
ret = FALSE;
}
+ /* role not set */
+ if (unknown_role != 0)
+ egg_debug ("%i have an unknown role (GetTid then nothing?)", unknown_role);
+
/* some are not committed */
if (no_commit != 0)
egg_debug ("%i have not been committed and may be pending auth", no_commit);
commit 572c4cfd3d1fbbe84371b7ffae8b865843260511
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Wed Jul 1 16:54:19 2009 +0200
trivial: pk-qt: update errors list
diff --git a/lib/packagekit-qt/src/client.h b/lib/packagekit-qt/src/client.h
index cd1bd09..29973bc 100644
--- a/lib/packagekit-qt/src/client.h
+++ b/lib/packagekit-qt/src/client.h
@@ -368,6 +368,13 @@ public:
ErrorIncompatibleArchitecture,
ErrorNoSpaceOnDevice,
ErrorMediaChangeRequired,
+ ErrorNotAuthorized,
+ ErrorUpdateNotFound,
+ ErrorCannotInstallRepoUnsigned,
+ ErrorCannotUpdateRepoUnsigned,
+ ErrorCannotGetFilelist,
+ ErrorCannotGetRequires,
+ ErrorCannotDisableRepository,
UnknownErrorType
} ErrorType;
commit b4350f2b2ee3e8c94228a23b4db655ebfb33e42a
Author: hunter688 <hunter688 at fedoraproject.org>
Date: Wed Jul 1 12:05:25 2009 +0000
Sending translation for Czech
diff --git a/po/cs.po b/po/cs.po
index 9895e46..353d3e2 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: packagekit.master.cs\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-01-15 16:57+0000\n"
-"PO-Revision-Date: 2008-10-21 14:08+0200\n"
-"Last-Translator: Adam Pribyl <pribyl at lowlevel.cz>\n"
+"POT-Creation-Date: 2009-07-01 08:31+0000\n"
+"PO-Revision-Date: 2009-07-01 14:04+0100\n"
+"Last-Translator: Dušan Hokův <dusan at mirc.cz>\n"
"Language-Team: Czech <fedora-cs-list at redhat.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,845 +19,1148 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. TRANSLATORS: this is an atomic transaction
-#: ../client/pk-console.c:230
+#: ../client/pk-console.c:231
msgid "Transaction"
-msgstr ""
+msgstr "Transakce"
#. TRANSLATORS: this is the time the transaction was started in system timezone
-#: ../client/pk-console.c:232
+#: ../client/pk-console.c:233
msgid "System time"
-msgstr ""
+msgstr "Systémový Äas"
#. TRANSLATORS: this is if the transaction succeeded or not
-#: ../client/pk-console.c:234
+#: ../client/pk-console.c:235
msgid "Succeeded"
msgstr ""
#. TRANSLATORS: if the repo is enabled
-#: ../client/pk-console.c:234 ../client/pk-console.c:377
+#: ../client/pk-console.c:235
+#: ../client/pk-console.c:402
msgid "True"
msgstr ""
-#: ../client/pk-console.c:234 ../client/pk-console.c:377
+#: ../client/pk-console.c:235
+#: ../client/pk-console.c:402
msgid "False"
msgstr ""
#. TRANSLATORS: this is the transactions role, e.g. "update-system"
-#: ../client/pk-console.c:236
+#. TRANSLATORS: the trasaction role, e.g. update-system
+#: ../client/pk-console.c:237
+#: ../src/pk-polkit-action-lookup.c:256
msgid "Role"
msgstr ""
#. TRANSLATORS: this is The duration of the transaction
-#: ../client/pk-console.c:241
+#: ../client/pk-console.c:242
msgid "Duration"
msgstr ""
-#: ../client/pk-console.c:241
+#: ../client/pk-console.c:242
msgid "(seconds)"
-msgstr ""
+msgstr "(sekund)"
#. TRANSLATORS: this is The command line used to do the action
-#: ../client/pk-console.c:245
-#, fuzzy
+#. TRANSLATORS: the command line of the thing that wants the authentication
+#: ../client/pk-console.c:246
+#: ../src/pk-polkit-action-lookup.c:270
msgid "Command line"
-msgstr "PÅÃkaz selhal"
+msgstr "PÅÃkazový Åádek"
#. TRANSLATORS: this is the user ID of the user that started the action
-#: ../client/pk-console.c:247
+#: ../client/pk-console.c:248
msgid "User ID"
-msgstr ""
+msgstr "Uživatelské ID"
#. TRANSLATORS: this is the username, e.g. hughsie
-#: ../client/pk-console.c:254
+#: ../client/pk-console.c:255
msgid "Username"
-msgstr ""
+msgstr "Uživatelské jméno"
#. TRANSLATORS: this is the users real name, e.g. "Richard Hughes"
-#: ../client/pk-console.c:258
+#: ../client/pk-console.c:259
msgid "Real name"
-msgstr ""
+msgstr "SkuteÄné jméno"
-#: ../client/pk-console.c:266
+#: ../client/pk-console.c:267
#, fuzzy
msgid "Affected packages:"
msgstr "Aktualizovat balÃk"
-#: ../client/pk-console.c:268
+#: ../client/pk-console.c:269
msgid "Affected packages: None"
msgstr ""
#. TRANSLATORS: this is the distro, e.g. Fedora 10
-#: ../client/pk-console.c:293
+#: ../client/pk-console.c:294
msgid "Distribution"
-msgstr ""
+msgstr "Distribuce"
#. TRANSLATORS: this is type of update, stable or testing
-#: ../client/pk-console.c:295
+#: ../client/pk-console.c:296
msgid "Type"
-msgstr ""
+msgstr "Typ"
#. TRANSLATORS: this is any summary text describing the upgrade
#. TRANSLATORS: this is the summary of the group
-#: ../client/pk-console.c:297 ../client/pk-console.c:319
+#: ../client/pk-console.c:298
+#: ../client/pk-console.c:321
msgid "Summary"
-msgstr ""
+msgstr "Souhrn"
#. TRANSLATORS: this is the group category name
-#: ../client/pk-console.c:309
+#: ../client/pk-console.c:310
msgid "Category"
-msgstr ""
+msgstr "Kategorie"
#. TRANSLATORS: this is group identifier
-#: ../client/pk-console.c:311
+#: ../client/pk-console.c:312
msgid "ID"
-msgstr ""
+msgstr "ID"
#. TRANSLATORS: this is the parent group
-#: ../client/pk-console.c:314
+#: ../client/pk-console.c:315
msgid "Parent"
msgstr ""
-#: ../client/pk-console.c:316
+#. TRANSLATORS: this is the name of the parent group
+#: ../client/pk-console.c:318
msgid "Name"
-msgstr ""
+msgstr "Název"
#. TRANSLATORS: this is preferred icon for the group
-#: ../client/pk-console.c:322
+#: ../client/pk-console.c:324
msgid "Icon"
-msgstr ""
+msgstr "Ikona"
#. TRANSLATORS: this is a header for the package that can be updated
-#: ../client/pk-console.c:337
+#: ../client/pk-console.c:339
msgid "Details about the update:"
msgstr "Detaily o aktualizaci:"
-#: ../client/pk-console.c:338
-#, fuzzy
+#. TRANSLATORS: details about the update, package name and version
+#: ../client/pk-console.c:341
msgid "Package"
-msgstr "Soubory v balÃku"
+msgstr "BalÃk"
-#: ../client/pk-console.c:340
+#. TRANSLATORS: details about the update, any packages that this update updates
+#: ../client/pk-console.c:344
#, fuzzy
msgid "Updates"
msgstr "Aktualizovat balÃk"
-#: ../client/pk-console.c:342
+#. TRANSLATORS: details about the update, any packages that this update obsoletes
+#: ../client/pk-console.c:348
msgid "Obsoletes"
-msgstr ""
+msgstr "Zastarává"
-#: ../client/pk-console.c:344
+#. TRANSLATORS: details about the update, the vendor URLs
+#: ../client/pk-console.c:352
msgid "Vendor"
-msgstr ""
+msgstr "Výrobce"
-#: ../client/pk-console.c:346
+#. TRANSLATORS: details about the update, the bugzilla URLs
+#: ../client/pk-console.c:356
msgid "Bugzilla"
-msgstr ""
+msgstr "Bugzilla"
-#: ../client/pk-console.c:348
+#. TRANSLATORS: details about the update, the CVE URLs
+#: ../client/pk-console.c:360
msgid "CVE"
-msgstr ""
+msgstr "CVE"
-#: ../client/pk-console.c:350
+#. TRANSLATORS: details about the update, if the package requires a restart
+#: ../client/pk-console.c:364
msgid "Restart"
-msgstr ""
+msgstr "Restart"
-#: ../client/pk-console.c:352
+#. TRANSLATORS: details about the update, any description of the update
+#: ../client/pk-console.c:368
#, fuzzy
msgid "Update text"
msgstr "Aktualizovat podrobnosti"
-#: ../client/pk-console.c:354
+#. TRANSLATORS: details about the update, the changelog for the package
+#: ../client/pk-console.c:372
msgid "Changes"
msgstr ""
-#: ../client/pk-console.c:356
+#. TRANSLATORS: details about the update, the ongoing state of the update
+#: ../client/pk-console.c:376
msgid "State"
-msgstr ""
+msgstr "Stav"
-#: ../client/pk-console.c:359
+#. TRANSLATORS: details about the update, date the update was issued
+#: ../client/pk-console.c:381
msgid "Issued"
msgstr ""
-#: ../client/pk-console.c:362
+#. TRANSLATORS: details about the update, date the update was updated
+#: ../client/pk-console.c:386
#, fuzzy
msgid "Updated"
msgstr "Aktualizovat podrobnosti"
-#: ../client/pk-console.c:448 ../client/pk-console.c:450
+#: ../client/pk-console.c:473
+#: ../client/pk-console.c:475
msgid "Percentage"
msgstr ""
-#: ../client/pk-console.c:450
+#: ../client/pk-console.c:475
msgid "Unknown"
-msgstr ""
+msgstr "Neznámý"
#. TRANSLATORS: a package requires the system to be restarted
-#: ../client/pk-console.c:501
+#: ../client/pk-console.c:517
#, fuzzy
msgid "System restart required by:"
msgstr "Je požadován restart systému"
#. TRANSLATORS: a package requires the session to be restarted
-#: ../client/pk-console.c:504
+#: ../client/pk-console.c:520
#, fuzzy
msgid "Session restart required:"
msgstr "Je požadován restart systému"
#. TRANSLATORS: a package requires the application to be restarted
-#: ../client/pk-console.c:507
+#: ../client/pk-console.c:523
#, fuzzy
msgid "Application restart required by:"
msgstr "Je vyžadován restart aplikace"
-#: ../client/pk-console.c:543
+#. TRANSLATORS: a package needs to restart they system
+#: ../client/pk-console.c:578
msgid "Please restart the computer to complete the update."
msgstr "ProsÃm restartujte poÄÃtaÄ pro dokonÄenà aktualizace."
-#: ../client/pk-console.c:545
+#. TRANSLATORS: a package needs to restart the session
+#: ../client/pk-console.c:581
msgid "Please logout and login to complete the update."
msgstr "ProsÃm odhlaste se a znovu se pÅihlaÅ¡te pro dokonÄenà aktualizace."
-#: ../client/pk-console.c:547
+#. TRANSLATORS: a package needs to restart the application
+#: ../client/pk-console.c:584
msgid "Please restart the application as it is being used."
msgstr "ProsÃm restartujte aplikaci, protože je právÄ použÃvána."
#. TRANSLATORS: The package is already installed on the system
-#: ../client/pk-console.c:659
+#: ../client/pk-console.c:711
#, fuzzy, c-format
msgid "The package %s is already installed"
msgstr "BalÃk '%s' je již nainstalován"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:667
+#: ../client/pk-console.c:719
#, fuzzy, c-format
msgid "The package %s could not be installed: %s"
msgstr "BalÃk '%s' nemůže být nainstalován: %s"
#. TRANSLATORS: There was a programming error that shouldn't happen. The detailed error follows
-#: ../client/pk-console.c:692 ../client/pk-console.c:719
-#: ../client/pk-console.c:815 ../client/pk-console.c:932
-#: ../client/pk-tools-common.c:61 ../client/pk-tools-common.c:79
-#: ../client/pk-tools-common.c:86
+#: ../client/pk-console.c:744
+#: ../client/pk-console.c:767
+#: ../client/pk-console.c:863
+#: ../client/pk-console.c:980
+#: ../client/pk-tools-common.c:62
+#: ../client/pk-tools-common.c:81
+#: ../client/pk-tools-common.c:89
#, c-format
msgid "Internal error: %s"
msgstr "Internà chyba: %s"
#. TRANSLATORS: There was an error installing the packages. The detailed error follows
-#: ../client/pk-console.c:700 ../client/pk-console.c:1327
+#: ../client/pk-console.c:752
+#: ../client/pk-console.c:1376
#, c-format
msgid "This tool could not install the packages: %s"
msgstr "Tento nástroj nenà schopen nainstalovat balÃky: %s"
#. TRANSLATORS: There was an error installing the files. The detailed error follows
-#: ../client/pk-console.c:727
+#: ../client/pk-console.c:775
#, c-format
msgid "This tool could not install the files: %s"
msgstr "Tento nástroj nenà schopen nainstalovat soubory: %s"
#. TRANSLATORS: The package name was not found in the installed list. The detailed error follows
-#: ../client/pk-console.c:783
+#: ../client/pk-console.c:831
#, fuzzy, c-format
msgid "This tool could not remove %s: %s"
msgstr "Tento nástroj nemůže odstranit '%s': %s"
#. TRANSLATORS: There was an error removing the packages. The detailed error follows
-#: ../client/pk-console.c:806 ../client/pk-console.c:844
-#: ../client/pk-console.c:877
+#: ../client/pk-console.c:854
+#: ../client/pk-console.c:892
+#: ../client/pk-console.c:925
#, c-format
msgid "This tool could not remove the packages: %s"
msgstr "Tento nástroj nemůže odstranit balÃky: %s"
#. TRANSLATORS: When removing, we might have to remove other dependencies
-#: ../client/pk-console.c:856
+#: ../client/pk-console.c:904
msgid "The following packages have to be removed:"
msgstr "NásledujÃcà balÃky musà být odstranÄny:"
#. TRANSLATORS: We are checking if it's okay to remove a list of packages
-#: ../client/pk-console.c:863
+#: ../client/pk-console.c:911
msgid "Proceed removing additional packages?"
msgstr "SouhlasÃte s odstranÄnÃm doplÅkových balÃků? "
#. TRANSLATORS: We did not remove any packages
-#: ../client/pk-console.c:868
+#: ../client/pk-console.c:916
msgid "The package removal was canceled!"
msgstr "OdstranÄnà baliÄku bylo zruÅ¡eno!"
#. TRANSLATORS: The package name was not found in any software sources
-#: ../client/pk-console.c:909
+#: ../client/pk-console.c:957
#, fuzzy, c-format
msgid "This tool could not download the package %s as it could not be found"
msgstr "Tento nástroj nemůže stáhnout balÃk '%s', protože nemůže být nalezen"
#. TRANSLATORS: Could not download the packages for some reason. The detailed error follows
-#: ../client/pk-console.c:940
+#: ../client/pk-console.c:988
#, c-format
msgid "This tool could not download the packages: %s"
msgstr "Tento nástroj nemůže stáhnout balÃky: %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:967 ../client/pk-console.c:976
+#: ../client/pk-console.c:1015
+#: ../client/pk-console.c:1024
#, fuzzy, c-format
msgid "This tool could not update %s: %s"
msgstr "Tento nástroj nemůže aktualizovat '%s': %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:998 ../client/pk-console.c:1006
+#: ../client/pk-console.c:1046
+#: ../client/pk-console.c:1054
#, fuzzy, c-format
msgid "This tool could not get the requirements for %s: %s"
msgstr "Tento nástroj nemůže zÃskat požadavky pro '%s': %s"
#. TRANSLATORS: There was an error getting the dependencies for the package. The detailed error follows
-#: ../client/pk-console.c:1028 ../client/pk-console.c:1036
+#: ../client/pk-console.c:1076
+#: ../client/pk-console.c:1084
#, fuzzy, c-format
msgid "This tool could not get the dependencies for %s: %s"
msgstr "Tento nástroj nemůže zÃskat závislosti pro '%s': %s"
#. TRANSLATORS: There was an error getting the details about the package. The detailed error follows
-#: ../client/pk-console.c:1058 ../client/pk-console.c:1066
+#: ../client/pk-console.c:1106
+#: ../client/pk-console.c:1114
#, fuzzy, c-format
msgid "This tool could not get package details for %s: %s"
msgstr "Tento nástroj nemůže zÃskat detaily o '%s': %s"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:1088
+#: ../client/pk-console.c:1136
#, fuzzy, c-format
msgid "This tool could not find the files for %s: %s"
msgstr "Tento nástroj nemůže najÃt soubory pro '%s': %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:1096
+#: ../client/pk-console.c:1144
#, fuzzy, c-format
msgid "This tool could not get the file list for %s: %s"
msgstr "Tento nástroj nemůže zÃskat seznam souborů pro '%s': %s"
#. TRANSLATORS: There was an error getting the list of packages. The filename follows
-#: ../client/pk-console.c:1118
+#: ../client/pk-console.c:1166
#, c-format
msgid "File already exists: %s"
-msgstr ""
+msgstr "Soubor již existuje: %s"
#. TRANSLATORS: follows a list of packages to install
-#: ../client/pk-console.c:1123 ../client/pk-console.c:1179
-#: ../client/pk-console.c:1254
-#, fuzzy
+#: ../client/pk-console.c:1171
+#: ../client/pk-console.c:1227
+#: ../client/pk-console.c:1302
msgid "Getting package list"
-msgstr "Zjišťuji informace o balÃcÃch..."
+msgstr "ZÃskávám seznam balÃků"
#. TRANSLATORS: There was an error getting the list of packages. The detailed error follows
-#: ../client/pk-console.c:1129 ../client/pk-console.c:1185
-#: ../client/pk-console.c:1260
+#: ../client/pk-console.c:1177
+#: ../client/pk-console.c:1233
+#: ../client/pk-console.c:1308
#, fuzzy, c-format
msgid "This tool could not get package list: %s"
msgstr "Tento nástroj nemůže odstranit balÃky: %s"
#. TRANSLATORS: There was an error saving the list
-#: ../client/pk-console.c:1140
-#, fuzzy, c-format
+#: ../client/pk-console.c:1188
+#, c-format
msgid "Failed to save to disk"
-msgstr "NepodaÅilo se zÃskat poslednà Äas"
+msgstr "Selhalo uloženà na disk"
#. TRANSLATORS: There was an error getting the list. The filename follows
-#: ../client/pk-console.c:1174 ../client/pk-console.c:1249
+#: ../client/pk-console.c:1222
+#: ../client/pk-console.c:1297
#, c-format
msgid "File does not exist: %s"
-msgstr ""
+msgstr "Soubor neexistuje: %s"
#. TRANSLATORS: header to a list of packages newly added
-#: ../client/pk-console.c:1206
+#: ../client/pk-console.c:1254
#, fuzzy
msgid "Packages to add"
msgstr "PackageKit Monitor"
#. TRANSLATORS: header to a list of packages removed
-#: ../client/pk-console.c:1214
+#: ../client/pk-console.c:1262
#, fuzzy
msgid "Packages to remove"
msgstr "Služba PackageKit"
#. TRANSLATORS: We didn't find any differences
-#: ../client/pk-console.c:1282
+#: ../client/pk-console.c:1330
#, fuzzy, c-format
msgid "No new packages need to be installed"
msgstr "BalÃk '%s' nemůže být nainstalován: %s"
#. TRANSLATORS: follows a list of packages to install
-#: ../client/pk-console.c:1288
+#: ../client/pk-console.c:1336
msgid "To install"
msgstr ""
#. TRANSLATORS: searching takes some time....
-#: ../client/pk-console.c:1299
+#: ../client/pk-console.c:1348
msgid "Searching for package: "
msgstr ""
#. TRANSLATORS: package was not found -- this is the end of a string ended in ...
-#: ../client/pk-console.c:1303
+#: ../client/pk-console.c:1352
#, fuzzy
msgid "not found."
msgstr "AdresáŠnenalezen"
#. TRANSLATORS: We didn't find any packages to install
-#: ../client/pk-console.c:1314
+#: ../client/pk-console.c:1363
#, fuzzy, c-format
msgid "No packages can be found to install"
msgstr "Pro váš systém nebyly nalezeny žádné balÃky"
#. TRANSLATORS: installing new packages from package list
-#: ../client/pk-console.c:1320
-#, fuzzy
+#. TRANSLATORS: we are now installing the debuginfo packages we found earlier
+#: ../client/pk-console.c:1369
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:868
+#, fuzzy, c-format
msgid "Installing packages"
msgstr "Nainstalovat balÃk"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:1356
+#: ../client/pk-console.c:1405
#, fuzzy, c-format
msgid "This tool could not find the update details for %s: %s"
msgstr "Tento nástroj nemůže najÃt podrobnosti o aktualizaci pro '%s': %s"
#. TRANSLATORS: There was an error getting the details about the update for the package. The detailed error follows
-#: ../client/pk-console.c:1364
+#: ../client/pk-console.c:1413
#, fuzzy, c-format
msgid "This tool could not get the update details for %s: %s"
msgstr "Tento nástroj nemůže zÃskat podrobnosti o aktualizaci pro '%s': %s"
#. TRANSLATORS: This was an unhandled error, and we don't have _any_ context
-#: ../client/pk-console.c:1410
+#: ../client/pk-console.c:1444
msgid "Error:"
msgstr "Chyba: "
#. TRANSLATORS: This a list of details about the package
-#: ../client/pk-console.c:1424
+#: ../client/pk-console.c:1458
msgid "Package description"
msgstr "Popis balÃku"
+#. TRANSLATORS: This a message (like a little note that may be of interest) from the transaction
+#: ../client/pk-console.c:1474
+msgid "Message:"
+msgstr "Zpráva:"
+
#. TRANSLATORS: This a list files contained in the package
-#: ../client/pk-console.c:1458
+#: ../client/pk-console.c:1502
msgid "Package files"
msgstr "Soubory v balÃku"
#. TRANSLATORS: This where the package has no files
-#: ../client/pk-console.c:1466
+#: ../client/pk-console.c:1510
msgid "No files"
msgstr "Žádné soubory"
#. TRANSLATORS: This a request for a GPG key signature from the backend, which the client will prompt for later
-#: ../client/pk-console.c:1489
+#: ../client/pk-console.c:1533
msgid "Repository signature required"
msgstr "Vyžaduje podpis repozitáÅe"
#. TRANSLATORS: This a prompt asking the user to import the security key
-#: ../client/pk-console.c:1499
+#: ../client/pk-console.c:1543
#, fuzzy
msgid "Do you accept this signature?"
msgstr "PÅÃjÃmáte tento podpis?"
#. TRANSLATORS: This is where the user declined the security key
-#: ../client/pk-console.c:1503
+#: ../client/pk-console.c:1547
msgid "The signature was not accepted."
msgstr "Podpis nebyl pÅijat."
#. TRANSLATORS: This a request for a EULA
-#: ../client/pk-console.c:1537
+#: ../client/pk-console.c:1581
msgid "End user license agreement required"
msgstr "Vyžaduje souhlas s licencà koncového uživatele"
#. TRANSLATORS: This a prompt asking the user to agree to the license
-#: ../client/pk-console.c:1544
+#: ../client/pk-console.c:1588
msgid "Do you agree to this license?"
msgstr "SouhlasÃte s touto licencÃ?"
#. TRANSLATORS: This is where the user declined the license
-#: ../client/pk-console.c:1548
+#: ../client/pk-console.c:1592
msgid "The license was refused."
msgstr "Licence byla odmÃtnuta."
#. TRANSLATORS: This is when the daemon crashed, and we are up shit creek without a paddle
-#: ../client/pk-console.c:1577
+#: ../client/pk-console.c:1621
msgid "The daemon crashed mid-transaction!"
msgstr "Démon havaroval bÄhem Äinnosti!"
#. TRANSLATORS: This is the header to the --help menu
-#: ../client/pk-console.c:1630
+#: ../client/pk-console.c:1674
msgid "PackageKit Console Interface"
msgstr "Konzolové rozhranà PackageKitu"
-#: ../client/pk-console.c:1630
+#. these are commands we can use with pkcon
+#: ../client/pk-console.c:1676
msgid "Subcommands:"
msgstr "DÃlÄÃ pÅÃkazy:"
-#: ../client/pk-console.c:1719 ../client/pk-generate-pack.c:184
-#: ../client/pk-monitor.c:115
-#: ../contrib/command-not-found/pk-command-not-found.c:510
-#: ../src/pk-main.c:192
+#. TRANSLATORS: command line argument, if we should show debugging information
+#. TRANSLATORS: if we should show debugging data
+#: ../client/pk-console.c:1768
+#: ../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
+#: ../src/pk-main.c:211
msgid "Show extra debugging information"
msgstr "Zobrazit dodateÄné ladÃcà informace"
-#: ../client/pk-console.c:1721 ../client/pk-monitor.c:117
+#. TRANSLATORS: command line argument, just show the version string
+#: ../client/pk-console.c:1771
+#: ../client/pk-monitor.c:127
msgid "Show the program version and exit"
msgstr "Zobrazit verzi programu a ukonÄit se"
-#: ../client/pk-console.c:1723
+#. TRANSLATORS: command line argument, use a filter to narrow down results
+#: ../client/pk-console.c:1774
msgid "Set the filter, e.g. installed"
msgstr "Nastavit filtr, napÅ. nainstalované"
-#: ../client/pk-console.c:1725
+#. TRANSLATORS: command line argument, work asynchronously
+#: ../client/pk-console.c:1777
msgid "Exit without waiting for actions to complete"
msgstr "UkonÄit bez varovanà o nedokonÄených akcÃch"
#. TRANSLATORS: This is when we could not connect to the system bus, and is fatal
-#: ../client/pk-console.c:1752
+#: ../client/pk-console.c:1804
msgid "This tool could not connect to system DBUS."
msgstr "Tento nástroj se nemůže pÅipojit k systému DBUS"
#. TRANSLATORS: The user specified an incorrect filter
-#: ../client/pk-console.c:1839
+#: ../client/pk-console.c:1893
msgid "The filter specified was invalid"
msgstr ""
-#: ../client/pk-console.c:1856
-msgid "You need to specify a search type, e.g. name"
-msgstr "Je nutné stanovit typ vyhledávánÃ, napÅ. jméno"
+#. TRANSLATORS: a search type can be name, details, file, etc
+#: ../client/pk-console.c:1911
+msgid "A search type is required, e.g. name"
+msgstr ""
-#: ../client/pk-console.c:1861 ../client/pk-console.c:1868
-#: ../client/pk-console.c:1875 ../client/pk-console.c:1882
-#: ../client/pk-console.c:1990 ../client/pk-console.c:2000
-#: ../client/pk-console.c:2007 ../client/pk-console.c:2014
-msgid "You need to specify a search term"
-msgstr "Je nutné uvést termÃn, který se bude hledat"
+#. TRANSLATORS: the user needs to provide a search term
+#: ../client/pk-console.c:1917
+#: ../client/pk-console.c:1925
+#: ../client/pk-console.c:1933
+#: ../client/pk-console.c:1941
+msgid "A search term is required"
+msgstr ""
-#: ../client/pk-console.c:1887
+#. TRANSLATORS: the search type was provided, but invalid
+#: ../client/pk-console.c:1947
msgid "Invalid search type"
msgstr "Neplatný typ vyhledávánÃ"
-#: ../client/pk-console.c:1892
-msgid "You need to specify a package or file to install"
-msgstr "Vyberte balÃk nebo soubor, která se bude instalovat"
+#. TRANSLATORS: the user did not specify what they wanted to install
+#: ../client/pk-console.c:1953
+msgid "A package name or filename to install is required"
+msgstr ""
-#: ../client/pk-console.c:1899
-msgid "You need to specify a type, key_id and package_id"
+#. TRANSLATORS: geeky error, 99.9999% of users won't see this
+#: ../client/pk-console.c:1961
+#, fuzzy
+msgid "A type, key_id and package_id are required"
msgstr "Je nutné urÄit typ, key_id a package_id"
-#: ../client/pk-console.c:1906
-msgid "You need to specify a package to remove"
-msgstr "Vyberte balÃk, který se má odstranit"
+#. TRANSLATORS: the user did not specify what they wanted to remove
+#: ../client/pk-console.c:1969
+#, fuzzy
+msgid "A package name to remove is required"
+msgstr "NásledujÃcà balÃky musà být odstranÄny"
-#: ../client/pk-console.c:1912
-msgid ""
-"You need to specify the destination directory and then the packages to "
-"download"
+#. TRANSLATORS: the user did not specify anything about what to download or where
+#: ../client/pk-console.c:1976
+#, fuzzy
+msgid "A destination directory and then the package names to download are required"
msgstr "Je nutné urÄit cÃlový adresáŠa poté balÃk, který se má stáhnout"
-#: ../client/pk-console.c:1917
+#. TRANSLATORS: the directory does not exist, so we can't continue
+#: ../client/pk-console.c:1982
msgid "Directory not found"
msgstr "AdresáŠnenalezen"
-#: ../client/pk-console.c:1923
-msgid "You need to specify a licence identifier (eula-id)"
+#. TRANSLATORS: geeky error, 99.9999% of users won't see this
+#: ../client/pk-console.c:1989
+#, fuzzy
+msgid "A licence identifier (eula-id) is required"
msgstr "MusÃte zadat identifikaci licence (eula-id)"
-#: ../client/pk-console.c:1939
-msgid "You need to specify a package name to resolve"
-msgstr "K vyÅeÅ¡enà je nutné uvést název balÃku"
+#. TRANSLATORS: geeky error, 99.9999% of users won't see this
+#: ../client/pk-console.c:1998
+msgid "A transaction identifier (tid) is required"
+msgstr ""
+
+#. TRANSLATORS: The user did not specify a package name
+#: ../client/pk-console.c:2014
+#, fuzzy
+msgid "A package name to resolve is required"
+msgstr "NásledujÃcà balÃky musà být odstranÄny"
-#: ../client/pk-console.c:1946 ../client/pk-console.c:1953
-msgid "You need to specify a repository name"
-msgstr "Je nutné zadat název repozitáÅe"
+#. TRANSLATORS: The user did not specify a repository (software source) name
+#: ../client/pk-console.c:2022
+#: ../client/pk-console.c:2030
+#, fuzzy
+msgid "A repository name is required"
+msgstr "Vyžaduje podpis repozitáÅe"
-#: ../client/pk-console.c:1960
-msgid "You need to specify a repo name/parameter and value"
+#. TRANSLATORS: The user didn't provide any data
+#: ../client/pk-console.c:2038
+#, fuzzy
+msgid "A repo name, parameter and value are required"
msgstr "Je nutné urÄit název/parametr a hodnotu repozitáÅe"
-#: ../client/pk-console.c:1972
-msgid "You need to specify an action, e.g. 'update-system'"
+#. TRANSLATORS: The user didn't specify what action to use
+#: ../client/pk-console.c:2051
+#, fuzzy
+msgid "An action, e.g. 'update-system' is required"
msgstr "Je nutné zadat akci, napÅ. 'update-system'"
-#: ../client/pk-console.c:1977
-msgid "You need to specify a correct role"
-msgstr "Je nutné urÄit správnou roli"
-
-#: ../client/pk-console.c:1982
-msgid "Failed to get last time"
-msgstr "NepodaÅilo se zÃskat poslednà Äas"
+#. TRANSLATORS: The user specified an invalid action
+#: ../client/pk-console.c:2057
+#, fuzzy
+msgid "A correct role is required"
+msgstr "Je požadováno odhlášenà a pÅihlášenÃ"
-#: ../client/pk-console.c:2021
-msgid "You need to specify a package to find the details for"
-msgstr "Je nutné urÄit balÃk, pro který se majà najÃt podrobnosti"
+#. TRANSLATORS: we keep a database updated with the time that an action was last executed
+#: ../client/pk-console.c:2063
+msgid "Failed to get the time since this action was last completed"
+msgstr ""
-#: ../client/pk-console.c:2028
-msgid "You need to specify a package to find the files for"
-msgstr "Je nutné urÄit balÃk, pro který se majà najÃt soubory"
+#. 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:2072
+#: ../client/pk-console.c:2083
+#: ../client/pk-console.c:2091
+#: ../client/pk-console.c:2107
+#: ../client/pk-console.c:2115
+#: ../client/pk-generate-pack.c:241
+#, fuzzy
+msgid "A package name is required"
+msgstr "Je požadováno odhlášenà a pÅihlášenÃ"
-#: ../client/pk-console.c:2035
+#. TRANSLATORS: each package "provides" certain things, e.g. mime(gstreamer-decoder-mp3), the user didn't specify it
+#: ../client/pk-console.c:2099
#, fuzzy
-msgid "You need to specify a list file to create"
-msgstr "Je nutné urÄit Äasový termÃn"
+msgid "A package provide string is required"
+msgstr "Je požadováno odhlášenà a pÅihlášenÃ"
-#: ../client/pk-console.c:2043 ../client/pk-console.c:2051
+#. TRANSLATORS: The user didn't specify a filename to create as a list
+#: ../client/pk-console.c:2123
+msgid "A list file name to create is required"
+msgstr ""
+
+#. TRANSLATORS: The user didn't specify a filename to open as a list
+#: ../client/pk-console.c:2132
+#: ../client/pk-console.c:2141
#, fuzzy
-msgid "You need to specify a list file to open"
-msgstr "Je nutné urÄit Äasový termÃn"
+msgid "A list file to open is required"
+msgstr "Je požadováno odhlášenà a pÅihlášenÃ"
#. TRANSLATORS: The user tried to use an unsupported option on the command line
-#: ../client/pk-console.c:2104
+#: ../client/pk-console.c:2194
#, c-format
msgid "Option '%s' is not supported"
msgstr "Volba '%s' nenà podporována "
#. TRANSLATORS: User does not have permission to do this
-#: ../client/pk-console.c:2117
-msgid "You don't have the necessary privileges for this operation"
+#: ../client/pk-console.c:2207
+#, fuzzy
+msgid "Incorrect privileges for this operation"
msgstr "Nemáte nezbytné oprávnÄnà pro tuto operaci"
#. TRANSLATORS: Generic failure of what they asked to do
-#: ../client/pk-console.c:2120
+#: ../client/pk-console.c:2210
msgid "Command failed"
msgstr "PÅÃkaz selhal"
#. TRANSLATORS: This is the state of the transaction
-#: ../client/pk-generate-pack.c:100
+#: ../client/pk-generate-pack.c:101
msgid "Downloading"
msgstr "Stahuji"
#. TRANSLATORS: This is when the main packages are being downloaded
-#: ../client/pk-generate-pack.c:120
-#, fuzzy
+#: ../client/pk-generate-pack.c:121
msgid "Downloading packages"
-msgstr "Stahuji"
+msgstr "Stahuji balÃky"
#. TRANSLATORS: This is when the dependency packages are being downloaded
-#: ../client/pk-generate-pack.c:125
-#, fuzzy
+#: ../client/pk-generate-pack.c:126
msgid "Downloading dependencies"
-msgstr "Stahuji"
+msgstr "Stahuji závislosti"
-#: ../client/pk-generate-pack.c:186
+#. TRANSLATORS: we can exclude certain packages (glibc) when we know they'll exist on the target
+#: ../client/pk-generate-pack.c:188
msgid "Set the file name of dependencies to be excluded"
msgstr "Nastavte soubor se závislostmi, které majà být vynechány"
-#: ../client/pk-generate-pack.c:188
-msgid "The output directory (the current directory is used if ommitted)"
+#. TRANSLATORS: the output location
+#: ../client/pk-generate-pack.c:191
+#, fuzzy
+msgid "The output file or directory (the current directory is used if ommitted)"
msgstr "Výstupnà adresáŠ(aktuálnà adresáÅ, pokud nenà žádný uveden)"
-#: ../client/pk-generate-pack.c:190
+#. TRANSLATORS: put a list of packages in the pack
+#: ../client/pk-generate-pack.c:194
msgid "The package to be put into the service pack"
msgstr "BalÃky zahrnuté do servisnÃho balÃku"
-#: ../client/pk-generate-pack.c:192
+#. TRANSLATORS: put all pending updates in the pack
+#: ../client/pk-generate-pack.c:197
msgid "Put all updates available in the service pack"
msgstr "PÅidej dostupné aktualizace do servisnÃho balÃku"
#. TRANSLATORS: This is when the user fails to supply the correct arguments
-#: ../client/pk-generate-pack.c:220
+#: ../client/pk-generate-pack.c:225
msgid "Neither --package or --updates option selected."
msgstr "Nebylo vybráno ani --package ani --updates."
#. TRANSLATORS: This is when the user fails to supply just one argument
-#: ../client/pk-generate-pack.c:228
+#: ../client/pk-generate-pack.c:233
msgid "Both options selected."
msgstr "ObÄ volby vybrány."
+#. TRANSLATORS: This is when the user fails to supply the output
+#: ../client/pk-generate-pack.c:249
+#, fuzzy
+msgid "A output directory or file name is required"
+msgstr "Je požadováno odhlášenà a pÅihlášenÃ"
+
+#. TRANSLATORS: This is when the backend doesn't have the capability to get-depends
+#. TRANSLATORS: This is when the backend doesn't have the capability to download
+#: ../client/pk-generate-pack.c:267
+#: ../client/pk-generate-pack.c:273
+msgid "The package manager cannot perform this type of operation."
+msgstr ""
+
+#. TRANSLATORS: This is when the distro didn't include libarchive support into PK
+#: ../client/pk-generate-pack.c:280
+msgid "Service packs cannot be created as PackageKit was not built with libarchive support."
+msgstr ""
+
+#. TRANSLATORS: the user specified an absolute path, but didn't get the extension correct
+#: ../client/pk-generate-pack.c:291
+msgid "If specifying a file, the service pack name must end with"
+msgstr ""
+
#. TRANSLATORS: This is when file already exists
-#: ../client/pk-generate-pack.c:261
+#: ../client/pk-generate-pack.c:307
msgid "A pack with the same name already exists, do you want to overwrite it?"
msgstr "BalÃk se stejným jménem už existuje, chcete jej pÅepsat?"
#. TRANSLATORS: This is when the pack was not overwritten
-#: ../client/pk-generate-pack.c:264
+#: ../client/pk-generate-pack.c:310
msgid "The pack was not overwritten."
msgstr "BalÃk nebyl pÅepsán."
#. TRANSLATORS: This is when the temporary directory cannot be created, the directory name follows
-#: ../client/pk-generate-pack.c:276
+#: ../client/pk-generate-pack.c:323
msgid "Failed to create directory:"
msgstr "NepodaÅilo se vytvoÅit adresáÅ."
#. TRANSLATORS: This is when the list of packages from the remote computer cannot be opened
-#: ../client/pk-generate-pack.c:285
+#: ../client/pk-generate-pack.c:333
msgid "Failed to open package list."
msgstr "NepodaÅilo se otevÅÃt seznam balÃku."
#. TRANSLATORS: The package name is being matched up to available packages
-#: ../client/pk-generate-pack.c:295
+#: ../client/pk-generate-pack.c:344
msgid "Finding package name."
msgstr "Hledám jméno balÃku."
#. TRANSLATORS: This is when the package cannot be found in any software source. The detailed error follows
-#: ../client/pk-generate-pack.c:299
+#: ../client/pk-generate-pack.c:348
#, c-format
msgid "Failed to find package '%s': %s"
msgstr "Nemohu najÃt balÃk '%s': %s"
#. TRANSLATORS: This is telling the user we are in the process of making the pack
-#: ../client/pk-generate-pack.c:315
+#: ../client/pk-generate-pack.c:365
msgid "Creating service pack..."
msgstr "VytváÅÃm servisnà balÃk..."
#. TRANSLATORS: we succeeded in making the file
-#: ../client/pk-generate-pack.c:322
+#: ../client/pk-generate-pack.c:372
#, c-format
msgid "Service pack created '%s'"
msgstr "Servisnà balÃk vytvoÅen '%s'"
#. TRANSLATORS: we failed to make te file
-#: ../client/pk-generate-pack.c:326
+#: ../client/pk-generate-pack.c:377
#, c-format
msgid "Failed to create '%s': %s"
msgstr "Nemohu vytvoÅit '%s': %s"
-#: ../client/pk-monitor.c:132
+#. TRANSLATORS: this is a program that monitors PackageKit
+#: ../client/pk-monitor.c:143
msgid "PackageKit Monitor"
msgstr "PackageKit Monitor"
#. TRANSLATORS: The package was not found in any software sources
-#: ../client/pk-tools-common.c:114
+#: ../client/pk-tools-common.c:118
#, c-format
msgid "The package could not be found"
msgstr "BalÃk nebyl nalezen."
#. TRANSLATORS: more than one package could be found that matched, to follow is a list of possible packages
-#: ../client/pk-tools-common.c:125
+#: ../client/pk-tools-common.c:130
msgid "More than one package matches:"
msgstr "Danému výrazu odpovÃdá vÃce balÃků:"
#. TRANSLATORS: This finds out which package in the list to use
-#: ../client/pk-tools-common.c:132
+#: ../client/pk-tools-common.c:137
msgid "Please choose the correct package: "
msgstr "ProsÃm vyberte správný balÃk: "
-#: ../client/pk-tools-common.c:157
+#: ../client/pk-tools-common.c:162
#, c-format
msgid "Please enter a number from 1 to %i: "
msgstr "ProsÃm zadejte ÄÃslo od 1 do %i: "
#. TRANSLATORS: we failed to find the package, this shouldn't happen
-#: ../contrib/command-not-found/pk-command-not-found.c:361
+#: ../contrib/command-not-found/pk-command-not-found.c:372
#, fuzzy
msgid "Failed to search for file"
msgstr "NepodaÅilo se zÃskat poslednà Äas"
#. TRANSLATORS: we failed to launch the executable, the error follows
-#: ../contrib/command-not-found/pk-command-not-found.c:485
+#: ../contrib/command-not-found/pk-command-not-found.c:496
#, fuzzy
msgid "Failed to launch:"
msgstr "NepodaÅilo se zÃskat poslednà Äas"
#. TRANSLATORS: tool that gets called when the command is not found
-#: ../contrib/command-not-found/pk-command-not-found.c:526
+#: ../contrib/command-not-found/pk-command-not-found.c:537
#, fuzzy
msgid "PackageKit Command Not Found"
msgstr "PackageKit Monitor"
#. TRANSLATORS: the prefix of all the output telling the user why it's not executing
-#: ../contrib/command-not-found/pk-command-not-found.c:548
+#: ../contrib/command-not-found/pk-command-not-found.c:560
#, fuzzy
msgid "Command not found."
msgstr "AdresáŠnenalezen"
#. TRANSLATORS: tell the user what we think the command is
-#: ../contrib/command-not-found/pk-command-not-found.c:555
+#: ../contrib/command-not-found/pk-command-not-found.c:567
#, fuzzy
msgid "Similar command is:"
msgstr "DÃlÄÃ pÅÃkazy:"
#. TRANSLATORS: Ask the user if we should run the similar command
-#: ../contrib/command-not-found/pk-command-not-found.c:564
+#: ../contrib/command-not-found/pk-command-not-found.c:576
msgid "Run similar command:"
msgstr ""
#. 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:576
-#: ../contrib/command-not-found/pk-command-not-found.c:585
+#: ../contrib/command-not-found/pk-command-not-found.c:588
+#: ../contrib/command-not-found/pk-command-not-found.c:597
#, fuzzy
msgid "Similar commands are:"
msgstr "DÃlÄÃ pÅÃkazy:"
#. TRANSLATORS: ask the user to choose a file to run
-#: ../contrib/command-not-found/pk-command-not-found.c:592
+#: ../contrib/command-not-found/pk-command-not-found.c:604
msgid "Please choose a command to run"
msgstr ""
#. TRANSLATORS: tell the user what package provides the command
-#: ../contrib/command-not-found/pk-command-not-found.c:607
+#: ../contrib/command-not-found/pk-command-not-found.c:619
msgid "The package providing this file is:"
msgstr ""
#. TRANSLATORS: as the user if we want to install a package to provide the command
-#: ../contrib/command-not-found/pk-command-not-found.c:612
+#: ../contrib/command-not-found/pk-command-not-found.c:624
#, c-format
msgid "Install package '%s' to provide command '%s'?"
msgstr ""
#. TRANSLATORS: Show the user a list of packages that provide this command
-#: ../contrib/command-not-found/pk-command-not-found.c:633
+#: ../contrib/command-not-found/pk-command-not-found.c:645
msgid "Packages providing this file are:"
msgstr ""
#. 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:642
+#: ../contrib/command-not-found/pk-command-not-found.c:654
msgid "Suitable packages are:"
msgstr ""
#. get selection
#. TRANSLATORS: ask the user to choose a file to install
-#: ../contrib/command-not-found/pk-command-not-found.c:650
+#: ../contrib/command-not-found/pk-command-not-found.c:662
#, fuzzy
msgid "Please choose a package to install"
msgstr "Nemohu najÃt balÃk, který se má instalovat"
#. TRANSLATORS: when we are getting data from the daemon
-#: ../contrib/browser-plugin/src/contents.cpp:298
+#: ../contrib/browser-plugin/src/contents.cpp:299
msgid "Getting package information..."
msgstr "Zjišťuji informace o balÃcÃch..."
#. TRANSLATORS: run an applicaiton
-#: ../contrib/browser-plugin/src/contents.cpp:304
+#: ../contrib/browser-plugin/src/contents.cpp:305
#, c-format
msgid "Run %s"
msgstr "Spustit %s"
#. TRANSLATORS: show the installed version of a package
-#: ../contrib/browser-plugin/src/contents.cpp:310
+#: ../contrib/browser-plugin/src/contents.cpp:311
msgid "Installed version"
msgstr "Nainstalovaná verze"
#. TRANSLATORS: run the application now
-#: ../contrib/browser-plugin/src/contents.cpp:318
+#: ../contrib/browser-plugin/src/contents.cpp:319
#, c-format
msgid "Run version %s now"
msgstr "Spustit verzi %s"
-#: ../contrib/browser-plugin/src/contents.cpp:324
+#. TRANSLATORS: run the application now
+#: ../contrib/browser-plugin/src/contents.cpp:325
msgid "Run now"
msgstr "Spustit ihned"
#. TRANSLATORS: update to a new version of the package
-#: ../contrib/browser-plugin/src/contents.cpp:330
+#: ../contrib/browser-plugin/src/contents.cpp:331
#, c-format
msgid "Update to version %s"
msgstr "Aktualizovat na verzi %s"
#. TRANSLATORS: To install a package
-#: ../contrib/browser-plugin/src/contents.cpp:336
+#: ../contrib/browser-plugin/src/contents.cpp:337
#, c-format
msgid "Install %s now"
msgstr "Instalovat %s"
#. TRANSLATORS: the version of the package
-#: ../contrib/browser-plugin/src/contents.cpp:339
+#: ../contrib/browser-plugin/src/contents.cpp:340
msgid "Version"
msgstr "Verze"
#. TRANSLATORS: noting found, so can't install
-#: ../contrib/browser-plugin/src/contents.cpp:344
+#: ../contrib/browser-plugin/src/contents.cpp:345
msgid "No packages found for your system"
msgstr "Pro váš systém nebyly nalezeny žádné balÃky"
#. TRANSLATORS: package is being installed
-#: ../contrib/browser-plugin/src/contents.cpp:349
+#: ../contrib/browser-plugin/src/contents.cpp:350
msgid "Installing..."
msgstr "Instaluji..."
+#. TRANSLATORS: we are starting to install the packages
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:186
+msgid "Starting install"
+msgstr ""
+
+#. TRANSLATORS: we couldn't find the package name, non-fatal
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:379
+#, fuzzy, c-format
+msgid "Failed to find the package %s, or already installed: %s"
+msgstr "BalÃk '%s' je již nainstalován"
+
+#. command line argument, simulate what would be done, but don't actually do it
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:535
+msgid "Don't actually install any packages, only simulate what would be installed"
+msgstr ""
+
+#. command line argument, do we skip packages that depend on the ones specified
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:538
+msgid "Do not install dependencies of the core packages"
+msgstr ""
+
+#. command line argument, do we operate quietly
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:541
+msgid "Do not display information or progress"
+msgstr ""
+
+#. TRANSLATORS: tool that gets called when the command is not found
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:559
+#, fuzzy
+msgid "PackageKit Debuginfo Installer"
+msgstr "Konzolové rozhranà PackageKitu"
+
+#. TRANSLATORS: the use needs to specify a list of package names on the command line
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:571
+#, fuzzy, c-format
+msgid "ERROR: Specify package names to install."
+msgstr "Vyberte balÃk nebo soubor, která se bude instalovat"
+
+#. TRANSLATORS: we are getting the list of repositories
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:605
+#, fuzzy, c-format
+msgid "Getting sources list"
+msgstr "Zjišťuji informace o balÃcÃch..."
+
+#. 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
+#, c-format
+msgid "OK."
+msgstr "OK."
+
+#. TRANSLATORS: tell the user what we found
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:626
+#, c-format
+msgid "Found %i enabled and %i disabled sources."
+msgstr ""
+
+#. TRANSLATORS: we're finding repositories that match out pattern
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:633
+#, c-format
+msgid "Finding debugging sources"
+msgstr ""
+
+#. TRANSLATORS: tell the user what we found
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:666
+#, c-format
+msgid "Found %i disabled debuginfo repos."
+msgstr ""
+
+#. TRANSLATORS: we're now enabling all the debug sources we found
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:673
+#, c-format
+msgid "Enabling debugging sources"
+msgstr ""
+
+#. 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
+msgid "FAILED."
+msgstr "SELHALO."
+
+#. TRANSLATORS: tell the user how many we enabled
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:701
+#, c-format
+msgid "Enabled %i debugging sources."
+msgstr ""
+
+#. TRANSLATORS: we're now finding packages that match in all the repos
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:708
+#, fuzzy, c-format
+msgid "Finding debugging packages"
+msgstr "Hledám jméno balÃku."
+
+#. TRANSLATORS: we couldn't find the package name, non-fatal
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:720
+#, fuzzy, c-format
+msgid "Failed to find the package %s: %s"
+msgstr "Nemohu najÃt balÃk '%s': %s"
+
+#. TRANSLATORS: we couldn't find the debuginfo package name, non-fatal
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:743
+#, fuzzy, c-format
+msgid "Failed to find the debuginfo package %s: %s"
+msgstr "Nemohu najÃt balÃk '%s': %s"
+
+#. TRANSLATORS: no debuginfo packages could be found to be installed
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:771
+#, fuzzy, c-format
+msgid "Found no packages to install."
+msgstr "BalÃk '%s' nemůže být nainstalován: %s"
+
+#. TRANSLATORS: tell the user we found some packages, and then list them
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:785
+#, fuzzy, c-format
+msgid "Found %i packages:"
+msgstr "Stahuji"
+
+#. TRANSLATORS: tell the user we are searching for deps
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:801
+#, c-format
+msgid "Finding packages that depend on these packages"
+msgstr ""
+
+#. TRANSLATORS: could not install, detailed error follows
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:814
+#, fuzzy, c-format
+msgid "Could not find dependant packages: %s"
+msgstr "Nemohu najÃt odpovÃdajÃcà balÃk"
+
+#. TRANSLATORS: tell the user we found some more packages
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:830
+#, c-format
+msgid "Found %i extra packages."
+msgstr ""
+
+#. TRANSLATORS: tell the user we found some more packages
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:834
+#, fuzzy, c-format
+msgid "No extra packages required."
+msgstr "Nemohu zjistit, které balÃky jsou vyžadovány"
+
+#. TRANSLATORS: tell the user we found some packages (and deps), and then list them
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:843
+#, fuzzy, c-format
+msgid "Found %i packages to install:"
+msgstr "BalÃk '%s' nemůže být nainstalován: %s"
+
+#. TRANSLATORS: simulate mode is a testing mode where we quit before the action
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:856
+#, fuzzy, c-format
+msgid "Not installing packages in simulate mode"
+msgstr "Nainstalovat balÃk"
+
+#. TRANSLATORS: coul dnot install, detailed error follows
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:881
+#, fuzzy, c-format
+msgid "Could not install packages: %s"
+msgstr "Tento nástroj nenà schopen nainstalovat balÃky: %s"
+
+#. TRANSLATORS: we are now disabling all debuginfo repos we previously enabled
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:913
+#, c-format
+msgid "Disabling sources previously enabled"
+msgstr ""
+
+#. TRANSLATORS: no debuginfo packages could be found to be installed, detailed error follows
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:925
+#, c-format
+msgid "Could not disable the debugging sources: %s"
+msgstr ""
+
+#. TRANSLATORS: we disabled all the debugging repos that we enabled before
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:940
+#, c-format
+msgid "Disabled %i debugging sources."
+msgstr ""
+
#: ../data/packagekit-catalog.xml.in.h:1
msgid "PackageKit Catalog"
msgstr "PackageKit Katalog"
@@ -880,8 +1183,7 @@ msgstr "Pro pÅijetà licenÄnà smlouvy je vyžadováno oprávnÄnÃ"
#: ../policy/org.freedesktop.packagekit.policy.in.h:3
#, fuzzy
-msgid ""
-"Authentication is required to cancel a task that was not started by yourself"
+msgid "Authentication is required to cancel a task that was not started by yourself"
msgstr "Pro zmÄnu parametrů zdrojů softwaru je vyžádováno oprávnÄnÃ"
#: ../policy/org.freedesktop.packagekit.policy.in.h:4
@@ -890,9 +1192,7 @@ msgstr "Pro zmÄnu parametrů zdrojů softwaru je vyžádováno oprávnÄnÃ"
#: ../policy/org.freedesktop.packagekit.policy.in.h:5
#, fuzzy
-msgid ""
-"Authentication is required to consider a key used for signing packages as "
-"trusted"
+msgid "Authentication is required to consider a key used for signing packages as trusted"
msgstr "K obnovenà seznamů balÃků je vyžadováno oprávnÄnÃ"
#: ../policy/org.freedesktop.packagekit.policy.in.h:6
@@ -920,9 +1220,7 @@ msgstr "K vrácenà akce je vyžadováno oprávnÄnÃ"
#: ../policy/org.freedesktop.packagekit.policy.in.h:11
#, fuzzy
-msgid ""
-"Authentication is required to set the network proxy used for downloading "
-"packages"
+msgid "Authentication is required to set the network proxy used for downloading packages"
msgstr "K odstranÄnà balÃků je vyžadováno oprávnÄnÃ"
#: ../policy/org.freedesktop.packagekit.policy.in.h:12
@@ -938,14 +1236,12 @@ msgid "Change software source parameters"
msgstr "ZmÄnit parametry zdrojů softwaru"
#: ../policy/org.freedesktop.packagekit.policy.in.h:15
-#, fuzzy
msgid "Install signed package"
-msgstr "Nainstalovat balÃk"
+msgstr "Nainstalovat podepsaný balÃk"
#: ../policy/org.freedesktop.packagekit.policy.in.h:16
-#, fuzzy
msgid "Install untrusted local file"
-msgstr "Nainstalovat mÃstnà soubor"
+msgstr "Nainstalovat mÃstnà nedůvÄryhodný soubor"
#: ../policy/org.freedesktop.packagekit.policy.in.h:17
msgid "Refresh system sources"
@@ -961,7 +1257,7 @@ msgstr "Vrátit poslednà akci"
#: ../policy/org.freedesktop.packagekit.policy.in.h:20
msgid "Set network proxy"
-msgstr ""
+msgstr "Nastavit proxy sÃtÄ"
#: ../policy/org.freedesktop.packagekit.policy.in.h:21
msgid "Trust a key used for signing packages"
@@ -972,202 +1268,224 @@ msgstr ""
msgid "Update packages"
msgstr "Aktualizovat balÃk"
-#: ../src/pk-main.c:86
+#. TRANSLATORS: failed due to DBus security
+#: ../src/pk-main.c:87
msgid "Startup failed due to security policies on this machine."
msgstr "SpuÅ¡tÄnà selhalo kvůli bezpeÄnostà politice na tomto stroji"
-#: ../src/pk-main.c:87
+#. TRANSLATORS: only two ways this can fail...
+#: ../src/pk-main.c:89
msgid "This can happen for two reasons:"
msgstr "Toto se mohlo stát ze dvou důvodů:"
-#: ../src/pk-main.c:88
+#. TRANSLATORS: only allowed to be owned by root
+#: ../src/pk-main.c:91
msgid "The correct user is not launching the executable (usually root)"
msgstr "Aplikace nenà spuÅ¡tÄna pod správným uživatelem (obvykle superuživatel)"
-#: ../src/pk-main.c:89
-msgid ""
-"The org.freedesktop.PackageKit.conf file is not installed in the system "
-"directory:"
-msgstr ""
-"Soubor org.freedesktop.PackageKit.conf nenà nainstalován v systémovém "
-"adresáÅi:"
+#. TRANSLATORS: or we are installed in a prefix
+#: ../src/pk-main.c:93
+msgid "The org.freedesktop.PackageKit.conf file is not installed in the system directory:"
+msgstr "Soubor org.freedesktop.PackageKit.conf nenà nainstalován v systémovém adresáÅi:"
-#: ../src/pk-main.c:188
+#. TRANSLATORS: a backend is the system package tool, e.g. yum, apt
+#: ../src/pk-main.c:205
msgid "Packaging backend to use, e.g. dummy"
msgstr "BalÃÄkovacà systém, který se má použÃt, napÅ. dummy"
-#: ../src/pk-main.c:190
+#. TRANSLATORS: if we should run in the background
+#: ../src/pk-main.c:208
msgid "Daemonize and detach from the terminal"
msgstr "Spustit démona a odpojit od terminálu"
-#: ../src/pk-main.c:194
+#. TRANSLATORS: if we should not monitor how long we are inactive for
+#: ../src/pk-main.c:214
msgid "Disable the idle timer"
msgstr "Vypnout nevyužitý ÄasovaÄ"
-#: ../src/pk-main.c:196
+#. TRANSLATORS: show version
+#: ../src/pk-main.c:217
msgid "Show version and exit"
msgstr "Zobrazit verzi a ukonÄit se"
-#: ../src/pk-main.c:198
+#. TRANSLATORS: exit after we've started up, used for user profiling
+#: ../src/pk-main.c:220
msgid "Exit after a small delay"
msgstr "UkonÄit se s krátkým zpoždÄnÃm"
-#: ../src/pk-main.c:200
+#. TRANSLATORS: exit straight away, used for automatic profiling
+#: ../src/pk-main.c:223
msgid "Exit after the engine has loaded"
msgstr "UkonÄit se až poté, co se naÄte engine"
-#: ../src/pk-main.c:214
+#. TRANSLATORS: describing the service that is running
+#: ../src/pk-main.c:238
msgid "PackageKit service"
msgstr "Služba PackageKit"
-#: ../src/pk-main.c:250
+#. TRANSLATORS: fatal error, dbus is not running
+#: ../src/pk-main.c:275
msgid "Cannot connect to the system bus"
msgstr "Nemohu se pÅipojit k systémové sbÄrnici"
-#: ../src/pk-main.c:299
-#, c-format
+#. TRANSLATORS: cannot register on system bus, unknown reason -- geeky error follows
+#: ../src/pk-main.c:331
msgid "Error trying to start:"
msgstr "Chyba pÅi pokusu o spuÅ¡tÄnÃ:"
+#: ../src/pk-polkit-action-lookup.c:143
+#, fuzzy
+msgid "To install debugging packages, extra sources need to be enabled"
+msgstr "BalÃk '%s' nemůže být nainstalován: %s"
+
+#. TRANSLATORS: is not GPG signed
+#: ../src/pk-polkit-action-lookup.c:156
+#: ../src/pk-polkit-action-lookup.c:175
+msgid "The software is not from a trusted source."
+msgstr ""
+
+#. TRANSLATORS: user has to trust provider -- I know, this sucks
+#: ../src/pk-polkit-action-lookup.c:160
+msgid "Do not update this package unless you are sure it is safe to do so."
+msgstr ""
+
+#. TRANSLATORS: warn the user that all bets are off
+#: ../src/pk-polkit-action-lookup.c:164
+#: ../src/pk-polkit-action-lookup.c:183
+msgid "Malicious software can damage your computer or cause other harm."
+msgstr ""
+
+#. TRANSLATORS: user has to trust provider -- I know, this sucks
+#: ../src/pk-polkit-action-lookup.c:179
+msgid "Do not install this package unless you are sure it is safe to do so."
+msgstr ""
+
+#. TRANSLATORS: if the transaction is forced to install only trusted packages
+#: ../src/pk-polkit-action-lookup.c:263
+msgid "Only trusted"
+msgstr "Pouze důvÄryhodné"
+
+#~ msgid "You need to specify a search type, e.g. name"
+#~ msgstr "Je nutné stanovit typ vyhledávánÃ, napÅ. jméno"
+#~ msgid "You need to specify a search term"
+#~ msgstr "Je nutné uvést termÃn, který se bude hledat"
+#~ msgid "You need to specify a package to remove"
+#~ msgstr "Vyberte balÃk, který se má odstranit"
+#~ msgid "You need to specify a package name to resolve"
+#~ msgstr "K vyÅeÅ¡enà je nutné uvést název balÃku"
+#~ msgid "You need to specify a repository name"
+#~ msgstr "Je nutné zadat název repozitáÅe"
+#~ msgid "You need to specify a correct role"
+#~ msgstr "Je nutné urÄit správnou roli"
+#~ msgid "Failed to get last time"
+#~ msgstr "NepodaÅilo se zÃskat poslednà Äas"
+#~ msgid "You need to specify a package to find the details for"
+#~ msgstr "Je nutné urÄit balÃk, pro který se majà najÃt podrobnosti"
+#~ msgid "You need to specify a package to find the files for"
+#~ msgstr "Je nutné urÄit balÃk, pro který se majà najÃt soubory"
+
+#, fuzzy
+#~ msgid "You need to specify a list file to create"
+#~ msgstr "Je nutné urÄit Äasový termÃn"
+
+#, fuzzy
+#~ msgid "You need to specify a list file to open"
+#~ msgstr "Je nutné urÄit Äasový termÃn"
#~ msgid "This tool could not remove the packages: '%s'"
#~ msgstr "Tento nástroj nemůže odstranit balÃky: '%s'"
-
#~ msgid "Install local file"
#~ msgstr "Nainstalovat mÃstnà soubor"
-
#~ msgid "Okay to import key?"
#~ msgstr "Chcete importovat klÃÄ?"
-
#~ msgid "Did not import key"
#~ msgstr "KlÃÄ nebyl importován"
-
#~ msgid "Do you agree?"
#~ msgstr "SouhlasÃte?"
-
-#~ msgid "A logout and login is required"
-#~ msgstr "Je požadováno odhlášenà a pÅihlášenÃ"
-
#~ msgid "Could not find package to remove"
#~ msgstr "Nemohu najÃt balÃk, který se má odstranit"
-
#~ msgid "Cancelled!"
#~ msgstr "Zrušeno!"
-
#~ msgid "Could not find package to update"
#~ msgstr "Nemohu najÃt balÃk, který se má aktualizovat"
-
-#~ msgid "Could not find what packages require"
-#~ msgstr "Nemohu zjistit, které balÃky jsou vyžadovány"
-
#~ msgid "Could not find details for"
#~ msgstr "Nemohu zjistit detaily pro"
-#~ msgid "Could not find a package match"
-#~ msgstr "Nemohu najÃt odpovÃdajÃcà balÃk"
-
-#, fuzzy
-#~ msgid "Resolving package name to remote object"
-#~ msgstr "NásledujÃcà balÃky musà být odstranÄny"
-
#, fuzzy
#~ msgid "Could not set database readonly"
#~ msgstr "Nemohu otevÅÃt databázi: %s"
-
#~ msgid "Could not open database: %s"
#~ msgstr "Nemohu otevÅÃt databázi: %s"
-
#~ msgid "You probably need to run this program as the root user"
#~ msgstr "NejspÃÅ¡e budete muset spustit tento program jako superuživatel"
-
#~ msgid "<span color='#%06x' underline='single' size='larger'>Run %s</span>"
#~ msgstr ""
#~ "<span color='#%06x' underline='single' size='larger'>Spustit %s</span>"
-
#~ msgid "<big>%s</big>"
#~ msgstr "<big>%s</big>"
-
#~ msgid ""
#~ "\n"
#~ "<span color='#%06x' underline='single'>Run version %s now</span>"
#~ msgstr ""
#~ "\n"
#~ "<span color='#%06x' underline='single'>Ihned spustit verzi %s</span>"
-
#~ msgid ""
#~ "\n"
#~ "<span color='#%06x' underline='single'>Run now</span>"
#~ msgstr ""
#~ "\n"
#~ "<span color='#%06x' underline='single'>Ihned spustit</span>"
-
#~ msgid ""
#~ "\n"
#~ "<span color='#%06x' underline='single'>Upgrade to version %s</span>"
#~ msgstr ""
#~ "\n"
#~ "<span color='#%06x' underline='single'>Aktualizovat na verzi %s</span>"
-
#~ msgid ""
#~ "<span color='#%06x' underline='single' size='larger'>Install %s Now</span>"
#~ msgstr ""
#~ "<span color='#%06x' underline='single' size='larger'>Ihned instalovat %s</"
#~ "span>"
-
#~ msgid ""
#~ "\n"
#~ "<small>Version: %s</small>"
#~ msgstr ""
#~ "\n"
#~ "<small>Verze: %s</small>"
-
#~ msgid "failed to download: invalid package_id and/or directory"
#~ msgstr "stahovánà selhala: neplatné package_id a/nebo adresáÅ"
-
#~ msgid "Could not find a valid metadata file"
#~ msgstr "Nemohu najÃt platný soubor metadat"
-
#~ msgid "Okay to download the additional packages"
#~ msgstr "SouhlasÃte s staženÃm doplÅkových balÃků"
-
#~ msgid "You need to specify the pack name and packages to be packed\n"
#~ msgstr "MusÃte urÄit jméno balÃku a balÃÄky, které majà být zabaleny\n"
-
#~ msgid ""
#~ "Invalid name for the service pack, Specify a name with .servicepack "
#~ "extension\n"
#~ msgstr ""
#~ "Neplatné jméno opravného balÃÄku. Zadejte jméno s pÅÃponou .servicepack\n"
-
#~ msgid "Authentication is required to install a local file"
#~ msgstr "K instalaci mÃstnÃho souboru je vyžadováno oprávnÄnÃ"
-
#~ msgid "Authentication is required to install a security signature"
#~ msgstr "K instalaci bezpeÄnostnÃho podpisu je vyžadováno oprávnÄnÃ"
-
#~ msgid "Authentication is required to update all packages"
#~ msgstr "K aktualizaci vÅ¡ech balÃků je vyžadováno oprávnÄnÃ"
-
#~ msgid "Install security signature"
#~ msgstr "Nainstalovat bezpeÄnostnà podpis"
-
#~ msgid "Refresh package lists"
#~ msgstr "Obnovit seznam balÃků"
-
#~ msgid "Update all packages"
#~ msgstr "Aktualizovat vÅ¡echny balÃky"
-
#~ msgid ""
#~ "Could not find a package with that name to install, or package already "
#~ "installed"
#~ msgstr ""
#~ "K danému názvu nemohu najÃt balÃk k nainstalovanà ani balÃk, který už je "
#~ "nainstalovaný"
-
#~ msgid "Could not find a package with that name to update"
#~ msgstr "K daného názvu nemohu najÃt balÃk, který se má aktualizovat"
-
#~ msgid "Could not find a description for this package"
#~ msgstr "Nemohu zÃskat popis tohoto balÃku"
-
#~ msgid "You need to specify a package to find the description for"
#~ msgstr "Je nutné urÄit balÃk, pro který se má najÃt popis"
+
commit dcbfbe0e8a0b9392c2905265dfb0277d76471112
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Jul 1 12:05:45 2009 +0100
Impliment newest filtering according to the spec, which removes duplicates from the GUI tools
diff --git a/backends/conary/conaryFilter.py b/backends/conary/conaryFilter.py
index 11b7171..b587322 100644
--- a/backends/conary/conaryFilter.py
+++ b/backends/conary/conaryFilter.py
@@ -42,6 +42,13 @@ class ConaryFilter(PackagekitFilter):
else:
return False
+ def _pkg_get_name(self, pkg):
+ '''
+ Returns the name of the package used for duplicate filtering
+ '''
+ name,version,flavor = pkg.get("trove")
+ return name
+
def _pkg_get_unique(self, pkg):
'''
Return a unique string for the package
diff --git a/backends/yum/yumFilter.py b/backends/yum/yumFilter.py
index 70a12ba..5d33999 100644
--- a/backends/yum/yumFilter.py
+++ b/backends/yum/yumFilter.py
@@ -121,6 +121,12 @@ class YumFilter(PackagekitFilter):
'''
return "%s-%s:%s-%s.%s" % (pkg.name, pkg.epoch, pkg.version, pkg.release, pkg.arch)
+ def _pkg_get_name(self, pkg):
+ '''
+ Returns the name of the package used for duplicate filtering
+ '''
+ return pkg.name
+
def _pkg_is_installed(self, pkg):
'''
Return if the package is installed.
diff --git a/lib/python/packagekit/filter.py b/lib/python/packagekit/filter.py
index 243ed26..b2df0c1 100644
--- a/lib/python/packagekit/filter.py
+++ b/lib/python/packagekit/filter.py
@@ -35,21 +35,21 @@ class PackagekitFilter(object, PackagekitPackage):
for pkg in pkgs:
if self.pre_process(pkg):
self.package_list.append((pkg, INFO_INSTALLED))
- nevra = self._pkg_get_unique(pkg)
- self.installed_unique[nevra] = pkg
+ name = self._pkg_get_name(pkg)
+ self.installed_unique[name] = pkg
def add_available(self, pkgs):
''' add a list of packages that are available '''
for pkg in pkgs:
- nevra = self._pkg_get_unique(pkg)
- if not self.installed_unique.has_key(nevra):
+ name = self._pkg_get_name(pkg)
+ if not self.installed_unique.has_key(name):
if self.pre_process(pkg):
self.package_list.append((pkg, INFO_AVAILABLE))
def add_custom(self, pkg, info):
''' add a custom packages indervidually '''
- nevra = self._pkg_get_unique(pkg)
- if not self.installed_unique.has_key(nevra):
+ name = self._pkg_get_name(pkg)
+ if not self.installed_unique.has_key(name):
if self.pre_process(pkg):
self.package_list.append((pkg, info))
@@ -82,7 +82,14 @@ class PackagekitFilter(object, PackagekitPackage):
Return a unique string for the package
Needed to be implemented in a sub class
'''
- return True
+ return None
+
+ def _pkg_get_name(self, pkg):
+ '''
+ Returns the name of the package used for duplicate filtering
+ Needed to be implemented in a sub class
+ '''
+ return None
def _pkg_is_installed(self, pkg):
'''
commit a46dee43ad0864096ac0d86eca0e5a5b054655a4
Merge: a029069... cd8d0ee...
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Tue Jun 30 22:42:09 2009 +0200
Merge branch 'master' of git+ssh://volkmar@git.packagekit.org/srv/git/PackageKit
commit a029069c3c951390929d3e9cc8d2802cc841a375
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Tue Jun 30 22:41:54 2009 +0200
portage: improve repository policy by adding a gentoo dummy repo and showing others if devel filter is on
diff --git a/backends/portage/portageBackend.py b/backends/portage/portageBackend.py
index 32336a5..b0a89aa 100755
--- a/backends/portage/portageBackend.py
+++ b/backends/portage/portageBackend.py
@@ -607,21 +607,27 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
# NOTES:
# use layman API
# returns only official and supported repositories
- # TODO: what filters are for ?
+ # and creates a dummy repo for portage tree
self.status(STATUS_INFO)
self.allow_cancel(True)
self.percentage(None)
+ fltlist = filters.split(';')
+
# get installed and available dbs
installed_layman_db = layman.db.DB(layman.config.Config())
available_layman_db = layman.db.RemoteDB(layman.config.Config())
- for o in available_layman_db.overlays.keys():
- if available_layman_db.overlays[o].is_official() \
- and available_layman_db.overlays[o].is_supported():
- self.repo_detail(o,
- available_layman_db.overlays[o].description,
- is_repository_enabled(installed_layman_db, o))
+ # 'gentoo' is a dummy repo
+ self.repo_detail('gentoo', 'Gentoo Portage tree', True)
+
+ if FILTER_DEVELOPMENT in fltlist:
+ for o in available_layman_db.overlays.keys():
+ if available_layman_db.overlays[o].is_official() \
+ and available_layman_db.overlays[o].is_supported():
+ self.repo_detail(o,
+ available_layman_db.overlays[o].description,
+ is_repository_enabled(installed_layman_db, o))
def get_requires(self, filters, pkgs, recursive):
# TODO: filters
@@ -910,6 +916,13 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
self.allow_cancel(True)
self.percentage(None)
+ # special case: trying to work with gentoo repo
+ if repoid == 'gentoo':
+ if not enable:
+ self.error(ERROR_CANNOT_DISABLE_REPOSITORY,
+ "gentoo repository can't be disabled")
+ return
+
# get installed and available dbs
installed_layman_db = layman.db.DB(layman.config.Config())
available_layman_db = layman.db.RemoteDB(layman.config.Config())
commit 55ccc77b60a5a5eb5b1d120bab6ed9eaf09c2fdc
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Tue Jun 30 22:40:15 2009 +0200
Add ERROR_CANNOT_DISABLE_REPOSITORY error
diff --git a/lib/packagekit-glib/pk-enum.c b/lib/packagekit-glib/pk-enum.c
index 9d28b71..806e9c6 100644
--- a/lib/packagekit-glib/pk-enum.c
+++ b/lib/packagekit-glib/pk-enum.c
@@ -180,6 +180,7 @@ static const PkEnumMatch enum_error[] = {
{PK_ERROR_ENUM_CANNOT_UPDATE_REPO_UNSIGNED, "cannot-update-repo-unsigned"},
{PK_ERROR_ENUM_CANNOT_GET_FILELIST, "cannot-get-filelist"},
{PK_ERROR_ENUM_CANNOT_GET_REQUIRES, "cannot-get-requires"},
+ {PK_ERROR_ENUM_CANNOT_DISABLE_REPOSITORY, "cannot-disable-repository"},
{0, NULL}
};
diff --git a/lib/packagekit-glib/pk-enum.h b/lib/packagekit-glib/pk-enum.h
index a437f53..9bf6c48 100644
--- a/lib/packagekit-glib/pk-enum.h
+++ b/lib/packagekit-glib/pk-enum.h
@@ -295,6 +295,7 @@ typedef enum {
PK_ERROR_ENUM_CANNOT_UPDATE_REPO_UNSIGNED,
PK_ERROR_ENUM_CANNOT_GET_FILELIST,
PK_ERROR_ENUM_CANNOT_GET_REQUIRES,
+ PK_ERROR_ENUM_CANNOT_DISABLE_REPOSITORY,
PK_ERROR_ENUM_UNKNOWN
} PkErrorCodeEnum;
commit cd8d0eefaaae8622dfc245538d94eba509c4c984
Author: raven <raven at fedoraproject.org>
Date: Tue Jun 30 15:53:52 2009 +0000
Sending translation for Polish
diff --git a/po/pl.po b/po/pl.po
index 0b18fe6..e2f4a42 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: pl\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-06-29 14:39+0000\n"
-"PO-Revision-Date: 2009-06-29 17:49+0200\n"
+"POT-Creation-Date: 2009-06-30 14:32+0000\n"
+"PO-Revision-Date: 2009-06-30 17:53+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"
@@ -188,13 +188,10 @@ msgid "Updated"
msgstr "Zaktualizowano"
#: ../client/pk-console.c:473 ../client/pk-console.c:475
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:410
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:412
msgid "Percentage"
msgstr "Procentowo"
#: ../client/pk-console.c:475
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:412
msgid "Unknown"
msgstr "Nieznane"
@@ -408,7 +405,7 @@ msgstr "Nie można znaleÅºÄ pakietów do zainstalowania"
#. TRANSLATORS: installing new packages from package list
#. TRANSLATORS: we are now installing the debuginfo packages we found earlier
#: ../client/pk-console.c:1369
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:733
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:868
#, c-format
msgid "Installing packages"
msgstr "Instalowanie pakietów"
@@ -500,7 +497,7 @@ msgstr "Podpolecenia:"
#: ../client/pk-console.c:1768 ../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:446
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:532
#: ../src/pk-main.c:211
msgid "Show extra debugging information"
msgstr "WyÅwietla dodatkowe informacje o debugowaniu"
@@ -922,177 +919,187 @@ msgstr "Nie znaleziono pakietów dla systemu"
msgid "Installing..."
msgstr "Instalowanie..."
+#. TRANSLATORS: we are starting to install the packages
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:186
+msgid "Starting install"
+msgstr "Rozpoczynanie instalacji"
+
#. TRANSLATORS: we couldn't find the package name, non-fatal
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:370
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:379
#, c-format
msgid "Failed to find the package %s, or already installed: %s"
msgstr "Znalezienie pakietu %s nie powiodÅo siÄ lub jest już zainstalowany: %s"
#. command line argument, simulate what would be done, but don't actually do it
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:449
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:535
msgid ""
"Don't actually install any packages, only simulate what would be installed"
msgstr "Nie instaluje żadnych pakietów, tylko symuluje instalacjÄ"
#. command line argument, do we skip packages that depend on the ones specified
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:452
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:538
msgid "Do not install dependencies of the core packages"
msgstr "Nie instaluje zależnoÅci podstawowych pakietów"
+#. command line argument, do we operate quietly
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:541
+msgid "Do not display information or progress"
+msgstr "Nie wyÅwietla informacji lub postÄpu"
+
#. TRANSLATORS: tool that gets called when the command is not found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:470
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:559
msgid "PackageKit Debuginfo Installer"
msgstr "Instalator pakietów debugowania PackageKit"
#. TRANSLATORS: the use needs to specify a list of package names on the command line
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:480
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:571
#, c-format
msgid "ERROR: Specify package names to install."
msgstr "BÅÄD: proszÄ podaÄ nazwy pakietów do zainstalowania."
#. TRANSLATORS: we are getting the list of repositories
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:506
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:605
#, c-format
msgid "Getting sources list"
msgstr "Pobieranie listy źródeÅ"
#. TRANSLATORS: all completed 100%
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:521
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:558
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:588
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:666
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:701
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:753
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:790
+#: ../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
#, c-format
msgid "OK."
msgstr "OK."
#. TRANSLATORS: tell the user what we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:524
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:626
#, c-format
msgid "Found %i enabled and %i disabled sources."
msgstr "Znaleziono %i wÅÄ
czone i %i wyÅÄ
czone źródÅa."
#. TRANSLATORS: we're finding repositories that match out pattern
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:531
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:633
#, c-format
msgid "Finding debugging sources"
msgstr "Wyszukiwanie źródeŠpakietów debugowania"
#. TRANSLATORS: tell the user what we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:561
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:666
#, c-format
msgid "Found %i disabled debuginfo repos."
msgstr "Znaleziono %i wyÅÄ
czone repozytoria pakietów debugowania."
#. TRANSLATORS: we're now enabling all the debug sources we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:568
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:673
#, c-format
msgid "Enabling debugging sources"
msgstr "WÅÄ
czanie źródeŠpakietów debugowania"
#. TRANSLATORS: operation was not successful
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:575
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:654
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:688
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:740
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:777
+#: ../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
msgid "FAILED."
msgstr "NIEUDANE."
#. TRANSLATORS: tell the user how many we enabled
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:591
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:701
#, c-format
msgid "Enabled %i debugging sources."
msgstr "WÅÄ
czono %i źródÅa pakietów debugowania."
#. TRANSLATORS: we're now finding packages that match in all the repos
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:598
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:708
#, c-format
msgid "Finding debugging packages"
msgstr "Wyszukiwanie źródeŠpakietów debugowania"
#. TRANSLATORS: we couldn't find the package name, non-fatal
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:609
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:720
#, c-format
msgid "Failed to find the package %s: %s"
msgstr "Znalezienie pakietu %s nie powiodÅo siÄ: %s"
#. TRANSLATORS: we couldn't find the debuginfo package name, non-fatal
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:632
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:743
#, c-format
msgid "Failed to find the debuginfo package %s: %s"
msgstr "Znalezienie pakietu debugowania %s nie powiodÅo siÄ: %s"
#. TRANSLATORS: no debuginfo packages could be found to be installed
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:657
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:771
#, c-format
msgid "Found no packages to install."
msgstr "Nie znaleziono pakietów do zainstalowania."
#. TRANSLATORS: tell the user we found some packages, and then list them
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:669
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:785
#, c-format
msgid "Found %i packages:"
msgstr "Znaleziono %i pakiety:"
#. TRANSLATORS: tell the user we are searching for deps
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:682
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:801
#, c-format
msgid "Finding packages that depend on these packages"
msgstr "Wyszukiwanie pakietów zależnych od tych pakietów"
#. TRANSLATORS: could not install, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:691
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:814
#, c-format
msgid "Could not find dependant packages: %s"
msgstr "Nie można znaleÅºÄ zależnych pakietów: %s"
#. TRANSLATORS: tell the user we found some more packages
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:705
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:830
#, c-format
msgid "Found %i extra packages."
msgstr "Znaleziono %i dodatkowe pakiety."
#. TRANSLATORS: tell the user we found some more packages
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:709
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:834
#, c-format
msgid "No extra packages required."
msgstr "Dodatkowe pakiety nie sÄ
wymagane."
#. TRANSLATORS: tell the user we found some packages (and deps), and then list them
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:715
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:843
#, c-format
msgid "Found %i packages to install:"
msgstr "Znaleziono %i pakiety do zainstalowania:"
#. TRANSLATORS: simulate mode is a testing mode where we quit before the action
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:724
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:856
#, c-format
msgid "Not installing packages in simulate mode"
msgstr "Pakiety nie zostanÄ
zainstalowane w trybie symulacji"
#. TRANSLATORS: coul dnot install, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:743
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:881
#, c-format
msgid "Could not install packages: %s"
msgstr "Nie można zainstalowaÄ pakietów: %s"
#. TRANSLATORS: we are now disabling all debuginfo repos we previously enabled
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:770
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:913
#, c-format
msgid "Disabling sources previously enabled"
msgstr "WyÅÄ
czanie źródeÅ poprzednio wÅÄ
czonych"
#. TRANSLATORS: no debuginfo packages could be found to be installed, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:780
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:925
#, c-format
msgid "Could not disable the debugging sources: %s"
msgstr "Nie można wyÅÄ
czyÄ ÅºródeÅ pakietów debugowania: %s"
#. TRANSLATORS: we disabled all the debugging repos that we enabled before
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:793
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:940
#, c-format
msgid "Disabled %i debugging sources."
msgstr "WyÅÄ
czono %i źródÅa pakietów debugowania."
commit e26877d999f68184e770a647c5a5da62bee53ddf
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Jun 30 14:51:40 2009 +0100
glib: ensure PkTaskList monitor objects save state to buffers
diff --git a/lib/packagekit-glib/pk-task-list.c b/lib/packagekit-glib/pk-task-list.c
index 1f977fb..3a13211 100644
--- a/lib/packagekit-glib/pk-task-list.c
+++ b/lib/packagekit-glib/pk-task-list.c
@@ -248,6 +248,7 @@ pk_task_list_item_create (PkTaskList *tlist, const gchar *tid)
pk_task_list_item_free (item);
return NULL;
}
+ pk_client_set_use_buffer (item->monitor, TRUE, NULL);
pk_client_get_role (item->monitor, &item->role, &item->text, NULL);
pk_client_get_status (item->monitor, &item->status, NULL);
commit 19fe9ee468ced83aeb2f4d66383d6e194a871098
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Jun 30 13:44:50 2009 +0100
Make pk_client_get_require_restart_list return a PkObjList of PkRequireRestartObj's (breaks ABI)
diff --git a/lib/packagekit-glib/pk-client.c b/lib/packagekit-glib/pk-client.c
index 344f670..f0a3ddd 100644
--- a/lib/packagekit-glib/pk-client.c
+++ b/lib/packagekit-glib/pk-client.c
@@ -86,11 +86,11 @@ struct _PkClientPrivate
PkObjList *category_list;
PkObjList *distro_upgrade_list;
PkObjList *transaction_list;
+ PkObjList *require_restart_list;
PkPackageList *package_list;
PkConnection *pconnection;
gulong pconnection_signal_id;
PkRestartEnum require_restart;
- GPtrArray *require_restart_list;
PkStatusEnum last_status;
PkRoleEnum role;
gboolean cached_force;
@@ -409,14 +409,16 @@ pk_client_get_require_restart (PkClient *client)
* This method allows a client program to discover what packages
* caused different require restarts.
*
- * Return value: a #PkRestartEnum value, e.g. PK_RESTART_ENUM_SYSTEM
+ * Return value: a #PkObjList list of #PkRequireRestartObj's or %NULL if not found or invalid
**/
-const GPtrArray *
+PkObjList *
pk_client_get_require_restart_list (PkClient *client)
{
g_return_val_if_fail (PK_IS_CLIENT (client), FALSE);
- return client->priv->require_restart_list;
+ if (!client->priv->use_buffer)
+ return NULL;
+ return g_object_ref (client->priv->require_restart_list);
}
/**
@@ -443,7 +445,7 @@ pk_client_get_package_list (PkClient *client)
*
* Return the cached category list
*
- * Return value: The #PkObjList of cached objects or %NULL if invalid
+ * Return value: The #PkObjList of #PkCategoryObj's or %NULL if invalid
**/
PkObjList *
pk_client_get_category_list (PkClient *client)
@@ -460,7 +462,7 @@ pk_client_get_category_list (PkClient *client)
*
* Return the cached distro upgrades list
*
- * Return value: The #PkObjList of cached objects or %NULL if invalid
+ * Return value: The #PkObjList of #PkDistroUpgradeObj's or %NULL if invalid
**/
PkObjList *
pk_client_get_distro_upgrade_list (PkClient *client)
@@ -986,8 +988,9 @@ pk_client_require_restart_cb (DBusGProxy *proxy,
id = pk_package_id_new_from_string (package_id);
obj = pk_require_restart_obj_new_from_data (restart, id);
- /* save this in the array (is freed from array) */
- g_ptr_array_add (client->priv->require_restart_list, id);
+ /* cache */
+ if (client->priv->use_buffer || client->priv->synchronous)
+ pk_obj_list_add (client->priv->require_restart_list, obj);
egg_debug ("emit require-restart %s, %s", pk_restart_enum_to_text (restart), package_id);
g_signal_emit (client , signals [PK_CLIENT_REQUIRE_RESTART], 0, obj);
@@ -1481,10 +1484,6 @@ pk_client_get_categories (PkClient *client, GError **error)
/* save this so we can re-issue it */
client->priv->role = PK_ROLE_ENUM_GET_CATEGORIES;
- /* we use the cached objects support */
- pk_obj_list_set_copy (client->priv->category_list, (PkObjListCopyFunc) pk_category_obj_copy);
- pk_obj_list_set_free (client->priv->category_list, (PkObjListFreeFunc) pk_category_obj_free);
-
/* check to see if we have a valid proxy */
if (client->priv->proxy == NULL) {
if (error != NULL)
@@ -2765,10 +2764,6 @@ pk_client_get_distro_upgrades (PkClient *client, GError **error)
/* save this so we can re-issue it */
client->priv->role = PK_ROLE_ENUM_GET_DISTRO_UPGRADES;
- /* we use the cached objects support */
- pk_obj_list_set_copy (client->priv->distro_upgrade_list, (PkObjListCopyFunc) pk_distro_upgrade_obj_copy);
- pk_obj_list_set_free (client->priv->distro_upgrade_list, (PkObjListFreeFunc) pk_distro_upgrade_obj_free);
-
/* check to see if we have a valid proxy */
if (client->priv->proxy == NULL) {
if (error != NULL)
@@ -3827,10 +3822,6 @@ pk_client_get_old_transactions (PkClient *client, guint number, GError **error)
if (!ret)
goto out;
- /* we use the cached objects support */
- pk_obj_list_set_copy (client->priv->transaction_list, (PkObjListCopyFunc) pk_transaction_obj_copy);
- pk_obj_list_set_free (client->priv->transaction_list, (PkObjListFreeFunc) pk_transaction_obj_free);
-
/* check to see if we have a valid proxy */
if (client->priv->proxy == NULL) {
if (error != NULL)
@@ -4545,10 +4536,6 @@ pk_client_reset (PkClient *client, GError **error)
g_object_unref (client->priv->package_list);
g_clear_error (&client->priv->error);
- /* clear restart array */
- g_ptr_array_foreach (client->priv->require_restart_list, (GFunc) pk_package_id_free, NULL);
- g_ptr_array_set_size (client->priv->require_restart_list, 0);
-
/* we need to do this now we have multiple paths */
pk_client_disconnect_proxy (client);
@@ -4572,6 +4559,7 @@ pk_client_reset (PkClient *client, GError **error)
pk_obj_list_clear (client->priv->category_list);
pk_obj_list_clear (client->priv->distro_upgrade_list);
pk_obj_list_clear (client->priv->transaction_list);
+ pk_obj_list_clear (client->priv->require_restart_list);
ret = TRUE;
out:
return ret;
@@ -4596,10 +4584,6 @@ pk_client_init (PkClient *client)
client->priv->is_finished = FALSE;
client->priv->is_finishing = FALSE;
client->priv->package_list = pk_package_list_new ();
- client->priv->require_restart_list = g_ptr_array_new ();
- client->priv->category_list = pk_obj_list_new ();
- client->priv->distro_upgrade_list = pk_obj_list_new ();
- client->priv->transaction_list = pk_obj_list_new ();
client->priv->cached_package_id = NULL;
client->priv->cached_package_ids = NULL;
client->priv->cached_transaction_id = NULL;
@@ -4615,6 +4599,26 @@ pk_client_init (PkClient *client)
client->priv->timeout_id = 0;
client->priv->error = NULL;
+ /* cache require restart objects */
+ client->priv->require_restart_list = pk_obj_list_new ();
+ pk_obj_list_set_copy (client->priv->require_restart_list, (PkObjListCopyFunc) pk_require_restart_obj_copy);
+ pk_obj_list_set_free (client->priv->require_restart_list, (PkObjListFreeFunc) pk_require_restart_obj_free);
+
+ /* cache category objects */
+ client->priv->category_list = pk_obj_list_new ();
+ pk_obj_list_set_copy (client->priv->category_list, (PkObjListCopyFunc) pk_category_obj_copy);
+ pk_obj_list_set_free (client->priv->category_list, (PkObjListFreeFunc) pk_category_obj_free);
+
+ /* cache distro upgrade objects */
+ client->priv->distro_upgrade_list = pk_obj_list_new ();
+ pk_obj_list_set_copy (client->priv->distro_upgrade_list, (PkObjListCopyFunc) pk_distro_upgrade_obj_copy);
+ pk_obj_list_set_free (client->priv->distro_upgrade_list, (PkObjListFreeFunc) pk_distro_upgrade_obj_free);
+
+ /* cache transaction objects */
+ client->priv->transaction_list = pk_obj_list_new ();
+ pk_obj_list_set_copy (client->priv->transaction_list, (PkObjListCopyFunc) pk_transaction_obj_copy);
+ pk_obj_list_set_free (client->priv->transaction_list, (PkObjListFreeFunc) pk_transaction_obj_free);
+
/* check dbus connections, exit if not valid */
client->priv->connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (error != NULL) {
@@ -4736,10 +4740,6 @@ pk_client_finalize (GObject *object)
if (client->priv->error)
g_error_free (client->priv->error);
- /* clear restart array */
- g_ptr_array_foreach (client->priv->require_restart_list, (GFunc) pk_package_id_free, NULL);
- g_ptr_array_free (client->priv->require_restart_list, TRUE);
-
/* clear the loop, if we were using it */
if (client->priv->synchronous)
g_main_loop_quit (client->priv->loop);
@@ -4757,6 +4757,7 @@ pk_client_finalize (GObject *object)
g_object_unref (client->priv->category_list);
g_object_unref (client->priv->distro_upgrade_list);
g_object_unref (client->priv->transaction_list);
+ g_object_unref (client->priv->require_restart_list);
g_object_unref (client->priv->control);
G_OBJECT_CLASS (pk_client_parent_class)->finalize (object);
diff --git a/lib/packagekit-glib/pk-client.h b/lib/packagekit-glib/pk-client.h
index 292f8fd..d3a4f17 100644
--- a/lib/packagekit-glib/pk-client.h
+++ b/lib/packagekit-glib/pk-client.h
@@ -353,7 +353,7 @@ gboolean pk_client_repo_set_data (PkClient *client,
/* cached stuff */
PkPackageList *pk_client_get_package_list (PkClient *client);
PkRestartEnum pk_client_get_require_restart (PkClient *client);
-const GPtrArray *pk_client_get_require_restart_list (PkClient *client);
+PkObjList *pk_client_get_require_restart_list (PkClient *client);
PkObjList *pk_client_get_category_list (PkClient *client);
PkObjList *pk_client_get_distro_upgrade_list (PkClient *client);
PkObjList *pk_client_get_transaction_list (PkClient *client);
commit 6298fa696c7cb9b9b8fbf1326e6c0b12c3b55010
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Jun 30 13:32:35 2009 +0100
Emit RequireRestart as a PkRequireRestartObj (breaks ABI)
diff --git a/client/pk-console.c b/client/pk-console.c
index 9281af4..43a32ca 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -510,17 +510,17 @@ pk_console_signature_finished_cb (PkClient *client, PkExitEnum exit_enum, guint
* pk_console_require_restart_cb:
**/
static void
-pk_console_require_restart_cb (PkClient *client, PkRestartEnum restart, const PkPackageId *id, gpointer data)
+pk_console_require_restart_cb (PkClient *client, const PkRequireRestartObj *obj, gpointer data)
{
- if (restart == PK_RESTART_ENUM_SYSTEM) {
+ if (obj->restart == PK_RESTART_ENUM_SYSTEM) {
/* TRANSLATORS: a package requires the system to be restarted */
- g_print ("%s %s-%s.%s\n", _("System restart required by:"), id->name, id->version, id->arch);
- } else if (restart == PK_RESTART_ENUM_SESSION) {
+ g_print ("%s %s-%s.%s\n", _("System restart required by:"), obj->id->name, obj->id->version, obj->id->arch);
+ } else if (obj->restart == PK_RESTART_ENUM_SESSION) {
/* TRANSLATORS: a package requires the session to be restarted */
- g_print ("%s %s-%s.%s\n", _("Session restart required:"), id->name, id->version, id->arch);
- } else if (restart == PK_RESTART_ENUM_APPLICATION) {
+ g_print ("%s %s-%s.%s\n", _("Session restart required:"), obj->id->name, obj->id->version, obj->id->arch);
+ } else if (obj->restart == PK_RESTART_ENUM_APPLICATION) {
/* TRANSLATORS: a package requires the application to be restarted */
- g_print ("%s %s-%s.%s\n", _("Application restart required by:"), id->name, id->version, id->arch);
+ g_print ("%s %s-%s.%s\n", _("Application restart required by:"), obj->id->name, obj->id->version, obj->id->arch);
}
}
diff --git a/lib/packagekit-glib/packagekit.h b/lib/packagekit-glib/packagekit.h
index a89e506..b01131b 100644
--- a/lib/packagekit-glib/packagekit.h
+++ b/lib/packagekit-glib/packagekit.h
@@ -41,6 +41,7 @@
#include <packagekit-glib/pk-package-ids.h>
#include <packagekit-glib/pk-package-list.h>
#include <packagekit-glib/pk-package-obj.h>
+#include <packagekit-glib/pk-require-restart-obj.h>
#include <packagekit-glib/pk-service-pack.h>
#include <packagekit-glib/pk-task-list.h>
#include <packagekit-glib/pk-transaction-obj.h>
diff --git a/lib/packagekit-glib/pk-client.c b/lib/packagekit-glib/pk-client.c
index 2460b8b..344f670 100644
--- a/lib/packagekit-glib/pk-client.c
+++ b/lib/packagekit-glib/pk-client.c
@@ -57,6 +57,7 @@
#include <packagekit-glib/pk-transaction-obj.h>
#include <packagekit-glib/pk-category-obj.h>
#include <packagekit-glib/pk-distro-upgrade-obj.h>
+#include <packagekit-glib/pk-require-restart-obj.h>
#include <packagekit-glib/pk-obj-list.h>
#include "egg-debug.h"
@@ -978,20 +979,24 @@ pk_client_require_restart_cb (DBusGProxy *proxy,
{
PkRestartEnum restart;
PkPackageId *id;
+ PkRequireRestartObj *obj;
g_return_if_fail (PK_IS_CLIENT (client));
restart = pk_restart_enum_from_text (restart_text);
id = pk_package_id_new_from_string (package_id);
+ obj = pk_require_restart_obj_new_from_data (restart, id);
/* save this in the array (is freed from array) */
g_ptr_array_add (client->priv->require_restart_list, id);
egg_debug ("emit require-restart %s, %s", pk_restart_enum_to_text (restart), package_id);
- g_signal_emit (client , signals [PK_CLIENT_REQUIRE_RESTART], 0, restart, id);
+ g_signal_emit (client , signals [PK_CLIENT_REQUIRE_RESTART], 0, obj);
if (restart > client->priv->require_restart) {
client->priv->require_restart = restart;
egg_debug ("restart status now %s", pk_restart_enum_to_text (restart));
}
+ pk_package_id_free (id);
+ pk_require_restart_obj_free (obj);
}
/**
@@ -4141,7 +4146,7 @@ pk_client_class_init (PkClientClass *klass)
/**
* PkClient::package:
* @client: the #PkClient instance that emitted the signal
- * @obj: a pointer to a PkPackageObj structure describing the package
+ * @obj: a pointer to a #PkPackageObj structure describing the package
*
* The ::package signal is emitted when the update list may have
* changed and the client program may have to update some UI.
@@ -4155,7 +4160,7 @@ pk_client_class_init (PkClientClass *klass)
/**
* PkClient::transaction:
* @client: the #PkClient instance that emitted the signal
- * @obj: a pointer to a PkTransactionObj structure describing the transaction
+ * @obj: a pointer to a #PkTransactionObj structure describing the transaction
*
* The ::transaction is emitted when the method GetOldTransactions() is
* called, and the values are being replayed from a database.
@@ -4169,7 +4174,7 @@ pk_client_class_init (PkClientClass *klass)
/**
* PkClient::distro_upgrade:
* @client: the #PkClient instance that emitted the signal
- * @obj: a pointer to a PkDistroUpgradeObj structure describing the upgrade
+ * @obj: a pointer to a #PkDistroUpgradeObj structure describing the upgrade
*
* The ::distro_upgrade signal is emitted when the method GetDistroUpgrades() is
* called, and the upgrade options are being sent.
@@ -4183,7 +4188,7 @@ pk_client_class_init (PkClientClass *klass)
/**
* PkClient::update-detail:
* @client: the #PkClient instance that emitted the signal
- * @obj: a pointer to a PkUpdateDetailsObj structure describing the update
+ * @obj: a pointer to a #PkUpdateDetailsObj structure describing the update
*
* The ::update-detail signal is emitted when GetUpdateDetail() is
* called on a set of package_id's.
@@ -4197,7 +4202,7 @@ pk_client_class_init (PkClientClass *klass)
/**
* PkClient::details:
* @client: the #PkClient instance that emitted the signal
- * @obj: a pointer to a PkDetailObj structure describing the package in detail
+ * @obj: a pointer to a #PkDetailObj structure describing the package in detail
*
* The ::details signal is emitted when GetDetails() is called.
**/
@@ -4314,8 +4319,7 @@ pk_client_class_init (PkClientClass *klass)
/**
* PkClient::require-restart:
* @client: the #PkClient instance that emitted the signal
- * @restart: the PkRestartEnum type of restart, e.g. PK_RESTART_ENUM_SYSTEM
- * @details: the optional details about the restart, why this is needed
+ * @obj: a pointer to a #PkRequireRestartObj structure describing the restart request in detail
*
* The ::require-restart signal is emitted when the transaction
* requires a application or session restart.
@@ -4324,8 +4328,8 @@ pk_client_class_init (PkClientClass *klass)
g_signal_new ("require-restart",
G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (PkClientClass, require_restart),
- NULL, NULL, g_cclosure_marshal_VOID__UINT_POINTER,
- G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_POINTER);
+ NULL, NULL, g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
/**
* PkClient::message:
* @client: the #PkClient instance that emitted the signal
@@ -4375,7 +4379,7 @@ pk_client_class_init (PkClientClass *klass)
/**
* PkClient::category:
* @client: the #PkClient instance that emitted the signal
- * @obj: a pointer to a PkCategoryObj structure describing the category
+ * @obj: a pointer to a #PkCategoryObj structure describing the category
*
* The ::category signal is emitted when GetCategories() is called.
**/
diff --git a/lib/packagekit-glib/pk-client.h b/lib/packagekit-glib/pk-client.h
index e05a9a8..292f8fd 100644
--- a/lib/packagekit-glib/pk-client.h
+++ b/lib/packagekit-glib/pk-client.h
@@ -34,6 +34,7 @@
#include <packagekit-glib/pk-details-obj.h>
#include <packagekit-glib/pk-category-obj.h>
#include <packagekit-glib/pk-transaction-obj.h>
+#include <packagekit-glib/pk-require-restart-obj.h>
G_BEGIN_DECLS
@@ -134,8 +135,7 @@ struct _PkClientClass
PkErrorCodeEnum code,
const gchar *details);
void (* require_restart) (PkClient *client,
- PkRestartEnum restart,
- PkPackageId *id);
+ PkRequireRestartObj *require_restart);
void (* message) (PkClient *client,
PkMessageEnum message,
const gchar *details);
@@ -356,7 +356,7 @@ PkRestartEnum pk_client_get_require_restart (PkClient *client);
const GPtrArray *pk_client_get_require_restart_list (PkClient *client);
PkObjList *pk_client_get_category_list (PkClient *client);
PkObjList *pk_client_get_distro_upgrade_list (PkClient *client);
-PkObjList *pk_client_get_transaction_list (PkClient *client);
+PkObjList *pk_client_get_transaction_list (PkClient *client);
/* not job specific */
gboolean pk_client_reset (PkClient *client,
commit fcf6c03513c15b96baf6fa4bf1e360d83dcf1c12
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Jun 30 13:22:58 2009 +0100
Create a PkRequireRestartObj type
diff --git a/lib/packagekit-glib/Makefile.am b/lib/packagekit-glib/Makefile.am
index 07e3d67..4051486 100644
--- a/lib/packagekit-glib/Makefile.am
+++ b/lib/packagekit-glib/Makefile.am
@@ -39,6 +39,7 @@ libpackagekit_glib_include_HEADERS = \
pk-package-id.h \
pk-package-ids.h \
pk-package-obj.h \
+ pk-require-restart-obj.h \
pk-obj-list.h \
pk-package-list.h \
pk-category-obj.h \
@@ -87,6 +88,8 @@ libpackagekit_glib_la_SOURCES = \
pk-update-detail-obj.h \
pk-distro-upgrade-obj.c \
pk-distro-upgrade-obj.h \
+ pk-require-restart-obj.c \
+ pk-require-restart-obj.h \
pk-details-obj.c \
pk-details-obj.h \
pk-transaction-obj.c \
diff --git a/lib/packagekit-glib/pk-require-restart-obj.c b/lib/packagekit-glib/pk-require-restart-obj.c
new file mode 100644
index 0000000..6211ff9
--- /dev/null
+++ b/lib/packagekit-glib/pk-require-restart-obj.c
@@ -0,0 +1,138 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:pk-require-restart-obj
+ * @short_description: Functionality to create a require restart struct
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <glib/gi18n.h>
+
+#include <packagekit-glib/pk-enum.h>
+#include <packagekit-glib/pk-common.h>
+#include <packagekit-glib/pk-require-restart-obj.h>
+
+#include "egg-debug.h"
+
+/**
+ * pk_require_restart_obj_new:
+ *
+ * Creates a new #PkRequireRestartObj object with default values
+ *
+ * Return value: a new #PkRequireRestartObj object
+ **/
+PkRequireRestartObj *
+pk_require_restart_obj_new (void)
+{
+ PkRequireRestartObj *obj;
+ obj = g_new0 (PkRequireRestartObj, 1);
+ obj->restart = PK_RESTART_ENUM_UNKNOWN;
+ obj->id = NULL;
+ return obj;
+}
+
+/**
+ * pk_require_restart_obj_new_from_data:
+ *
+ * Creates a new #PkRequireRestartObj object with values.
+ *
+ * Return value: a new #PkRequireRestartObj object
+ **/
+PkRequireRestartObj *
+pk_require_restart_obj_new_from_data (PkRestartEnum restart, const PkPackageId *id)
+{
+ PkRequireRestartObj *obj = NULL;
+
+ /* create new object */
+ obj = pk_require_restart_obj_new ();
+ obj->restart = restart;
+ obj->id = pk_package_id_copy (id);
+ return obj;
+}
+
+/**
+ * pk_require_restart_obj_copy:
+ *
+ * Return value: a new #PkRequireRestartObj object
+ **/
+PkRequireRestartObj *
+pk_require_restart_obj_copy (const PkRequireRestartObj *obj)
+{
+ g_return_val_if_fail (obj != NULL, NULL);
+ return pk_require_restart_obj_new_from_data (obj->restart, obj->id);
+}
+
+/**
+ * pk_require_restart_obj_free:
+ * @obj: the #PkRequireRestartObj object
+ *
+ * Return value: %TRUE if the #PkRequireRestartObj object was freed.
+ **/
+gboolean
+pk_require_restart_obj_free (PkRequireRestartObj *obj)
+{
+ if (obj == NULL) {
+ return FALSE;
+ }
+ pk_package_id_free (obj->id);
+ g_free (obj);
+ return TRUE;
+}
+
+/***************************************************************************
+ *** MAKE CHECK TESTS ***
+ ***************************************************************************/
+#ifdef EGG_TEST
+#include "egg-test.h"
+
+void
+egg_test_require_restart (EggTest *test)
+{
+ gboolean ret;
+ PkRequireRestartObj *obj;
+
+ if (!egg_test_start (test, "PkRequireRestartObj"))
+ return;
+
+ /************************************************************
+ **************** IDENT ******************
+ ************************************************************/
+
+ /************************************************************/
+ egg_test_title (test, "get an upgrade object");
+ obj = pk_require_restart_obj_new ();
+ egg_test_assert (test, obj != NULL);
+
+ /************************************************************/
+ egg_test_title (test, "test upgrade");
+ ret = pk_require_restart_obj_free (obj);
+ egg_test_assert (test, ret);
+
+ egg_test_end (test);
+}
+#endif
+
diff --git a/lib/packagekit-glib/pk-require-restart-obj.h b/lib/packagekit-glib/pk-require-restart-obj.h
new file mode 100644
index 0000000..ac07386
--- /dev/null
+++ b/lib/packagekit-glib/pk-require-restart-obj.h
@@ -0,0 +1,54 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
+#error "Only <packagekit.h> can be included directly."
+#endif
+
+#ifndef __PK_REQUIRE_RESTART_OBJ_H
+#define __PK_REQUIRE_RESTART_OBJ_H
+
+#include <glib-object.h>
+#include <packagekit-glib/pk-enum.h>
+#include <packagekit-glib/pk-package-id.h>
+
+G_BEGIN_DECLS
+
+/**
+ * PkRequireRestartObj:
+ *
+ * Cached object to represent details about the require_restart.
+ **/
+typedef struct
+{
+ PkRestartEnum restart;
+ PkPackageId *id;
+} PkRequireRestartObj;
+
+PkRequireRestartObj *pk_require_restart_obj_new (void);
+PkRequireRestartObj *pk_require_restart_obj_copy (const PkRequireRestartObj *obj);
+PkRequireRestartObj *pk_require_restart_obj_new_from_data (PkRestartEnum restart,
+ const PkPackageId *id);
+gboolean pk_require_restart_obj_free (PkRequireRestartObj *obj);
+
+G_END_DECLS
+
+#endif /* __PK_REQUIRE_RESTART_OBJ_H */
commit 403b966a29a75503e20b7e1a631f5a885e0b98e6
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Jun 30 13:12:48 2009 +0100
glib: Remove the horror that is pk_client_get_cached_objects()
diff --git a/lib/packagekit-glib/pk-client.c b/lib/packagekit-glib/pk-client.c
index db68a18..2460b8b 100644
--- a/lib/packagekit-glib/pk-client.c
+++ b/lib/packagekit-glib/pk-client.c
@@ -82,7 +82,9 @@ struct _PkClientPrivate
gboolean synchronous;
gchar *tid;
PkControl *control;
- PkObjList *cached_data;
+ PkObjList *category_list;
+ PkObjList *distro_upgrade_list;
+ PkObjList *transaction_list;
PkPackageList *package_list;
PkConnection *pconnection;
gulong pconnection_signal_id;
@@ -435,20 +437,54 @@ pk_client_get_package_list (PkClient *client)
}
/**
- * pk_client_get_cached_objects:
+ * pk_client_get_category_list:
* @client: a valid #PkClient instance
*
- * Return the cached object list
+ * Return the cached category list
*
- * Return value: The #GPtrArray of cached objects or %NULL if invalid
+ * Return value: The #PkObjList of cached objects or %NULL if invalid
**/
PkObjList *
-pk_client_get_cached_objects (PkClient *client)
+pk_client_get_category_list (PkClient *client)
{
g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
if (!client->priv->use_buffer)
return NULL;
- return g_object_ref (client->priv->cached_data);
+ return g_object_ref (client->priv->category_list);
+}
+
+/**
+ * pk_client_get_distro_upgrade_list:
+ * @client: a valid #PkClient instance
+ *
+ * Return the cached distro upgrades list
+ *
+ * Return value: The #PkObjList of cached objects or %NULL if invalid
+ **/
+PkObjList *
+pk_client_get_distro_upgrade_list (PkClient *client)
+{
+ g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
+ if (!client->priv->use_buffer)
+ return NULL;
+ return g_object_ref (client->priv->distro_upgrade_list);
+}
+
+/**
+ * pk_client_get_transaction_list:
+ * @client: a valid #PkClient instance
+ *
+ * Return the cached transactions list
+ *
+ * Return value: The #PkObjList of cached objects or %NULL if invalid
+ **/
+PkObjList *
+pk_client_get_transaction_list (PkClient *client)
+{
+ g_return_val_if_fail (PK_IS_CLIENT (client), NULL);
+ if (!client->priv->use_buffer)
+ return NULL;
+ return g_object_ref (client->priv->transaction_list);
}
/**
@@ -607,7 +643,7 @@ pk_client_transaction_cb (DBusGProxy *proxy, const gchar *old_tid, const gchar *
/* cache */
if (client->priv->use_buffer || client->priv->synchronous)
- pk_obj_list_add (client->priv->cached_data, obj);
+ pk_obj_list_add (client->priv->transaction_list, obj);
pk_transaction_obj_free (obj);
}
@@ -630,7 +666,7 @@ pk_client_distro_upgrade_cb (DBusGProxy *proxy, const gchar *type_text, const gc
/* cache */
if (client->priv->use_buffer || client->priv->synchronous)
- pk_obj_list_add (client->priv->cached_data, obj);
+ pk_obj_list_add (client->priv->distro_upgrade_list, obj);
pk_distro_upgrade_obj_free (obj);
}
@@ -671,10 +707,6 @@ pk_client_update_detail_cb (DBusGProxy *proxy, const gchar *package_id, const g
issued, updated);
g_signal_emit (client, signals [PK_CLIENT_UPDATE_DETAIL], 0, detail);
- /* cache */
- if (client->priv->use_buffer || client->priv->synchronous)
- pk_obj_list_add (client->priv->cached_data, detail);
-
if (issued != NULL)
g_date_free (issued);
if (updated != NULL)
@@ -701,7 +733,7 @@ pk_client_category_cb (DBusGProxy *proxy, const gchar *parent_id, const gchar *
/* cache */
if (client->priv->use_buffer || client->priv->synchronous)
- pk_obj_list_add (client->priv->cached_data, category);
+ pk_obj_list_add (client->priv->category_list, category);
pk_category_obj_free (category);
}
@@ -729,10 +761,6 @@ pk_client_details_cb (DBusGProxy *proxy, const gchar *package_id, const gchar *l
details = pk_details_obj_new_from_data (id, license, group, description, url, size);
g_signal_emit (client, signals [PK_CLIENT_DETAILS], 0, details);
- /* cache */
- if (client->priv->use_buffer || client->priv->synchronous)
- pk_obj_list_add (client->priv->cached_data, details);
-
pk_package_id_free (id);
pk_details_obj_free (details);
}
@@ -1449,8 +1477,8 @@ pk_client_get_categories (PkClient *client, GError **error)
client->priv->role = PK_ROLE_ENUM_GET_CATEGORIES;
/* we use the cached objects support */
- pk_obj_list_set_copy (client->priv->cached_data, (PkObjListCopyFunc) pk_category_obj_copy);
- pk_obj_list_set_free (client->priv->cached_data, (PkObjListFreeFunc) pk_category_obj_free);
+ pk_obj_list_set_copy (client->priv->category_list, (PkObjListCopyFunc) pk_category_obj_copy);
+ pk_obj_list_set_free (client->priv->category_list, (PkObjListFreeFunc) pk_category_obj_free);
/* check to see if we have a valid proxy */
if (client->priv->proxy == NULL) {
@@ -2418,10 +2446,6 @@ pk_client_get_update_detail (PkClient *client, gchar **package_ids, GError **err
client->priv->role = PK_ROLE_ENUM_GET_UPDATE_DETAIL;
client->priv->cached_package_ids = g_strdupv (package_ids);
- /* we use the cached objects support */
- pk_obj_list_set_copy (client->priv->cached_data, (PkObjListCopyFunc) pk_update_detail_obj_copy);
- pk_obj_list_set_free (client->priv->cached_data, (PkObjListFreeFunc) pk_update_detail_obj_free);
-
/* check to see if we have a valid proxy */
if (client->priv->proxy == NULL) {
if (error != NULL)
@@ -2660,10 +2684,6 @@ pk_client_get_details (PkClient *client, gchar **package_ids, GError **error)
if (!ret)
goto out;
- /* we use the cached objects support */
- pk_obj_list_set_copy (client->priv->cached_data, (PkObjListCopyFunc) pk_details_obj_copy);
- pk_obj_list_set_free (client->priv->cached_data, (PkObjListFreeFunc) pk_details_obj_free);
-
/* save this so we can re-issue it */
client->priv->role = PK_ROLE_ENUM_GET_DETAILS;
client->priv->cached_package_ids = g_strdupv (package_ids);
@@ -2741,8 +2761,8 @@ pk_client_get_distro_upgrades (PkClient *client, GError **error)
client->priv->role = PK_ROLE_ENUM_GET_DISTRO_UPGRADES;
/* we use the cached objects support */
- pk_obj_list_set_copy (client->priv->cached_data, (PkObjListCopyFunc) pk_distro_upgrade_obj_copy);
- pk_obj_list_set_free (client->priv->cached_data, (PkObjListFreeFunc) pk_distro_upgrade_obj_free);
+ pk_obj_list_set_copy (client->priv->distro_upgrade_list, (PkObjListCopyFunc) pk_distro_upgrade_obj_copy);
+ pk_obj_list_set_free (client->priv->distro_upgrade_list, (PkObjListFreeFunc) pk_distro_upgrade_obj_free);
/* check to see if we have a valid proxy */
if (client->priv->proxy == NULL) {
@@ -3803,8 +3823,8 @@ pk_client_get_old_transactions (PkClient *client, guint number, GError **error)
goto out;
/* we use the cached objects support */
- pk_obj_list_set_copy (client->priv->cached_data, (PkObjListCopyFunc) pk_transaction_obj_copy);
- pk_obj_list_set_free (client->priv->cached_data, (PkObjListFreeFunc) pk_transaction_obj_free);
+ pk_obj_list_set_copy (client->priv->transaction_list, (PkObjListCopyFunc) pk_transaction_obj_copy);
+ pk_obj_list_set_free (client->priv->transaction_list, (PkObjListFreeFunc) pk_transaction_obj_free);
/* check to see if we have a valid proxy */
if (client->priv->proxy == NULL) {
@@ -3886,7 +3906,9 @@ pk_client_requeue (PkClient *client, GError **error)
/* clear package list */
pk_obj_list_clear (PK_OBJ_LIST(client->priv->package_list));
- pk_obj_list_clear (client->priv->cached_data);
+ pk_obj_list_clear (client->priv->category_list);
+ pk_obj_list_clear (client->priv->distro_upgrade_list);
+ pk_obj_list_clear (client->priv->transaction_list);
/* do the correct action with the cached parameters */
if (priv->role == PK_ROLE_ENUM_GET_DEPENDS)
@@ -4543,7 +4565,9 @@ pk_client_reset (PkClient *client, GError **error)
client->priv->package_list = pk_package_list_new ();
/* TODO: make clean */
- pk_obj_list_clear (client->priv->cached_data);
+ pk_obj_list_clear (client->priv->category_list);
+ pk_obj_list_clear (client->priv->distro_upgrade_list);
+ pk_obj_list_clear (client->priv->transaction_list);
ret = TRUE;
out:
return ret;
@@ -4569,7 +4593,9 @@ pk_client_init (PkClient *client)
client->priv->is_finishing = FALSE;
client->priv->package_list = pk_package_list_new ();
client->priv->require_restart_list = g_ptr_array_new ();
- client->priv->cached_data = pk_obj_list_new ();
+ client->priv->category_list = pk_obj_list_new ();
+ client->priv->distro_upgrade_list = pk_obj_list_new ();
+ client->priv->transaction_list = pk_obj_list_new ();
client->priv->cached_package_id = NULL;
client->priv->cached_package_ids = NULL;
client->priv->cached_transaction_id = NULL;
@@ -4724,7 +4750,9 @@ pk_client_finalize (GObject *object)
pk_client_disconnect_proxy (client);
g_object_unref (client->priv->pconnection);
g_object_unref (client->priv->package_list);
- g_object_unref (client->priv->cached_data);
+ g_object_unref (client->priv->category_list);
+ g_object_unref (client->priv->distro_upgrade_list);
+ g_object_unref (client->priv->transaction_list);
g_object_unref (client->priv->control);
G_OBJECT_CLASS (pk_client_parent_class)->finalize (object);
diff --git a/lib/packagekit-glib/pk-client.h b/lib/packagekit-glib/pk-client.h
index fcd8975..e05a9a8 100644
--- a/lib/packagekit-glib/pk-client.h
+++ b/lib/packagekit-glib/pk-client.h
@@ -354,7 +354,9 @@ gboolean pk_client_repo_set_data (PkClient *client,
PkPackageList *pk_client_get_package_list (PkClient *client);
PkRestartEnum pk_client_get_require_restart (PkClient *client);
const GPtrArray *pk_client_get_require_restart_list (PkClient *client);
-PkObjList *pk_client_get_cached_objects (PkClient *client);
+PkObjList *pk_client_get_category_list (PkClient *client);
+PkObjList *pk_client_get_distro_upgrade_list (PkClient *client);
+PkObjList *pk_client_get_transaction_list (PkClient *client);
/* not job specific */
gboolean pk_client_reset (PkClient *client,
commit f254c2cc1b85f5a771dc8a9646ed29973e7b9dae
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Jun 30 12:09:20 2009 +0100
Add a --quiet option to pk-debuginfo-install
diff --git a/contrib/debuginfo-install/pk-debuginfo-install.c b/contrib/debuginfo-install/pk-debuginfo-install.c
index 2f561cf..f7a0ae6 100644
--- a/contrib/debuginfo-install/pk-debuginfo-install.c
+++ b/contrib/debuginfo-install/pk-debuginfo-install.c
@@ -519,6 +519,7 @@ main (int argc, char *argv[])
gboolean verbose = FALSE;
gboolean simulate = FALSE;
gboolean no_depends = FALSE;
+ gboolean quiet = FALSE;
GOptionContext *context;
const gchar *repo_id;
gchar *repo_id_debuginfo;
@@ -535,6 +536,9 @@ main (int argc, char *argv[])
{ "no-depends", 'n', 0, G_OPTION_ARG_NONE, &no_depends,
/* command line argument, do we skip packages that depend on the ones specified */
_("Do not install dependencies of the core packages"), NULL },
+ { "quiet", 'q', 0, G_OPTION_ARG_NONE, &quiet,
+ /* command line argument, do we operate quietly */
+ _("Do not display information or progress"), NULL },
{ NULL}
};
@@ -561,10 +565,12 @@ main (int argc, char *argv[])
/* no input */
if (argv[1] == NULL) {
- /* TRANSLATORS: the use needs to specify a list of package names on the command line */
- g_print (_("ERROR: Specify package names to install."));
- g_print ("\n");
-
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: the use needs to specify a list of package names on the command line */
+ g_print (_("ERROR: Specify package names to install."));
+ g_print ("\n");
+ }
/* return correct failure retval */
retval = PK_DEBUGINFO_EXIT_CODE_FAILED;
goto out;
@@ -590,12 +596,15 @@ main (int argc, char *argv[])
pk_progress_bar_set_size (priv->progress_bar, 25);
pk_progress_bar_set_padding (priv->progress_bar, 60);
- /* starting this section */
- g_print ("%i. ", step++);
+ /* should be vocal? */
+ if (!quiet) {
+ /* starting this section */
+ g_print ("%i. ", step++);
- /* TRANSLATORS: we are getting the list of repositories */
- g_print (_("Getting sources list"));
- g_print ("...");
+ /* TRANSLATORS: we are getting the list of repositories */
+ g_print (_("Getting sources list"));
+ g_print ("...");
+ }
/* get all enabled repos */
ret = pk_client_get_repo_list (priv->client, PK_FILTER_ENUM_NONE, &error);
@@ -608,19 +617,22 @@ main (int argc, char *argv[])
goto out;
}
- /* TRANSLATORS: all completed 100% */
- g_print ("%s ", _("OK."));
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: all completed 100% */
+ g_print ("%s ", _("OK."));
- /* TRANSLATORS: tell the user what we found */
- g_print (_("Found %i enabled and %i disabled sources."), priv->enabled->len, priv->disabled->len);
- g_print ("\n");
+ /* TRANSLATORS: tell the user what we found */
+ g_print (_("Found %i enabled and %i disabled sources."), priv->enabled->len, priv->disabled->len);
+ g_print ("\n");
- /* starting this section */
- g_print ("%i. ", step++);
+ /* starting this section */
+ g_print ("%i. ", step++);
- /* TRANSLATORS: we're finding repositories that match out pattern */
- g_print (_("Finding debugging sources"));
- g_print ("...");
+ /* TRANSLATORS: we're finding repositories that match out pattern */
+ g_print (_("Finding debugging sources"));
+ g_print ("...");
+ }
/* find all debuginfo repos for repos that are enabled */
for (i=0; i<priv->enabled->len; i++) {
@@ -645,26 +657,31 @@ main (int argc, char *argv[])
g_free (repo_id_debuginfo);
}
- /* TRANSLATORS: all completed 100% */
- g_print ("%s ", _("OK."));
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: all completed 100% */
+ g_print ("%s ", _("OK."));
- /* TRANSLATORS: tell the user what we found */
- g_print (_("Found %i disabled debuginfo repos."), added_repos->len);
- g_print ("\n");
+ /* TRANSLATORS: tell the user what we found */
+ g_print (_("Found %i disabled debuginfo repos."), added_repos->len);
+ g_print ("\n");
- /* starting this section */
- g_print ("%i. ", step++);
+ /* starting this section */
+ g_print ("%i. ", step++);
- /* TRANSLATORS: we're now enabling all the debug sources we found */
- g_print (_("Enabling debugging sources"));
- g_print ("...");
+ /* TRANSLATORS: we're now enabling all the debug sources we found */
+ g_print (_("Enabling debugging sources"));
+ g_print ("...");
+ }
/* enable all debuginfo repos we found */
ret = pk_debuginfo_install_enable_repos (priv, added_repos, TRUE, &error);
if (!ret) {
- /* TRANSLATORS: operation was not successful */
- g_print ("%s ", _("FAILED."));
-
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: operation was not successful */
+ g_print ("%s ", _("FAILED."));
+ }
/* TRANSLATORS: we're failed to enable the sources, detailed error follows */
g_print ("Failed to enable debugging sources: %s", error->message);
g_print ("\n");
@@ -675,19 +692,22 @@ main (int argc, char *argv[])
goto out;
}
- /* TRANSLATORS: all completed 100% */
- g_print ("%s ", _("OK."));
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: all completed 100% */
+ g_print ("%s ", _("OK."));
- /* TRANSLATORS: tell the user how many we enabled */
- g_print (_("Enabled %i debugging sources."), added_repos->len);
- g_print ("\n");
+ /* TRANSLATORS: tell the user how many we enabled */
+ g_print (_("Enabled %i debugging sources."), added_repos->len);
+ g_print ("\n");
- /* starting this section */
- g_print ("%i. ", step++);
+ /* starting this section */
+ g_print ("%i. ", step++);
- /* TRANSLATORS: we're now finding packages that match in all the repos */
- g_print (_("Finding debugging packages"));
- g_print ("...");
+ /* TRANSLATORS: we're now finding packages that match in all the repos */
+ g_print (_("Finding debugging packages"));
+ g_print ("...");
+ }
/* parse arguments and resolve to packages */
for (i=1; argv[i] != NULL; i++) {
@@ -741,8 +761,11 @@ not_found:
/* no packages? */
if (package_ids_to_install->len == 0) {
- /* TRANSLATORS: operation was not successful */
- g_print ("%s ", _("FAILED."));
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: operation was not successful */
+ g_print ("%s ", _("FAILED."));
+ }
/* TRANSLATORS: no debuginfo packages could be found to be installed */
g_print (_("Found no packages to install."));
@@ -753,12 +776,15 @@ not_found:
goto out;
}
- /* TRANSLATORS: all completed 100% */
- g_print ("%s ", _("OK."));
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: all completed 100% */
+ g_print ("%s ", _("OK."));
- /* TRANSLATORS: tell the user we found some packages, and then list them */
- g_print (_("Found %i packages:"), package_ids_to_install->len);
- g_print ("\n");
+ /* TRANSLATORS: tell the user we found some packages, and then list them */
+ g_print (_("Found %i packages:"), package_ids_to_install->len);
+ g_print ("\n");
+ }
/* optional */
if (!no_depends) {
@@ -766,18 +792,24 @@ not_found:
/* save for later logic */
i = package_ids_to_install->len;
- /* starting this section */
- g_print ("%i. ", step++);
+ /* should be vocal? */
+ if (!quiet) {
+ /* starting this section */
+ g_print ("%i. ", step++);
- /* TRANSLATORS: tell the user we are searching for deps */
- g_print (_("Finding packages that depend on these packages"));
- g_print ("...");
+ /* TRANSLATORS: tell the user we are searching for deps */
+ g_print (_("Finding packages that depend on these packages"));
+ g_print ("...");
+ }
ret = pk_debuginfo_install_add_deps (priv, package_ids_recognised, package_ids_to_install, &error);
if (!ret) {
- /* TRANSLATORS: operation was not successful */
- g_print ("%s ", _("FAILED."));
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: operation was not successful */
+ g_print ("%s ", _("FAILED."));
+ }
/* TRANSLATORS: could not install, detailed error follows */
g_print (_("Could not find dependant packages: %s"), error->message);
g_print ("\n");
@@ -788,48 +820,63 @@ not_found:
goto out;
}
- /* TRANSLATORS: all completed 100% */
- g_print ("%s ", _("OK."));
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: all completed 100% */
+ g_print ("%s ", _("OK."));
- if (i < package_ids_to_install->len) {
- /* TRANSLATORS: tell the user we found some more packages */
- g_print (_("Found %i extra packages."), package_ids_to_install->len - i);
- g_print ("\n");
- } else {
- /* TRANSLATORS: tell the user we found some more packages */
- g_print (_("No extra packages required."));
- g_print ("\n");
+ if (i < package_ids_to_install->len) {
+ /* TRANSLATORS: tell the user we found some more packages */
+ g_print (_("Found %i extra packages."), package_ids_to_install->len - i);
+ g_print ("\n");
+ } else {
+ /* TRANSLATORS: tell the user we found some more packages */
+ g_print (_("No extra packages required."));
+ g_print ("\n");
+ }
}
}
- /* TRANSLATORS: tell the user we found some packages (and deps), and then list them */
- g_print (_("Found %i packages to install:"), package_ids_to_install->len);
- g_print ("\n");
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: tell the user we found some packages (and deps), and then list them */
+ g_print (_("Found %i packages to install:"), package_ids_to_install->len);
+ g_print ("\n");
+ }
/* print list */
- pk_debuginfo_install_print_array (package_ids_to_install);
+ if (!quiet)
+ pk_debuginfo_install_print_array (package_ids_to_install);
/* simulate mode for testing */
if (simulate) {
- /* TRANSLATORS: simulate mode is a testing mode where we quit before the action */
- g_print (_("Not installing packages in simulate mode"));
- g_print ("\n");
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: simulate mode is a testing mode where we quit before the action */
+ g_print (_("Not installing packages in simulate mode"));
+ g_print ("\n");
+ }
goto out;
}
- /* starting this section */
- g_print ("%i. ", step++);
+ /* should be vocal? */
+ if (!quiet) {
+ /* starting this section */
+ g_print ("%i. ", step++);
- /* TRANSLATORS: we are now installing the debuginfo packages we found earlier */
- g_print (_("Installing packages"));
- g_print ("...\n");
+ /* TRANSLATORS: we are now installing the debuginfo packages we found earlier */
+ g_print (_("Installing packages"));
+ g_print ("...\n");
+ }
/* install */
ret = pk_debuginfo_install_packages_install (priv, package_ids_to_install, &error);
if (!ret) {
- /* TRANSLATORS: operation was not successful */
- g_print ("%s ", _("FAILED."));
-
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: operation was not successful */
+ g_print ("%s ", _("FAILED."));
+ }
/* TRANSLATORS: coul dnot install, detailed error follows */
g_print (_("Could not install packages: %s"), error->message);
g_print ("\n");
@@ -840,9 +887,12 @@ not_found:
goto out;
}
- /* TRANSLATORS: all completed 100% */
- g_print (_("OK."));
- g_print ("\n");
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: all completed 100% */
+ g_print (_("OK."));
+ g_print ("\n");
+ }
out:
if (package_ids_to_install != NULL) {
g_ptr_array_foreach (package_ids_to_install, (GFunc) g_free, NULL);
@@ -854,19 +904,23 @@ out:
}
if (added_repos != NULL) {
- /* starting this section */
- g_print ("%i. ", step++);
-
- /* TRANSLATORS: we are now disabling all debuginfo repos we previously enabled */
- g_print (_("Disabling sources previously enabled"));
- g_print ("...");
+ /* should be vocal? */
+ if (!quiet) {
+ /* starting this section */
+ g_print ("%i. ", step++);
+ /* TRANSLATORS: we are now disabling all debuginfo repos we previously enabled */
+ g_print (_("Disabling sources previously enabled"));
+ g_print ("...");
+ }
/* disable all debuginfo repos we previously enabled */
ret = pk_debuginfo_install_enable_repos (priv, added_repos, FALSE, &error);
if (!ret) {
- /* TRANSLATORS: operation was not successful */
- g_print ("%s ", _("FAILED."));
-
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: operation was not successful */
+ g_print ("%s ", _("FAILED."));
+ }
/* TRANSLATORS: no debuginfo packages could be found to be installed, detailed error follows */
g_print (_("Could not disable the debugging sources: %s"), error->message);
g_print ("\n");
@@ -877,12 +931,15 @@ out:
} else {
- /* TRANSLATORS: all completed 100% */
- g_print ("%s ", _("OK."));
+ /* should be vocal? */
+ if (!quiet) {
+ /* TRANSLATORS: all completed 100% */
+ g_print ("%s ", _("OK."));
- /* TRANSLATORS: we disabled all the debugging repos that we enabled before */
- g_print (_("Disabled %i debugging sources."), added_repos->len);
- g_print ("\n");
+ /* TRANSLATORS: we disabled all the debugging repos that we enabled before */
+ g_print (_("Disabled %i debugging sources."), added_repos->len);
+ g_print ("\n");
+ }
}
g_ptr_array_foreach (added_repos, (GFunc) g_free, NULL);
diff --git a/contrib/debuginfo-install/pk-debuginfo-install.xml b/contrib/debuginfo-install/pk-debuginfo-install.xml
index f518be8..66528a5 100644
--- a/contrib/debuginfo-install/pk-debuginfo-install.xml
+++ b/contrib/debuginfo-install/pk-debuginfo-install.xml
@@ -107,6 +107,14 @@ manpage.1: manpage.xml
<para>Do not scan for, or install dependencies of the core packages.</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>
+ <option>--quiet</option>
+ </term>
+ <listitem>
+ <para>Do not display information or progress to the terminal.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
<refsect1>
commit 241eca382b6727c5fdabe16e74c463697d94b160
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Jun 30 11:51:47 2009 +0100
Add a console progress bar to pk-debuginfo-install
diff --git a/contrib/debuginfo-install/Makefile.am b/contrib/debuginfo-install/Makefile.am
index e0a6e0a..ba52f4b 100644
--- a/contrib/debuginfo-install/Makefile.am
+++ b/contrib/debuginfo-install/Makefile.am
@@ -36,6 +36,8 @@ pk_debuginfo_install_SOURCES = \
egg-debug.c \
egg-debug.h \
pk-debuginfo-install.c \
+ pk-progress-bar.c \
+ pk-progress-bar.h \
$(NULL)
pk_debuginfo_install_LDADD = \
diff --git a/contrib/debuginfo-install/pk-debuginfo-install.c b/contrib/debuginfo-install/pk-debuginfo-install.c
index ca146d8..2f561cf 100644
--- a/contrib/debuginfo-install/pk-debuginfo-install.c
+++ b/contrib/debuginfo-install/pk-debuginfo-install.c
@@ -28,6 +28,8 @@
#include <glib/gi18n.h>
#include <packagekit-glib/packagekit.h>
+#include "pk-progress-bar.h"
+
#include "egg-debug.h"
/* Reserved exit codes:
@@ -49,9 +51,10 @@
#define PK_DEBUGINFO_EXIT_CODE_FAILED_TO_DISABLE 8
typedef struct {
- GPtrArray *enabled;
- GPtrArray *disabled;
- PkClient *client;
+ GPtrArray *enabled;
+ GPtrArray *disabled;
+ PkClient *client;
+ PkProgressBar *progress_bar;
} PkDebuginfoInstallPrivate;
/**
@@ -179,6 +182,9 @@ pk_debuginfo_install_packages_install (PkDebuginfoInstallPrivate *priv, GPtrArra
goto out;
}
+ /* TRANSLATORS: we are starting to install the packages */
+ pk_progress_bar_start (priv->progress_bar, _("Starting install"));
+
/* enable this repo */
ret = pk_client_install_packages (priv->client, TRUE, package_ids, &error_local);
if (!ret) {
@@ -186,6 +192,9 @@ pk_debuginfo_install_packages_install (PkDebuginfoInstallPrivate *priv, GPtrArra
g_error_free (error_local);
goto out;
}
+
+ /* end progressbar output */
+ pk_progress_bar_end (priv->progress_bar);
out:
g_strfreev (package_ids);
return ret;
@@ -406,15 +415,92 @@ pk_console_progress_changed_cb (PkClient *client, guint percentage, guint subper
goto out;
}
- if (percentage != PK_CLIENT_PERCENTAGE_INVALID)
- g_print ("%s: %i%%\n", _("Percentage"), percentage);
- else
- g_print ("%s: %s\n", _("Percentage"), _("Unknown"));
+ pk_progress_bar_set_percentage (priv->progress_bar, percentage);
+ pk_progress_bar_set_value (priv->progress_bar, subpercentage);
out:
return;
}
/**
+ * pk_strpad:
+ * @data: the input string
+ * @length: the desired length of the output string, with padding
+ *
+ * Returns the text padded to a length with spaces. If the string is
+ * longer than length then a longer string is returned.
+ *
+ * Return value: The padded string
+ **/
+static gchar *
+pk_strpad (const gchar *data, guint length)
+{
+ gint size;
+ guint data_len;
+ gchar *text;
+ gchar *padding;
+
+ if (data == NULL)
+ return g_strnfill (length, ' ');
+
+ /* ITS4: ignore, only used for formatting */
+ data_len = strlen (data);
+
+ /* calculate */
+ size = (length - data_len);
+ if (size <= 0)
+ return g_strdup (data);
+
+ padding = g_strnfill (size, ' ');
+ text = g_strdup_printf ("%s%s", data, padding);
+ g_free (padding);
+ return text;
+}
+
+/**
+ * pk_console_package_cb:
+ **/
+static void
+pk_console_package_cb (PkClient *client, const PkPackageObj *obj, PkDebuginfoInstallPrivate *priv)
+{
+ PkRoleEnum role;
+ gchar *package = NULL;
+ gchar *info_pad = NULL;
+ gchar *text = NULL;
+
+ /* get role */
+ pk_client_get_role (client, &role, NULL, NULL);
+
+ /* ignore some */
+ if (obj->info == PK_INFO_ENUM_FINISHED)
+ goto out;
+ if (role != PK_ROLE_ENUM_INSTALL_PACKAGES)
+ goto out;
+
+ /* make these all the same length */
+ info_pad = pk_strpad (pk_info_enum_to_text (obj->info), 12);
+
+ /* don't pretty print if not on console */
+ if (FALSE) {
+ g_print ("%s %s-%s.%s\n", info_pad, obj->id->name, obj->id->version, obj->id->arch);
+ goto out;
+ }
+
+ /* pad the name-version */
+ if (obj->id->version == NULL ||
+ obj->id->version[0] == '\0')
+ package = g_strdup (obj->id->name);
+ else
+ package = g_strdup_printf ("%s-%s", obj->id->name, obj->id->version);
+ text = g_strdup_printf ("%s\t%s", info_pad, package);
+ pk_progress_bar_start (priv->progress_bar, text);
+
+out:
+ g_free (text);
+ g_free (package);
+ g_free (info_pad);
+}
+
+/**
* main:
**/
int
@@ -426,8 +512,7 @@ main (int argc, char *argv[])
GPtrArray *package_ids_recognised = NULL;
GPtrArray *package_ids_to_install = NULL;
guint i;
- guint /* return correct failure retval */
- retval = 0;
+ guint retval = 0;
gchar *package_id;
gchar *name;
gchar *name_debuginfo;
@@ -496,9 +581,15 @@ main (int argc, char *argv[])
priv->client = pk_client_new ();
g_signal_connect (priv->client, "repo-detail", G_CALLBACK (pk_debuginfo_install_repo_details_cb), priv);
g_signal_connect (priv->client, "progress-changed", G_CALLBACK (pk_console_progress_changed_cb), priv);
+ g_signal_connect (priv->client, "package", G_CALLBACK (pk_console_package_cb), priv);
pk_client_set_synchronous (priv->client, TRUE, NULL);
pk_client_set_use_buffer (priv->client, TRUE, NULL);
+ /* use text progressbar */
+ priv->progress_bar = pk_progress_bar_new ();
+ pk_progress_bar_set_size (priv->progress_bar, 25);
+ pk_progress_bar_set_padding (priv->progress_bar, 60);
+
/* starting this section */
g_print ("%i. ", step++);
@@ -731,7 +822,7 @@ not_found:
/* TRANSLATORS: we are now installing the debuginfo packages we found earlier */
g_print (_("Installing packages"));
- g_print ("...");
+ g_print ("...\n");
/* install */
ret = pk_debuginfo_install_packages_install (priv, package_ids_to_install, &error);
@@ -807,6 +898,8 @@ out:
}
if (priv->client != NULL)
g_object_unref (priv->client);
+ if (priv->progress_bar != NULL)
+ g_object_unref (priv->progress_bar);
return retval;
}
diff --git a/contrib/debuginfo-install/pk-progress-bar.c b/contrib/debuginfo-install/pk-progress-bar.c
new file mode 100644
index 0000000..bf323dc
--- /dev/null
+++ b/contrib/debuginfo-install/pk-progress-bar.c
@@ -0,0 +1,376 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <glib.h>
+#include <string.h>
+
+#include "pk-progress-bar.h"
+
+#include "egg-debug.h"
+
+#define PK_PROGRESS_BAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PK_TYPE_PROGRESS_BAR, PkProgressBarPrivate))
+
+typedef struct {
+ guint position;
+ gboolean move_forward;
+} PkProgressBarPulseState;
+
+struct PkProgressBarPrivate
+{
+ guint size;
+ guint percentage;
+ guint value;
+ guint padding;
+ guint timer_id;
+ PkProgressBarPulseState pulse_state;
+};
+
+#define PK_PROGRESS_BAR_PERCENTAGE_INVALID 101
+#define PK_PROGRESS_BAR_PULSE_TIMEOUT 40 /* ms */
+
+G_DEFINE_TYPE (PkProgressBar, pk_progress_bar, G_TYPE_OBJECT)
+
+/**
+ * pk_progress_bar_set_padding:
+ **/
+gboolean
+pk_progress_bar_set_padding (PkProgressBar *self, guint padding)
+{
+ g_return_val_if_fail (PK_IS_PROGRESS_BAR (self), FALSE);
+ g_return_val_if_fail (padding < 100, FALSE);
+ self->priv->padding = padding;
+ return TRUE;
+}
+
+/**
+ * pk_progress_bar_set_size:
+ **/
+gboolean
+pk_progress_bar_set_size (PkProgressBar *self, guint size)
+{
+ g_return_val_if_fail (PK_IS_PROGRESS_BAR (self), FALSE);
+ g_return_val_if_fail (size < 100, FALSE);
+ self->priv->size = size;
+ return TRUE;
+}
+
+/**
+ * pk_progress_bar_draw:
+ **/
+static gboolean
+pk_progress_bar_draw (PkProgressBar *self, guint value)
+{
+ guint section;
+ guint i;
+
+ /* restore cursor */
+ g_print ("%c8", 0x1B);
+
+ section = (guint) ((gfloat) self->priv->size / (gfloat) 100.0 * (gfloat) value);
+ g_print ("[");
+ for (i=0; i<section; i++)
+ g_print ("=");
+ for (i=0; i<self->priv->size - section; i++)
+ g_print (" ");
+ g_print ("] ");
+ if (self->priv->percentage != PK_PROGRESS_BAR_PERCENTAGE_INVALID)
+ g_print ("(%i%%) ", self->priv->percentage);
+ else
+ g_print (" ");
+ return TRUE;
+}
+
+/**
+ * pk_progress_bar_set_percentage:
+ **/
+gboolean
+pk_progress_bar_set_percentage (PkProgressBar *self, guint percentage)
+{
+ g_return_val_if_fail (PK_IS_PROGRESS_BAR (self), FALSE);
+ g_return_val_if_fail (percentage <= PK_PROGRESS_BAR_PERCENTAGE_INVALID, FALSE);
+
+ /* check for old value */
+ if (percentage == self->priv->percentage) {
+ egg_debug ("skipping as the same");
+ goto out;
+ }
+
+ self->priv->percentage = percentage;
+ pk_progress_bar_draw (self, self->priv->value);
+out:
+ return TRUE;
+}
+
+/**
+ * pk_progress_bar_pulse_bar:
+ **/
+static gboolean
+pk_progress_bar_pulse_bar (PkProgressBar *self)
+{
+ gint i;
+
+ /* restore cursor */
+ g_print ("%c8", 0x1B);
+
+ if (self->priv->pulse_state.move_forward) {
+ if (self->priv->pulse_state.position == self->priv->size - 1)
+ self->priv->pulse_state.move_forward = FALSE;
+ else
+ self->priv->pulse_state.position++;
+ } else if (!self->priv->pulse_state.move_forward) {
+ if (self->priv->pulse_state.position == 1)
+ self->priv->pulse_state.move_forward = TRUE;
+ else
+ self->priv->pulse_state.position--;
+ }
+
+ g_print ("[");
+ for (i=0; i<(gint)self->priv->pulse_state.position-1; i++)
+ g_print (" ");
+ g_print ("==");
+ for (i=0; i<(gint) (self->priv->size - self->priv->pulse_state.position - 1); i++)
+ g_print (" ");
+ g_print ("] ");
+ if (self->priv->percentage != PK_PROGRESS_BAR_PERCENTAGE_INVALID)
+ g_print ("(%i%%) ", self->priv->percentage);
+ else
+ g_print (" ");
+
+ return TRUE;
+}
+
+/**
+ * pk_progress_bar_draw_pulse_bar:
+ **/
+static void
+pk_progress_bar_draw_pulse_bar (PkProgressBar *self)
+{
+ /* have we already got zero percent? */
+ if (self->priv->timer_id != 0)
+ return;
+ if (TRUE) {
+ self->priv->pulse_state.position = 1;
+ self->priv->pulse_state.move_forward = TRUE;
+ self->priv->timer_id = g_timeout_add (PK_PROGRESS_BAR_PULSE_TIMEOUT, (GSourceFunc) pk_progress_bar_pulse_bar, self);
+ }
+}
+
+/**
+ * pk_progress_bar_set_value:
+ **/
+gboolean
+pk_progress_bar_set_value (PkProgressBar *self, guint value)
+{
+ g_return_val_if_fail (PK_IS_PROGRESS_BAR (self), FALSE);
+ g_return_val_if_fail (value <= PK_PROGRESS_BAR_PERCENTAGE_INVALID, FALSE);
+
+ /* check for old value */
+ if (value == self->priv->value) {
+ egg_debug ("skipping as the same");
+ goto out;
+ }
+
+ /* save */
+ self->priv->value = value;
+
+ /* either pulse or display */
+ if (value == PK_PROGRESS_BAR_PERCENTAGE_INVALID) {
+ pk_progress_bar_draw (self, 0);
+ pk_progress_bar_draw_pulse_bar (self);
+ } else {
+ if (self->priv->timer_id != 0) {
+ g_source_remove (self->priv->timer_id);
+ self->priv->timer_id = 0;
+ }
+ pk_progress_bar_draw (self, value);
+ }
+out:
+ return TRUE;
+}
+
+/**
+ * pk_strpad:
+ * @data: the input string
+ * @length: the desired length of the output string, with padding
+ *
+ * Returns the text padded to a length with spaces. If the string is
+ * longer than length then a longer string is returned.
+ *
+ * Return value: The padded string
+ **/
+static gchar *
+pk_strpad (const gchar *data, guint length)
+{
+ gint size;
+ guint data_len;
+ gchar *text;
+ gchar *padding;
+
+ if (data == NULL)
+ return g_strnfill (length, ' ');
+
+ /* ITS4: ignore, only used for formatting */
+ data_len = strlen (data);
+
+ /* calculate */
+ size = (length - data_len);
+ if (size <= 0)
+ return g_strdup (data);
+
+ padding = g_strnfill (size, ' ');
+ text = g_strdup_printf ("%s%s", data, padding);
+ g_free (padding);
+ return text;
+}
+
+/**
+ * pk_progress_bar_start:
+ **/
+gboolean
+pk_progress_bar_start (PkProgressBar *self, const gchar *text)
+{
+ gchar *text_pad;
+
+ g_return_val_if_fail (PK_IS_PROGRESS_BAR (self), FALSE);
+
+ /* finish old value */
+ if (self->priv->value != 0 && self->priv->value != 100) {
+ pk_progress_bar_draw (self, self->priv->value);
+ }
+
+ /* new item */
+ if (self->priv->value != 0)
+ g_print ("\n");
+
+ /* make these all the same length */
+ text_pad = pk_strpad (text, self->priv->padding);
+ g_print ("%s", text_pad);
+
+ /* save cursor in new position */
+ g_print ("%c7", 0x1B);
+
+ /* reset */
+ self->priv->percentage = 0;
+ self->priv->value = 0;
+ pk_progress_bar_draw (self, 0);
+
+ g_free (text_pad);
+ return TRUE;
+}
+
+/**
+ * pk_progress_bar_end:
+ **/
+gboolean
+pk_progress_bar_end (PkProgressBar *self)
+{
+ g_return_val_if_fail (PK_IS_PROGRESS_BAR (self), FALSE);
+
+ self->priv->value = 100;
+ self->priv->percentage = 100;
+ pk_progress_bar_draw (self, 100);
+ g_print ("\n");
+
+ return TRUE;
+}
+
+/**
+ * pk_progress_bar_finalize:
+ **/
+static void
+pk_progress_bar_finalize (GObject *object)
+{
+ PkProgressBar *self;
+ g_return_if_fail (PK_IS_PROGRESS_BAR (object));
+ self = PK_PROGRESS_BAR (object);
+
+ if (self->priv->timer_id != 0)
+ g_source_remove (self->priv->timer_id);
+
+ G_OBJECT_CLASS (pk_progress_bar_parent_class)->finalize (object);
+}
+
+/**
+ * pk_progress_bar_class_init:
+ **/
+static void
+pk_progress_bar_class_init (PkProgressBarClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = pk_progress_bar_finalize;
+ g_type_class_add_private (klass, sizeof (PkProgressBarPrivate));
+}
+
+/**
+ * pk_progress_bar_init:
+ **/
+static void
+pk_progress_bar_init (PkProgressBar *self)
+{
+ self->priv = PK_PROGRESS_BAR_GET_PRIVATE (self);
+
+ self->priv->size = 10;
+ self->priv->percentage = 0;
+ self->priv->value = 0;
+ self->priv->padding = 0;
+ self->priv->timer_id = 0;
+}
+
+/**
+ * pk_progress_bar_new:
+ * Return value: A new progress_bar class instance.
+ **/
+PkProgressBar *
+pk_progress_bar_new (void)
+{
+ PkProgressBar *self;
+ self = g_object_new (PK_TYPE_PROGRESS_BAR, NULL);
+ return PK_PROGRESS_BAR (self);
+}
+
+/***************************************************************************
+ *** MAKE CHECK TESTS ***
+ ***************************************************************************/
+#ifdef EGG_TEST
+#include "egg-test.h"
+
+void
+egg_test_progress_bar (EggTest *test)
+{
+ PkProgressBar *self;
+
+ if (!egg_test_start (test, "PkProgressBar"))
+ return;
+
+ /************************************************************/
+ egg_test_title (test, "get an instance");
+ self = pk_progress_bar_new ();
+ if (self != NULL)
+ egg_test_success (test, NULL);
+ else
+ egg_test_failed (test, NULL);
+
+ g_object_unref (self);
+
+ egg_test_end (test);
+}
+#endif
+
diff --git a/contrib/debuginfo-install/pk-progress-bar.h b/contrib/debuginfo-install/pk-progress-bar.h
new file mode 100644
index 0000000..4670a0a
--- /dev/null
+++ b/contrib/debuginfo-install/pk-progress-bar.h
@@ -0,0 +1,66 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __PK_PROGRESS_BAR_H
+#define __PK_PROGRESS_BAR_H
+
+#include <glib-object.h>
+#include <packagekit-glib/packagekit.h>
+
+G_BEGIN_DECLS
+
+#define PK_TYPE_PROGRESS_BAR (pk_progress_bar_get_type ())
+#define PK_PROGRESS_BAR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PK_TYPE_PROGRESS_BAR, PkProgressBar))
+#define PK_PROGRESS_BAR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PK_TYPE_PROGRESS_BAR, PkProgressBarClass))
+#define PK_IS_PROGRESS_BAR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PK_TYPE_PROGRESS_BAR))
+#define PK_IS_PROGRESS_BAR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PK_TYPE_PROGRESS_BAR))
+#define PK_PROGRESS_BAR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PK_TYPE_PROGRESS_BAR, PkProgressBarClass))
+
+typedef struct PkProgressBarPrivate PkProgressBarPrivate;
+
+typedef struct
+{
+ GObject parent;
+ PkProgressBarPrivate *priv;
+} PkProgressBar;
+
+typedef struct
+{
+ GObjectClass parent_class;
+} PkProgressBarClass;
+
+GType pk_progress_bar_get_type (void);
+PkProgressBar *pk_progress_bar_new (void);
+gboolean pk_progress_bar_set_size (PkProgressBar *progress_bar,
+ guint size);
+gboolean pk_progress_bar_set_padding (PkProgressBar *progress_bar,
+ guint padding);
+gboolean pk_progress_bar_set_percentage (PkProgressBar *progress_bar,
+ guint percentage);
+gboolean pk_progress_bar_set_value (PkProgressBar *progress_bar,
+ guint value);
+gboolean pk_progress_bar_start (PkProgressBar *progress_bar,
+ const gchar *text);
+gboolean pk_progress_bar_end (PkProgressBar *progress_bar);
+
+G_END_DECLS
+
+#endif /* __PK_PROGRESS_BAR_H */
commit 4850338bf4e5ef70b511f7a2cec2cf8c58616c1a
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Tue Jun 30 00:10:42 2009 +0200
portage: use a trick to prevent outputs when adding a repository
diff --git a/backends/portage/portageBackend.py b/backends/portage/portageBackend.py
index d44c325..32336a5 100755
--- a/backends/portage/portageBackend.py
+++ b/backends/portage/portageBackend.py
@@ -905,8 +905,7 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
mergetask.merge()
def repo_enable(self, repoid, enable):
- # NOTES: use layman API
- # TODO: remove output when enable=True
+ # NOTES: use layman API >= 1.2.3
self.status(STATUS_INFO)
self.allow_cancel(True)
self.percentage(None)
@@ -935,7 +934,17 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
# if repository already enabled, ignoring
if enable and not is_repository_enabled(installed_layman_db, repoid):
try:
- installed_layman_db.add(available_layman_db.select(repoid))
+ # TODO: clean the trick to prevent outputs from layman
+ orig_out = sys.stdout
+ orig_err = sys.stderr
+ sys.stdout = open('/dev/null', 'w')
+ sys.stderr = open('/dev/null', 'w')
+
+ installed_layman_db.add(available_layman_db.select(repoid),
+ quiet=True)
+
+ sys.stdout = orig_out
+ sys.stderr = orig_err
except Exception, e:
self.error(ERROR_INTERNAL_ERROR,
"Failed to enable repository "+repoid+" : "+str(e))
commit 4ca4cbe5a4b362e43b034d6075783417451b790d
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Mon Jun 29 23:41:58 2009 +0200
portage: improve get_repo_list and repo_enable functions, refactoring
diff --git a/backends/portage/portageBackend.py b/backends/portage/portageBackend.py
index e1729ae..d44c325 100755
--- a/backends/portage/portageBackend.py
+++ b/backends/portage/portageBackend.py
@@ -256,6 +256,11 @@ def get_search_list(keys):
return search_list
+def is_repository_enabled(layman_db, repo_name):
+ if repo_name in layman_db.overlays.keys():
+ return True
+ return False
+
class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
def __init__(self, args, lock=True):
@@ -599,16 +604,24 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
self.percentage(100)
def get_repo_list(self, filters):
- # TODO: filters
- # TODO: not official
- # TODO: not supported (via filters ?)
+ # NOTES:
+ # use layman API
+ # returns only official and supported repositories
+ # TODO: what filters are for ?
self.status(STATUS_INFO)
self.allow_cancel(True)
self.percentage(None)
- layman_db = layman.db.RemoteDB(layman.config.Config())
- for o in layman_db.overlays.keys():
- self.repo_detail(o, layman_db.overlays[o].description, True)
+ # get installed and available dbs
+ installed_layman_db = layman.db.DB(layman.config.Config())
+ available_layman_db = layman.db.RemoteDB(layman.config.Config())
+
+ for o in available_layman_db.overlays.keys():
+ if available_layman_db.overlays[o].is_official() \
+ and available_layman_db.overlays[o].is_supported():
+ self.repo_detail(o,
+ available_layman_db.overlays[o].description,
+ is_repository_enabled(installed_layman_db, o))
def get_requires(self, filters, pkgs, recursive):
# TODO: filters
@@ -892,6 +905,8 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
mergetask.merge()
def repo_enable(self, repoid, enable):
+ # NOTES: use layman API
+ # TODO: remove output when enable=True
self.status(STATUS_INFO)
self.allow_cancel(True)
self.percentage(None)
@@ -900,42 +915,30 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
installed_layman_db = layman.db.DB(layman.config.Config())
available_layman_db = layman.db.RemoteDB(layman.config.Config())
- # disabling (removing) a db
- if not enable:
- if not repoid in installed_layman_db.overlays.keys():
- self.error(ERROR_REPO_NOT_FOUND, "Repository %s was not found" %repoid)
- return
-
- overlay = installed_layman_db.select(repoid)
-
- if not overlay:
- self.error(ERROR_REPO_NOT_FOUND, "Repository %s was not found" %repoid)
- return
+ # check now for repoid so we don't have to do it after
+ if not repoid in available_layman_db.overlays.keys():
+ self.error(ERROR_REPO_NOT_FOUND,
+ "Repository %s was not found" % repoid)
+ return
+ # disabling (removing) a db
+ # if repository already disabled, ignoring
+ if not enable and is_repository_enabled(installed_layman_db, repoid):
try:
- installed_layman_db.delete(overlay)
+ installed_layman_db.delete(installed_layman_db.select(repoid))
except Exception, e:
self.error(ERROR_INTERNAL_ERROR,
- "Failed to disable repository " + repoid + " : " + str(e))
+ "Failed to disable repository "+repoid+" : "+str(e))
return
# enabling (adding) a db
- if enable:
- if not repoid in available_layman_db.overlays.keys():
- self.error(ERROR_REPO_NOT_FOUND, "Repository %s was not found" %repoid)
- return
-
- overlay = available_layman_db.select(repoid)
-
- if not overlay:
- self.error(ERROR_REPO_NOT_FOUND, "Repository %s was not found" %repoid)
- return
-
+ # if repository already enabled, ignoring
+ if enable and not is_repository_enabled(installed_layman_db, repoid):
try:
- installed_layman_db.add(overlay, True)
+ installed_layman_db.add(available_layman_db.select(repoid))
except Exception, e:
self.error(ERROR_INTERNAL_ERROR,
- "Failed to disable repository " + repoid + " : " + str(e))
+ "Failed to enable repository "+repoid+" : "+str(e))
return
def resolve(self, filters, pkgs):
commit cf749cf26a0c5dbbaa505833b5c264c0c60d4bd0
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Mon Jun 29 22:28:37 2009 +0200
portage: improved error management and progress for get_details
diff --git a/backends/portage/portageBackend.py b/backends/portage/portageBackend.py
index 36ee816..e1729ae 100755
--- a/backends/portage/portageBackend.py
+++ b/backends/portage/portageBackend.py
@@ -509,48 +509,58 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
def get_details(self, pkgs):
self.status(STATUS_INFO)
self.allow_cancel(True)
- self.percentage(None)
+ self.percentage(0)
+
+ nb_pkg = float(len(pkgs))
+ pkg_processed = 0.0
+
+ def get_size(cpv):
+ # should return package size if not installed
+ # or 0 if installed
+ if self.is_installed(cpv):
+ return 0
+ ebuild = portage.portdb.findname(cpv)
+ if not ebuild: # should probably not happen
+ return 0
+ dir = os.path.dirname(ebuild)
+ manifest = portage.manifest.Manifest(dir,
+ portage.settings["DISTDIR"])
+ uris = portage.portdb.getFetchMap(cpv)
+ return manifest.getDistfilesSize(uris)
for pkg in pkgs:
cpv = id_to_cpv(pkg)
- # is cpv valid
- if not portage.portdb.cpv_exists(cpv):
- # self.warning ? self.error ?
- self.message(MESSAGE_COULD_NOT_FIND_PACKAGE,
- "Could not find the package %s" % pkg)
+ if not self.is_cpv_valid(cpv):
+ self.error(ERROR_PACKAGE_NOT_FOUND,
+ "Package %s was not found" % pkg)
continue
homepage, desc, license = self.get_metadata(cpv,
["HOMEPAGE", "DESCRIPTION", "LICENSE"])
- # size should be prompted only if not installed
- size = 0
- if not self.is_installed(cpv):
- ebuild = portage.portdb.findname(cpv)
- if ebuild:
- dir = os.path.dirname(ebuild)
- manifest = portage.manifest.Manifest(dir, portage.settings["DISTDIR"])
- uris = portage.portdb.getFetchMap(cpv)
- size = manifest.getDistfilesSize(uris)
-
self.details(self.cpv_to_id(cpv), license, get_group(cpv),
- desc, homepage, size)
+ desc, homepage, get_size(cpv))
+
+ pkg_processed += 100.0
+ self.percentage(int(pkg_processed/nb_pkg))
- def get_files(self, pkgids):
+ self.percentage(100)
+
+ def get_files(self, pkgs):
self.status(STATUS_INFO)
self.allow_cancel(True)
self.percentage(0)
- nb_pkg = float(len(pkgids))
+ nb_pkg = float(len(pkgs))
pkg_processed = 0.0
- for pkgid in pkgids:
- cpv = id_to_cpv(pkgid)
+ for pkg in pkgs:
+ cpv = id_to_cpv(pkg)
if not self.is_cpv_valid(cpv):
self.error(ERROR_PACKAGE_NOT_FOUND,
- "Package %s was not found" % pkgid)
+ "Package %s was not found" % pkg)
continue
if not self.is_installed(cpv):
@@ -562,7 +572,7 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
files = sorted(files)
files = ";".join(files)
- self.files(pkgid, files)
+ self.files(pkg, files)
pkg_processed += 100.0
self.percentage(int(pkg_processed/nb_pkg))
commit 22adcbceeaf1c634e73f9a66e7e92061b98265a4
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Mon Jun 29 21:15:10 2009 +0200
portage: improved error management and progress for get_files, refactorization
diff --git a/backends/portage/portageBackend.py b/backends/portage/portageBackend.py
index ed96013..36ee816 100755
--- a/backends/portage/portageBackend.py
+++ b/backends/portage/portageBackend.py
@@ -274,6 +274,27 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
return True
return False
+ def is_cpv_valid(self, cpv):
+ if self.is_installed(cpv):
+ # actually if is_installed return True that means cpv is in db
+ return True
+ elif portage.portdb.cpv_exists(cpv):
+ return True
+
+ return False
+
+ def get_file_list(self, cpv):
+ cat, pv = portage.catsplit(cpv)
+ db = portage.dblink(cat, pv, portage.settings["ROOT"],
+ self.portage_settings, treetype="vartree",
+ vartree=self.vardb)
+
+ contents = db.getcontents()
+ if not contents:
+ return []
+
+ return db.getcontents().keys()
+
def get_newer_cpv(self, cpv_list):
newer = cpv_list[0]
for cpv in cpv_list:
@@ -519,31 +540,35 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
def get_files(self, pkgids):
self.status(STATUS_INFO)
self.allow_cancel(True)
- self.percentage(None)
+ self.percentage(0)
+
+ nb_pkg = float(len(pkgids))
+ pkg_processed = 0.0
for pkgid in pkgids:
cpv = id_to_cpv(pkgid)
- # is cpv valid
- if not portage.portdb.cpv_exists(cpv):
+ if not self.is_cpv_valid(cpv):
self.error(ERROR_PACKAGE_NOT_FOUND,
"Package %s was not found" % pkgid)
continue
- if not self.vardb.cpv_exists(cpv):
- self.error(ERROR_PACKAGE_NOT_INSTALLED,
- "Package %s is not installed" % pkgid)
+ if not self.is_installed(cpv):
+ self.error(ERROR_CANNOT_GET_FILELIST,
+ "get-files is only available for installed packages")
continue
- cat, pv = portage.catsplit(cpv)
- db = portage.dblink(cat, pv, portage.settings["ROOT"],
- self.portage_settings, treetype="vartree", vartree=self.vardb)
- files = db.getcontents().keys()
+ files = self.get_file_list(cpv)
files = sorted(files)
files = ";".join(files)
self.files(pkgid, files)
+ pkg_processed += 100.0
+ self.percentage(int(pkg_processed/nb_pkg))
+
+ self.percentage(100)
+
def get_packages(self, filters):
self.status(STATUS_QUERY)
self.allow_cancel(True)
@@ -1009,14 +1034,7 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
nb_cpv = float(len(cpv_list))
for cpv in cpv_list:
- cat, pv = portage.catsplit(cpv)
- db = portage.dblink(cat, pv, portage.settings["ROOT"],
- self.portage_settings, treetype="vartree",
- vartree=self.vardb)
- contents = db.getcontents()
- if not contents:
- continue
- for f in contents.keys():
+ for f in self.get_file_list(cpv):
if (is_full_path and key == f) \
or (not is_full_path and searchre.search(f)):
self.package(cpv)
commit adab3bc6b571e46fc51931930b7b447dbfe1ae30
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Mon Jun 29 20:34:55 2009 +0200
portage: add filter management to get_packages
diff --git a/backends/portage/portageBackend.py b/backends/portage/portageBackend.py
index 4df92af..ed96013 100755
--- a/backends/portage/portageBackend.py
+++ b/backends/portage/portageBackend.py
@@ -545,19 +545,24 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
self.files(pkgid, files)
def get_packages(self, filters):
- # TODO: use cases tests on fedora 11
- # TODO: progress ?
- # TODO: installed before non-installed ?
self.status(STATUS_QUERY)
self.allow_cancel(True)
- self.percentage(None)
+ self.percentage(0)
fltlist = filters.split(';')
+ cp_list = self.get_all_cp(fltlist)
+ nb_cp = float(len(cp_list))
+ cp_processed = 0.0
for cp in self.get_all_cp(fltlist):
for cpv in self.get_all_cpv(cp, fltlist):
self.package(cpv)
+ cp_processed += 100.0
+ self.percentage(int(cp_processed/nb_cp))
+
+ self.percentage(100)
+
def get_repo_list(self, filters):
# TODO: filters
# TODO: not official
@@ -1044,7 +1049,6 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
def search_name(self, filters, keys):
# NOTES: searching in package name, excluding category
- # TODO: "-" equals "_" ? should be specified
self.status(STATUS_QUERY)
self.allow_cancel(True)
self.percentage(0)
commit 8793f72f9a33394aa72c4fca45a0d1edb8ea1213
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Mon Jun 29 20:16:48 2009 +0200
portage: improve resolve function to use filters and correctly use list in input
diff --git a/backends/portage/portageBackend.py b/backends/portage/portageBackend.py
index bc7aceb..4df92af 100755
--- a/backends/portage/portageBackend.py
+++ b/backends/portage/portageBackend.py
@@ -53,6 +53,8 @@ from itertools import izip
# TODO:
# ERRORS with messages ?
# manage slots
+# remove percentage(None) if percentage is used
+# change how newest is working ?
# Map Gentoo categories to the PackageKit group name space
CATEGORY_GROUP_MAP = {
@@ -386,7 +388,7 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
# newest filter
if filter_newest:
- self.filter_newest(cpv_list, fltlist)
+ cpv_list = self.filter_newest(cpv_list, fltlist)
return cpv_list
@@ -897,26 +899,38 @@ class PackageKitPortageBackend(PackageKitBaseBackend, PackagekitPackage):
return
def resolve(self, filters, pkgs):
- # TODO: filters
self.status(STATUS_QUERY)
self.allow_cancel(True)
- self.percentage(None)
+ self.percentage(0)
+ fltlist = filters.split(';')
+ cp_list = self.get_all_cp(fltlist)
+ nb_cp = float(len(cp_list))
+ cp_processed = 0.0
+
+ reg_expr = []
for pkg in pkgs:
- # TODO: be case sensitive ?
- searchre = re.compile(pkg, re.IGNORECASE)
+ reg_expr.append("^" + re.escape(pkg) + "$")
+ reg_expr = "|".join(reg_expr)
- # TODO: optim with filter = installed
- for cp in portage.portdb.cp_all():
- if searchre.search(cp):
- #print self.vardb.dep_bestmatch(cp)
- self.package(portage.portdb.xmatch("bestmatch-visible", cp))
+ # specifications says "be case sensitive"
+ s = re.compile(reg_expr)
+
+ for cp in cp_list:
+ if s.match(cp):
+ for cpv in self.get_all_cpv(cp, fltlist):
+ self.package(cpv)
+
+ cp_processed += 100.0
+ self.percentage(int(cp_processed/nb_cp))
+
+ self.percentage(100)
def search_details(self, filters, keys):
# NOTES: very bad performance
self.status(STATUS_QUERY)
self.allow_cancel(True)
- self.percentage(None)
+ self.percentage(0)
fltlist = filters.split(';')
cp_list = self.get_all_cp(fltlist)
commit 0887a2af48c6a69c8539e6d23499a7f5f2c7c889
Merge: 219ff05... 920702b...
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Jun 29 18:44:22 2009 +0100
Fix merge conflicts
commit 219ff0573fd4ff5c3f6ccb26c4ba2dabd4645815
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Jun 29 18:40:25 2009 +0100
Add some more documentation explaining the filters
diff --git a/docs/api/spec/pk-concepts.xml b/docs/api/spec/pk-concepts.xml
index 482357a..aaf82b2 100644
--- a/docs/api/spec/pk-concepts.xml
+++ b/docs/api/spec/pk-concepts.xml
@@ -153,30 +153,40 @@
<tbody>
<row>
<entry><literal>installed</literal> or <literal>~installed</literal></entry>
- <entry>If the package is installed on the system</entry>
+ <entry>
+ If the package is currently installed.
+ Packages returned with the <literal>~installed</literal> filter set
+ are available in remote software sources.
+ </entry>
</row>
<row>
<entry><literal>devel</literal> or <literal>~devel</literal></entry>
- <entry>Development packages typically end -devel, -dgb and -static.</entry>
+ <entry>
+ Development packages are typically not required for normal operation
+ and typically have the suffixes -devel, -dgb and -static.
+ </entry>
</row>
<row>
<entry><literal>gui</literal> or <literal>~gui</literal></entry>
- <entry>GUI programs typically depend on gtk, libkde or libxfce.</entry>
+ <entry>
+ GUI programs typically depend on gtk, libkde or libxfce.
+ </entry>
</row>
<row>
<entry><literal>application</literal> or <literal>~application</literal></entry>
- <entry>Applications provide desktop files.</entry>
+ <entry>
+ Packages that provide desktop files and are probably applications.
+ </entry>
</row>
<row>
<entry><literal>free</literal> or <literal>~free</literal></entry>
<entry>
Free software. The package contains only software and
other content that is available under a free license.
- See http://fedoraproject.org/wiki/Licensing for a list
- of licenses that are considered free. If a license
- cannot be determined from the package metadata, or the
- status of the license is not known, the package will
- be marked as 'non-free'.
+ See the <ulink url="http://fedoraproject.org/wiki/Licensing">Fedora wiki</ulink>
+ for a list of licenses that are considered free.
+ If a license cannot be determined from the package metadata, or the
+ status of the license is not known, the package will be marked as 'non-free'.
</entry>
</row>
<row>
@@ -184,12 +194,15 @@
<entry>
Repositories may want to specify if a package should be visible
in an application chooser.
+ This is only really useful for embedded environments where the
+ package list is manually chosen.
</entry>
</row>
<row>
<entry><literal>supported</literal> or <literal>~supported</literal></entry>
<entry>
- If the package is supported or is a third party addon.
+ If the package is supported by the distribution or retailer or is a
+ unsupported third party package.
</entry>
</row>
<row>
@@ -207,12 +220,23 @@
<row>
<entry><literal>newest</literal> or <literal>~newest</literal></entry>
<entry>
- The newest filter will only return the newest package available.
- This is useful if you are searching for <literal>gimp</literal>
- and only <literal>gimp-2.4.5-1.fc9.i386</literal> would be returned,
- not <literal>gimp-2.4.5-1.fc9.i386</literal>,
- <literal>gimp-2.4.4-1.fc9.i386</literal> and
- <literal>gimp-2.4.3-1.fc9.i386</literal>.
+ <para>
+ The newest filter will only return the newest package available.
+ This is useful if you are searching for <literal>gimp</literal>
+ and only <literal>gimp-2.4.5-1.fc9.i386</literal> would be returned,
+ not <literal>gimp-2.4.5-1.fc9.i386</literal>,
+ <literal>gimp-2.4.4-1.fc9.i386</literal> and
+ <literal>gimp-2.4.3-1.fc9.i386</literal>.
+ </para>
+ <para>
+ <emphasis>NOTE:</emphasis>
+ The <literal>newest</literal> filter processes installed and available
+ package lists separately and so the <literal>installed</literal> or
+ <literal>~installed</literal> filter also has to be specified if only one type of
+ results are required.
+ There is no way to do a <literal>newest</literal> filter across both
+ installed and available packages.
+ </para>
</entry>
</row>
<row>
@@ -268,6 +292,96 @@
</tgroup>
</informaltable>
+ <sect2 id="introduction-ideas-filters-removeinstalled">
+ <title>Removing installed versions in search results</title>
+ <para>
+ When outputting a list of packages, it's important to remove the <emphasis>available</emphasis>
+ package if the <emphasis>same</emphasis> version is installed.
+ This is required, as the user may do <literal>SearchName("kernel",filter="none")</literal>
+ and only want to return results that can be operated on.
+ For instance, suppose we have installed:
+ </para>
+ <simplelist type="horiz" columns="1">
+ <member><literal>kernel-2.6.29.4-167 (installed)</literal></member>
+ <member><literal>kernel-2.6.29.5-191 (installed)</literal></member>
+ </simplelist>
+ <para>
+ And in the remote software sources we have:
+ </para>
+ <simplelist type="horiz" columns="1">
+ <member><literal>kernel-2.6.29.4-167 (fedora)</literal></member>
+ <member><literal>kernel-2.6.29.5-191 (fedora-updates)</literal></member>
+ <member><literal>kernel-2.6.30.1-203 (fedora-updates)</literal></member>
+ </simplelist>
+ <para>
+ If we do <literal>Resolve("kernel",filter="none")</literal> we should expect:
+ </para>
+ <simplelist type="horiz" columns="1">
+ <member><literal>kernel-2.6.29.4-167 (installed)</literal></member>
+ <member><literal>kernel-2.6.29.5-191 (installed)</literal></member>
+ <member><literal>kernel-2.6.30.1-203 (fedora-updates)</literal></member>
+ </simplelist>
+ <para>
+ If the <literal>kernel-2.6.29.4-167 (fedora)</literal> result was returned,
+ this will be in the list of results, and is a valid install target.
+ The user will get very confused why <literal>2.6.29.4-167</literal> is both
+ installed and not installed.
+ </para>
+ </sect2>
+
+ <sect2 id="introduction-ideas-filters-examples">
+ <title>Filter examples</title>
+ <para>
+ Suppose we have installed:
+ </para>
+ <simplelist type="horiz" columns="1">
+ <member><literal>kernel-2.6.29.4-167 (installed)</literal></member>
+ <member><literal>kernel-2.6.29.5-191 (installed)</literal></member>
+ </simplelist>
+ <para>
+ In the remote software sources we have:
+ </para>
+ <simplelist type="horiz" columns="1">
+ <member><literal>kernel-2.6.29.4-167 (fedora)</literal></member>
+ <member><literal>kernel-2.6.29.5-191 (fedora-updates)</literal></member>
+ <member><literal>kernel-2.6.30.1-203 (fedora-updates)</literal></member>
+ </simplelist>
+ <para>
+ If we do <literal>Resolve("kernel",filter="none")</literal> we should expect:
+ </para>
+ <simplelist type="horiz" columns="1">
+ <member><literal>kernel-2.6.29.4-167 (installed)</literal></member>
+ <member><literal>kernel-2.6.29.5-191 (installed)</literal></member>
+ <member><literal>kernel-2.6.30.1-203 (fedora-updates)</literal></member>
+ </simplelist>
+ <para>
+ If we do <literal>Resolve("kernel",filter="installed")</literal> we should expect:
+ </para>
+ <simplelist type="horiz" columns="1">
+ <member><literal>kernel-2.6.29.4-167 (installed)</literal></member>
+ <member><literal>kernel-2.6.29.5-191 (installed)</literal></member>
+ </simplelist>
+ <para>
+ If we do <literal>Resolve("kernel",filter="~installed")</literal> we should expect:
+ </para>
+ <simplelist type="horiz" columns="1">
+ <member><literal>kernel-2.6.30.1-203 (fedora-updates)</literal></member>
+ </simplelist>
+ <para>
+ If we do <literal>Resolve("kernel",filter="newest;installed")</literal> we should expect:
+ </para>
+ <simplelist type="horiz" columns="1">
+ <member><literal>kernel-2.6.29.5-191 (installed)</literal></member>
+ </simplelist>
+ <para>
+ If we do <literal>Resolve("kernel",filter="newest")</literal> we should expect:
+ </para>
+ <simplelist type="horiz" columns="1">
+ <member><literal>kernel-2.6.29.5-191 (installed)</literal></member>
+ <member><literal>kernel-2.6.30.1-203 (fedora-updates)</literal></member>
+ </simplelist>
+ </sect2>
+
</sect1>
<sect1 id="introduction-errors">
commit 920702b0bd28f8604ee4c5062cf614693067b221
Author: Mounir Lamouri (volkmar) <mounir.lamouri at gmail.com>
Date: Mon Jun 29 19:40:18 2009 +0200
trivial: removing - and _ sensitiveness specification from SearchName
diff --git a/src/org.freedesktop.PackageKit.Transaction.xml b/src/org.freedesktop.PackageKit.Transaction.xml
index 1772ed9..f85072f 100644
--- a/src/org.freedesktop.PackageKit.Transaction.xml
+++ b/src/org.freedesktop.PackageKit.Transaction.xml
@@ -1186,8 +1186,7 @@
in the backend.
</doc:para>
<doc:para>
- The search query in the backend should not be case sensitive, and
- should not be sensitive to <doc:tt>_</doc:tt> or <doc:tt>-</doc:tt>.
+ The search query in the backend should not be case sensitive.
</doc:para>
<doc:para>
The search methods should return all results in all repositories.
commit b858e1c01005f8187e3249415c78b3a799d2b29c
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Jun 29 17:50:13 2009 +0100
Add some new specifications agreed on the mailing list to the DBus interface
diff --git a/src/org.freedesktop.PackageKit.Transaction.xml b/src/org.freedesktop.PackageKit.Transaction.xml
index 1772ed9..0877fc9 100644
--- a/src/org.freedesktop.PackageKit.Transaction.xml
+++ b/src/org.freedesktop.PackageKit.Transaction.xml
@@ -1054,6 +1054,9 @@
<doc:tt>GPL games</doc:tt> should returns every games with a GPL
license.
</doc:para>
+ <doc:para>
+ The search should not be treated as case sensitive.
+ </doc:para>
</doc:summary>
</doc:doc>
</arg>
@@ -1101,6 +1104,9 @@
If the search term does not start with <doc:tt>/</doc:tt> then it should be treated as a single filename, which can be in any directory.
Only one filename can be specified, which should not be escaped or surrounded in quotes.
</doc:para>
+ <doc:para>
+ The search is case sensitive, and should not be escaped or surrounded in quotes.
+ </doc:para>
</doc:summary>
</doc:doc>
</arg>
@@ -1186,10 +1192,6 @@
in the backend.
</doc:para>
<doc:para>
- The search query in the backend should not be case sensitive, and
- should not be sensitive to <doc:tt>_</doc:tt> or <doc:tt>-</doc:tt>.
- </doc:para>
- <doc:para>
The search methods should return all results in all repositories.
This may mean that multiple versions of package are returned.
If this is not what is wanted by the client program, then the
@@ -1227,6 +1229,9 @@
<doc:tt>gnome-power-manager</doc:tt> but not
<doc:tt>gnomesword</doc:tt> or <doc:tt>powertop</doc:tt>.
</doc:para>
+ <doc:para>
+ The search should not be treated as case sensitive.
+ </doc:para>
</doc:summary>
</doc:doc>
</arg>
commit cccf0f33542110548690fda7ab26410758ca05be
Author: raven <raven at fedoraproject.org>
Date: Mon Jun 29 15:50:05 2009 +0000
Sending translation for Polish
diff --git a/po/pl.po b/po/pl.po
index a3c08ce..0b18fe6 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: pl\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-06-28 14:26+0000\n"
-"PO-Revision-Date: 2009-06-28 18:50+0200\n"
+"POT-Creation-Date: 2009-06-29 14:39+0000\n"
+"PO-Revision-Date: 2009-06-29 17:49+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"
@@ -188,13 +188,13 @@ msgid "Updated"
msgstr "Zaktualizowano"
#: ../client/pk-console.c:473 ../client/pk-console.c:475
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:392
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:394
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:410
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:412
msgid "Percentage"
msgstr "Procentowo"
#: ../client/pk-console.c:475
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:394
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:412
msgid "Unknown"
msgstr "Nieznane"
@@ -408,7 +408,7 @@ msgstr "Nie można znaleÅºÄ pakietów do zainstalowania"
#. TRANSLATORS: installing new packages from package list
#. TRANSLATORS: we are now installing the debuginfo packages we found earlier
#: ../client/pk-console.c:1369
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:698
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:733
#, c-format
msgid "Installing packages"
msgstr "Instalowanie pakietów"
@@ -500,7 +500,7 @@ msgstr "Podpolecenia:"
#: ../client/pk-console.c:1768 ../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:426
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:446
#: ../src/pk-main.c:211
msgid "Show extra debugging information"
msgstr "WyÅwietla dodatkowe informacje o debugowaniu"
@@ -923,175 +923,176 @@ msgid "Installing..."
msgstr "Instalowanie..."
#. TRANSLATORS: we couldn't find the package name, non-fatal
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:352
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:370
#, c-format
msgid "Failed to find the package %s, or already installed: %s"
msgstr "Znalezienie pakietu %s nie powiodÅo siÄ lub jest już zainstalowany: %s"
#. command line argument, simulate what would be done, but don't actually do it
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:429
-msgid "Don't actually install any packages, only simulate"
-msgstr "Nie instaluje żadnych pakietów, tylko symuluje"
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:449
+msgid ""
+"Don't actually install any packages, only simulate what would be installed"
+msgstr "Nie instaluje żadnych pakietów, tylko symuluje instalacjÄ"
#. command line argument, do we skip packages that depend on the ones specified
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:432
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:452
msgid "Do not install dependencies of the core packages"
msgstr "Nie instaluje zależnoÅci podstawowych pakietów"
#. TRANSLATORS: tool that gets called when the command is not found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:450
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:470
msgid "PackageKit Debuginfo Installer"
msgstr "Instalator pakietów debugowania PackageKit"
#. TRANSLATORS: the use needs to specify a list of package names on the command line
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:460
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:480
#, c-format
msgid "ERROR: Specify package names to install."
msgstr "BÅÄD: proszÄ podaÄ nazwy pakietów do zainstalowania."
#. TRANSLATORS: we are getting the list of repositories
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:483
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:506
#, c-format
msgid "Getting sources list"
msgstr "Pobieranie listy źródeÅ"
#. TRANSLATORS: all completed 100%
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:495
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:532
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:559
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:634
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:521
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:558
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:588
#: ../contrib/debuginfo-install/pk-debuginfo-install.c:666
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:715
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:748
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:701
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:753
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:790
#, c-format
msgid "OK."
msgstr "OK."
#. TRANSLATORS: tell the user what we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:498
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:524
#, c-format
msgid "Found %i enabled and %i disabled sources."
msgstr "Znaleziono %i wÅÄ
czone i %i wyÅÄ
czone źródÅa."
#. TRANSLATORS: we're finding repositories that match out pattern
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:505
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:531
#, c-format
msgid "Finding debugging sources"
msgstr "Wyszukiwanie źródeŠpakietów debugowania"
#. TRANSLATORS: tell the user what we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:535
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:561
#, c-format
msgid "Found %i disabled debuginfo repos."
msgstr "Znaleziono %i wyÅÄ
czone repozytoria pakietów debugowania."
#. TRANSLATORS: we're now enabling all the debug sources we found
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:542
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:568
#, c-format
msgid "Enabling debugging sources"
msgstr "WÅÄ
czanie źródeŠpakietów debugowania"
#. TRANSLATORS: operation was not successful
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:549
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:625
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:656
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:705
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:739
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:575
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:654
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:688
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:740
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:777
msgid "FAILED."
msgstr "NIEUDANE."
#. TRANSLATORS: tell the user how many we enabled
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:562
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:591
#, c-format
msgid "Enabled %i debugging sources."
msgstr "WÅÄ
czono %i źródÅa pakietów debugowania."
#. TRANSLATORS: we're now finding packages that match in all the repos
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:569
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:598
#, c-format
msgid "Finding debugging packages"
msgstr "Wyszukiwanie źródeŠpakietów debugowania"
#. TRANSLATORS: we couldn't find the package name, non-fatal
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:580
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:609
#, c-format
msgid "Failed to find the package %s: %s"
msgstr "Znalezienie pakietu %s nie powiodÅo siÄ: %s"
#. TRANSLATORS: we couldn't find the debuginfo package name, non-fatal
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:603
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:632
#, c-format
msgid "Failed to find the debuginfo package %s: %s"
msgstr "Znalezienie pakietu debugowania %s nie powiodÅo siÄ: %s"
#. TRANSLATORS: no debuginfo packages could be found to be installed
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:628
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:657
#, c-format
msgid "Found no packages to install."
msgstr "Nie znaleziono pakietów do zainstalowania."
#. TRANSLATORS: tell the user we found some packages, and then list them
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:637
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:669
#, c-format
msgid "Found %i packages:"
msgstr "Znaleziono %i pakiety:"
#. TRANSLATORS: tell the user we are searching for deps
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:650
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:682
#, c-format
msgid "Finding packages that depend on these packages"
msgstr "Wyszukiwanie pakietów zależnych od tych pakietów"
#. TRANSLATORS: could not install, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:659
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:691
#, c-format
msgid "Could not find dependant packages: %s"
msgstr "Nie można znaleÅºÄ zależnych pakietów: %s"
#. TRANSLATORS: tell the user we found some more packages
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:670
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:705
#, c-format
msgid "Found %i extra packages."
msgstr "Znaleziono %i dodatkowe pakiety."
#. TRANSLATORS: tell the user we found some more packages
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:674
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:709
#, c-format
msgid "No extra packages required."
msgstr "Dodatkowe pakiety nie sÄ
wymagane."
#. TRANSLATORS: tell the user we found some packages (and deps), and then list them
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:680
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:715
#, c-format
msgid "Found %i packages to install:"
msgstr "Znaleziono %i pakiety do zainstalowania:"
#. TRANSLATORS: simulate mode is a testing mode where we quit before the action
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:689
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:724
#, c-format
msgid "Not installing packages in simulate mode"
msgstr "Pakiety nie zostanÄ
zainstalowane w trybie symulacji"
#. TRANSLATORS: coul dnot install, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:708
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:743
#, c-format
msgid "Could not install packages: %s"
msgstr "Nie można zainstalowaÄ pakietów: %s"
#. TRANSLATORS: we are now disabling all debuginfo repos we previously enabled
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:732
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:770
#, c-format
msgid "Disabling sources previously enabled"
msgstr "WyÅÄ
czanie źródeÅ poprzednio wÅÄ
czonych"
#. TRANSLATORS: no debuginfo packages could be found to be installed, detailed error follows
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:742
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:780
#, c-format
msgid "Could not disable the debugging sources: %s"
msgstr "Nie można wyÅÄ
czyÄ ÅºródeÅ pakietów debugowania: %s"
#. TRANSLATORS: we disabled all the debugging repos that we enabled before
-#: ../contrib/debuginfo-install/pk-debuginfo-install.c:751
+#: ../contrib/debuginfo-install/pk-debuginfo-install.c:793
#, c-format
msgid "Disabled %i debugging sources."
msgstr "WyÅÄ
czono %i źródÅa pakietów debugowania."
More information about the PackageKit-commit
mailing list