[pacman-dev] [PATCH] paccache: avoid subshell in calling runcmd
Avoids problems with one of the worst CLI tools ever created, su. Fixes FS#34656. Signed-off-by: Dave Reisner <dreisner@archlinux.org> --- contrib/paccache.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/paccache.sh.in b/contrib/paccache.sh.in index c331273..64c3c53 100644 --- a/contrib/paccache.sh.in +++ b/contrib/paccache.sh.in @@ -308,9 +308,9 @@ totalsaved=$(@SIZECMD@ "${candidates[@]}" | awk '{ sum += $1 } END { print sum } # crush. kill. destroy. (( verbose )) && cmdopts+=(-v) if (( delete )); then - printf '%s\0' "${candidates[@]}" | runcmd xargs -0 rm "${cmdopts[@]}" + runcmd xargs -0a <(printf '%s\0' "${candidates[@]}") rm "${cmdopts[@]}" elif (( move )); then - printf '%s\0' "${candidates[@]}" | runcmd xargs -0 mv "${cmdopts[@]}" -t "$movedir" + runcmd xargs -0a <(printf '%s\0' "${candidates[@]}") mv "${cmdopts[@]}" -t "$movedir" fi summarize "$pkgcount" "${candidates[@]}" -- 1.8.2.1
On 11/04/13 23:18, Dave Reisner wrote:
Avoids problems with one of the worst CLI tools ever created, su.
Fixes FS#34656.
Signed-off-by: Dave Reisner <dreisner@archlinux.org> ---
Ack -> maint. Allan
participants (2)
-
Allan McRae
-
Dave Reisner