[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#475772: marked as done (dpkg should set GREP_OPTIONS)



Your message dated Sat, 26 Apr 2008 16:23:56 +0900
with message-id <20080426072356.GA10572@osamu.debian.net>
and subject line Your odd GREP_OPTIONS setting is not package problem
has caused the Debian Bug report #475772,
regarding dpkg should set GREP_OPTIONS
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
475772: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=475772
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: a lot of them

I've recently set GREP_OPTIONS='--color=always' in my bashrc. I do this mainly so that I can see grep's highlighted findings even when viewing through a pipeline, such as with less. '--color=auto' won't work because it will turn off the color escapes if it's going down the pipeline, which is not what I want when I use less.

This poses a problem for a lot of scripts, which assume that text coming from their stdin is free from (color) escapes. For instance, I recently went to install postgresql-client-8.2 in Ubuntu. (I recognize that Ubuntu != Debian. However, this is also a problem in Etch that I just didn't report earlier, and I think it could be addressed in both distros.)

> $ sudo apt-get install postgresql
>    ...
Setting up postgresql-client-8.2 (8.2.7-0ubuntu0.7.10) ...
update-alternatives: unable to make /usr/share/postgresql/8.2/man/man1/dropuser.1.gz.dpkg-tmp a symlink to /etc/alternatives/dropuser.1.gz: No such file or directory

^^^^^^^^^^^^^^^^^^^^^^^

The ^^^^ is color-escaped, which is no good for the symlinking.

I think an appropriate solution would be to unset or export GREP_OPTIONS='--color=none' in the beginning of scripts that rely on grep.

Kevin



--- End Message ---
--- Begin Message ---
Hi,

(I do not understand why the submitter does not use
GREP_OPTIONS='--color=auto'.)

Anyway, you can break many normal program operations if you set
unreasonable value to environment variables.  This is not just
GREP_OPTION for grep but you can have fun with TAPE or TAR_OPTIONS for
tar. It is only yourself to blame.

Since submitter said "smart" to other fix method, it is best to close
this bug.

Cheers,

Osamu



--- End Message ---

Reply to: