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

Bug#527200: apt-key fails if GREP_OPTIONS isn't defined



On Wed, 2009-05-06 at 03:22 -0300, Horacio Penya wrote:
> apt-key fails if GREP_OPTIONS is not defined. The guilty lines are:
> 
> set -e
> unset GREP_OPTIONS
> 
> and, if apt-key fails, updating apt fails too (it's called on postinst)
> 
> way to reproduce it:
> 
> $ unset GREP_OPTIONS;apt-key update || echo fails
> fails
> $ GREP_OPTIONS=a apt-key update || echo fails
> (it works)

Which shell are you using? I can't reproduce this, and SuSv3 makes it
clear that the above should not occur:

"Unsetting a variable or function that was not previously set shall not
be considered an error and does not cause the shell to abort."

(bash will error if the variable is read-only, but it clearly isn't in
the above).

Regards,

Adam



Reply to: