rpms/PackageKit/F-9 pk-check-what-requires-search-string.patch, NONE, 1.1 pk-test-local-files-correctly.patch, NONE, 1.1 PackageKit.spec, 1.46, 1.47
Richard Hughes (rhughes)
fedora-extras-commits at redhat.com
Wed Aug 6 10:11:43 UTC 2008
Author: rhughes
Update of /cvs/pkgs/rpms/PackageKit/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6899
Modified Files:
PackageKit.spec
Added Files:
pk-check-what-requires-search-string.patch
pk-test-local-files-correctly.patch
Log Message:
* Wed Aug 06 2008 Richard Hughes <rhughes at redhat.com> - 0.2.4-4
- Fix up the yum backend as public_key.fingerprint() was changed.
- Fix detection of local files due to a silly typo.
- Fix pkcon what-provides '*' taking a long, long time.
- Fixes fd#16965.
pk-check-what-requires-search-string.patch:
--- NEW FILE pk-check-what-requires-search-string.patch ---
commit ddce1f9332b6c4ff8d852379e1faab4b9ebc6a81
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Jul 30 17:00:11 2008 +0100
bugfix: WhatProvides has a freeform search string that we don't check, also, check for wildcards before length to pick up a single star
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 97875a7..7ae5c95 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -979,24 +979,24 @@ pk_transaction_search_check (const gchar *search, GError **error)
"Search string zero length");
return FALSE;
}
- if (size < 2) {
+ if (strstr (search, "*") != NULL) {
*error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_SEARCH_INVALID,
- "The search string length is too small");
+ "Invalid search containing '*'");
return FALSE;
}
- if (size == 1024) {
+ if (strstr (search, "?") != NULL) {
*error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_SEARCH_INVALID,
- "The search string length is too large");
+ "Invalid search containing '?'");
return FALSE;
}
- if (strstr (search, "*") != NULL) {
+ if (size < 2) {
*error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_SEARCH_INVALID,
- "Invalid search containing '*'");
+ "The search string length is too small");
return FALSE;
}
- if (strstr (search, "?") != NULL) {
+ if (size == 1024) {
*error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_SEARCH_INVALID,
- "Invalid search containing '?'");
+ "The search string length is too large");
return FALSE;
}
ret = pk_strvalidate (search);
@@ -2872,6 +2872,13 @@ pk_transaction_what_provides (PkTransaction *transaction, const gchar *filter, c
return;
}
+ /* check the search term */
+ ret = pk_transaction_search_check (search, &error);
+ if (!ret) {
+ dbus_g_method_return_error (context, error);
+ return;
+ }
+
/* check the filter */
ret = pk_transaction_filter_check (filter, &error);
if (!ret) {
pk-test-local-files-correctly.patch:
--- NEW FILE pk-test-local-files-correctly.patch ---
commit 328202d5a5ecffe30acb9c670cd25faeb6ec944d
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Jul 30 14:14:35 2008 +0100
bugfix: properly match local files correctly so we don't try to resolve them
diff --git a/client/pk-console.c b/client/pk-console.c
index 5824a3d..9737687 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -580,7 +580,7 @@ pk_console_install_stuff (PkClient *client, gchar **packages, GError **error)
length = g_strv_length (packages);
for (i=2; i<length; i++) {
/* are we a local file */
- is_local = g_file_test (packages[i], G_FILE_TEST_EXISTS & G_FILE_TEST_IS_REGULAR);
+ is_local = g_file_test (packages[i], G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR);
if (is_local) {
g_ptr_array_add (array_files, g_strdup (packages[i]));
} else {
Index: PackageKit.spec
===================================================================
RCS file: /cvs/pkgs/rpms/PackageKit/F-9/PackageKit.spec,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- PackageKit.spec 6 Aug 2008 10:04:56 -0000 1.46
+++ PackageKit.spec 6 Aug 2008 10:11:13 -0000 1.47
@@ -18,9 +18,12 @@
# upstream, 8ea1106a44568132947e29b75788d724827cf0e5
Patch0: pk-network-fallback-use-zero-destination.patch
-
# upstream, 85e73bb7d478160990acbc30da620d05386072cf
Patch1: pk-yum-api-broken-fingerprint-now-function.patch
+# upstream, 328202d5a5ecffe30acb9c670cd25faeb6ec944d
+Patch2: pk-test-local-files-correctly.patch
+# upstream, ddce1f9332b6c4ff8d852379e1faab4b9ebc6a81
+Patch3: pk-check-what-requires-search-string.patch
Requires: dbus >= %{dbus_version}
Requires: PackageKit-libs = %{version}-%{release}
@@ -107,6 +110,8 @@
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
%build
%configure --enable-yum --enable-yum2 --with-default-backend=yum --disable-local
@@ -205,6 +210,8 @@
%changelog
* Wed Aug 06 2008 Richard Hughes <rhughes at redhat.com> - 0.2.4-4
- Fix up the yum backend as public_key.fingerprint() was changed.
+- Fix detection of local files due to a silly typo.
+- Fix pkcon what-provides '*' taking a long, long time.
- Fixes fd#16965.
* Wed Aug 06 2008 Richard Hughes <rhughes at redhat.com> - 0.2.4-3
More information about the fedora-extras-commits
mailing list