[pacman-dev] [PATCH] makepkg: unset GREP_OPTIONS

Dave Reisner d at falconindy.com
Fri Mar 29 22:11:59 EDT 2013


On Mar 29, 2013 9:50 PM, "Andrew Gregory" <andrew.gregory.8 at gmail.com>
wrote:
>
> grep allows options to be set from the environment with GREP_OPTIONS.
> Many of these options will alter grep's output, breaking makepkg.
> GREP_OPTIONS=--line-number breaks installed dependency removal, for
> instance.

Ack. We do this in mkinitcpio as well, which broke when someone added
--color=always.

> Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
> ---
>  scripts/makepkg.sh.in | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 45be8b6..6c89849 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -38,6 +38,8 @@ export TEXTDOMAINDIR='@localedir@'
>  export COMMAND_MODE='legacy'
>  # Ensure CDPATH doesn't screw with our cd calls
>  unset CDPATH
> +# Ensure GREP_OPTIONS doesn't screw with our grep calls
> +unset GREP_OPTIONS
>
>  declare -r makepkg_version='@PACKAGE_VERSION@'
>  declare -r confdir='@sysconfdir@'
> --
> 1.8.2
>
>


More information about the pacman-dev mailing list