summaryrefslogtreecommitdiff
path: root/src/fr-command-rpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fr-command-rpm.c')
-rw-r--r--src/fr-command-rpm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/fr-command-rpm.c b/src/fr-command-rpm.c
index 751f9a9..227fd58 100644
--- a/src/fr-command-rpm.c
+++ b/src/fr-command-rpm.c
@@ -184,7 +184,7 @@ fr_command_rpm_list (FrCommand *comm)
fr_process_begin_command (comm->process, "sh");
fr_process_add_arg (comm->process, "-c");
- fr_process_add_arg_concat (comm->process, PRIVEXECDIR "rpm2cpio ", comm->e_filename, " -itv", NULL);
+ fr_process_add_arg_concat (comm->process, "rpm2cpio < ", comm->e_filename, " | cpio -itv", NULL);
fr_process_end_command (comm->process);
fr_process_start (comm->process);
}
@@ -207,14 +207,14 @@ fr_command_rpm_extract (FrCommand *comm,
fr_process_set_working_dir (comm->process, dest_dir);
fr_process_add_arg (comm->process, "-c");
- cmd = g_string_new (PRIVEXECDIR "rpm2cpio ");
+ cmd = g_string_new ("rpm2cpio < ");
g_string_append (cmd, comm->e_filename);
- g_string_append (cmd, " -idu ");
+ g_string_append (cmd, " | cpio -idu");
for (scan = file_list; scan; scan = scan->next) {
+ g_string_append (cmd, " ");
char *filename = g_shell_quote (scan->data);
g_string_append (cmd, filename);
g_free (filename);
- g_string_append (cmd, " ");
}
fr_process_add_arg (comm->process, cmd->str);
g_string_free (cmd, TRUE);
@@ -241,7 +241,8 @@ fr_command_rpm_get_capabilities (FrCommand *comm,
FrCommandCap capabilities;
capabilities = FR_COMMAND_CAN_ARCHIVE_MANY_FILES;
- if (is_program_available (CPIO_PATH, check_command))
+ if (is_program_available ("rpm2cpio", check_command) &&
+ is_program_available (CPIO_PATH, check_command))
capabilities |= FR_COMMAND_CAN_READ;
return capabilities;