multitypo!   RESTRICT usage...

On 20/01/12 23:28, Allan McRae wrote:
> With pacman-4.0, using --noconfirm or --noprogressbar with -Q or -T
> results in pacman reporting an "invalid option" error. Restrict the
> passing of these options to pacman. Fixes FS#28012.
> 
> Signed-off-by: Allan McRae <[email protected]>
> ---
>  scripts/makepkg.sh.in |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 4792c5c..4f95b73 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -412,7 +412,11 @@ download_file() {
>  
>  run_pacman() {
>       local cmd
> -     printf -v cmd "%q " "$PACMAN" $PACMAN_OPTS "$@"
> +     if [[ ! $1 = -@(T|Qq) ]]; then
> +             printf -v cmd "%q " "$PACMAN" $PACMAN_OPTS "$@"
> +     else
> +             printf -v cmd "%q " "$PACMAN" $PACMAN_OPTS "$@"
> +     fi
>       if (( ! ASROOT )) && [[ ! $1 = -@(T|Qq) ]]; then
>               if type -p sudo >/dev/null; then
>                       cmd="sudo $cmd"


Reply via email to