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

Bug#288616: use of ">" in tetex postinst errors for sites using bash noclobber



"George Georgalis" <george@galis.org> wrote:

> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=275140
>
> I don't agree with all the points in message dated.
> Date: Sat, 9 Oct 2004 20:39:17 -0500
>
> eg debian doesn't set BASH_ENV by default, and I don't use it, which
> kinda breaks most of what he's saying, and sidetracked the issue.

Why do you think that? Things usually work exactly because Debian, by
default, does no mixing up of the different initialisation files:
Because BASH_ENV is not set by default, and because it does not by
default source any of the initialisation files from any other, the
invocation modes are clearly separated.

If on your system scripts starting with "#!/bin/sh" or "#!/bin/bash"
have noclobber set, I think this must be because you have tweaked the
initialisation process inappropriately, ending up with
interactive-specific things set in noninteractive shells.

> And per the last couple of messages (up to Date: Sat, 9 Oct 2004
> 23:42:05 -0500); I stand by my last post, apt-get should use
> non-interactive and/or --norc invocation.

I think it does. Why do you think that apt-get (in fact it is dpkg)
invoke maintainer scripts in a way that the shell is interactive?

> The setting of noclobber is
> an option for interactive shells (when put in ~/.bashrc). Programs like
> apt-get should not inherit user environment and croak on something as
> benign as the equivalent to "alias rm='rm -i'"

Programs _must_ inherit the user environment they are called with, this
is a requirement of POSIX. But user environment in this sense only
covers environment variables marked with "export", not shell options
like noclobber or shell aliases. Which is to say: apt-get already does
what you demand of it. I really don't see where the bug is.

Regards, Frank
-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer




Reply to: