summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2008-05-06 09:15:15 +0100
committerRichard Hughes <richard@hughsie.com>2008-05-06 09:15:53 +0100
commit8c35f7b9bfdffa1751fe0077a63e8c38b8389343 (patch)
tree56efa4e76c7afe81d5e718eeab7f7d8c25ae22d0
parent8f9e627d281ee083a894b434bfd74e244920dc70 (diff)
don't use space as a delimiter in pk_va_list_to_argv, it breaks installing
local files from directories with spaces in. fixes rh#445158
-rw-r--r--backends/conary/pk-backend-conary.c2
-rw-r--r--backends/pisi/pk-backend-pisi.c2
-rw-r--r--backends/smart/pk-backend-smart.c2
-rw-r--r--backends/yum/pk-backend-yum.c2
-rw-r--r--libpackagekit/pk-common.c8
5 files changed, 8 insertions, 8 deletions
diff --git a/backends/conary/pk-backend-conary.c b/backends/conary/pk-backend-conary.c
index adec1d145..1259a064a 100644
--- a/backends/conary/pk-backend-conary.c
+++ b/backends/conary/pk-backend-conary.c
@@ -318,7 +318,7 @@ backend_update_packages (PkBackend *backend, gchar **package_ids)
}
/* send the complete list as stdin */
- package_ids_temp = pk_package_ids_to_text (package_ids, " ");
+ package_ids_temp = pk_package_ids_to_text (package_ids, "|");
pk_backend_spawn_helper (spawn, "update.py", package_ids_temp, NULL);
g_free (package_ids_temp);
}
diff --git a/backends/pisi/pk-backend-pisi.c b/backends/pisi/pk-backend-pisi.c
index 5a8d7a377..c9e5abe2a 100644
--- a/backends/pisi/pk-backend-pisi.c
+++ b/backends/pisi/pk-backend-pisi.c
@@ -307,7 +307,7 @@ backend_update_packages (PkBackend *backend, gchar **package_ids)
}
/* send the complete list as stdin */
- package_ids_temp = pk_package_ids_to_text (package_ids, " ");
+ package_ids_temp = pk_package_ids_to_text (package_ids, "|");
pk_backend_spawn_helper (spawn, "update.py", package_ids_temp, NULL);
g_free (package_ids_temp);
}
diff --git a/backends/smart/pk-backend-smart.c b/backends/smart/pk-backend-smart.c
index c8ba33bad..2777e2073 100644
--- a/backends/smart/pk-backend-smart.c
+++ b/backends/smart/pk-backend-smart.c
@@ -215,7 +215,7 @@ backend_update_packages (PkBackend *backend, gchar **package_ids)
}
/* send the complete list as stdin */
- package_ids_temp = pk_package_ids_to_text (package_ids, " ");
+ package_ids_temp = pk_package_ids_to_text (package_ids, "|");
pk_backend_spawn_helper (spawn, "update.py", package_ids_temp, NULL);
g_free (package_ids_temp);
}
diff --git a/backends/yum/pk-backend-yum.c b/backends/yum/pk-backend-yum.c
index 0f8191564..ec7d2338c 100644
--- a/backends/yum/pk-backend-yum.c
+++ b/backends/yum/pk-backend-yum.c
@@ -315,7 +315,7 @@ backend_update_packages (PkBackend *backend, gchar **package_ids)
}
/* send the complete list as stdin */
- package_ids_temp = pk_package_ids_to_text (package_ids, " ");
+ package_ids_temp = pk_package_ids_to_text (package_ids, "|");
pk_backend_spawn_helper (spawn, "update.py", package_ids_temp, NULL);
g_free (package_ids_temp);
}
diff --git a/libpackagekit/pk-common.c b/libpackagekit/pk-common.c
index ab36732a9..5cbee7b3d 100644
--- a/libpackagekit/pk-common.c
+++ b/libpackagekit/pk-common.c
@@ -672,7 +672,7 @@ pk_va_list_to_argv_string (GPtrArray *ptr_array, const gchar *string)
guint i;
/* split the string up by spaces */
- array = g_strsplit (string, " ", 0);
+ array = g_strsplit (string, "|", 0);
/* for each */
length = g_strv_length (array);
@@ -688,7 +688,7 @@ pk_va_list_to_argv_string (GPtrArray *ptr_array, const gchar *string)
* @args: any subsequant string's
*
* Form a composite string array of string, with a special twist;
- * if the entry contains a space, then it is split as seporate parts
+ * if the entry contains a '|', then it is split as seporate parts
* of the array.
*
* Return value: the string array, or %NULL if invalid
@@ -930,7 +930,7 @@ libst_common (LibSelfTest *test)
/************************************************************/
libst_title (test, "va_list_to_argv triple with space first");
- array = pk_va_list_to_argv_test ("richard phillip", "hughes", NULL);
+ array = pk_va_list_to_argv_test ("richard|phillip", "hughes", NULL);
if (pk_strequal (array[0], "richard") &&
pk_strequal (array[1], "phillip") &&
pk_strequal (array[2], "hughes") &&
@@ -943,7 +943,7 @@ libst_common (LibSelfTest *test)
/************************************************************/
libst_title (test, "va_list_to_argv triple with space second");
- array = pk_va_list_to_argv_test ("richard", "phillip hughes", NULL);
+ array = pk_va_list_to_argv_test ("richard", "phillip|hughes", NULL);
if (pk_strequal (array[0], "richard") &&
pk_strequal (array[1], "phillip") &&
pk_strequal (array[2], "hughes") &&