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

Bug#275140: Redirections and noclobber



Thus spake Julian Gilbey:
> On Sat, Oct 09, 2004 at 08:39:17PM -0500, nils wrote:
> > So in sum, I have two questions/unknowns:
> > Q1: Does Debian have a policy on assumptions on the
> >   environment that packaging scripts can make?
> > Q2: Regardless of policy, do many packaging scripts in fact
> >   make such assupmitions?
> 
> I once discussed this with Thomas Esser.  He told me very clearly that
> I should not be messing around with the environment for scripts: they
> can reasonably expect a default shell to behave in a default way, with
> the only possible changed settings being appropriate environment
> variables relevant to scripts.

Okay, b/c otherwise there's 10,000 ways a user can change
the environment, and script writers can't and shouldn't have
to deal with these.

> So I would say that this is an answer to Q1 which extends well beyond
> Debian, and that the answer to Q2 is yes, and many, many scripts on
> your whole system make similar assumptions.
> 
> So final exhortation: noclobber should be restricted to interactive
> shells, as should shell aliases, setting $PS1 and other such stuff.

Your name wasn't familiar (I'm new around here), so I
googled you, and see that you maintain devscripts and are
"a rather inactive co-editor of Debian Policy", so I'll take
you as an authority on this. (and it sounds convincing
anyways)

> And maybe either close this bug or mark wontfix.

I've fixed my own bash configuration (it's much nicer now,
and doesn't break dpkg), and will close this bug -- thanks
for y'all's time.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
However, this suggests another possible action:
- is there any way to tell foolish novices to NOT set
  anything foolish in their BASH_ENV file (say, ~/.bashrc).
  That is, as we've seen, plausible settings here can
  -break- packages in a somewhat mysterious way.
Perhaps the default Debian ~/.bashrc could have such a WARNING?
(or maybe a note in bash/bash-doc's README.Debian.gz?).

I mean, I've been using unix for 10 years and rather
obsessively read documentation (as you can see) and I still didn't
realize that my ~/.bashrc was causing problems (or rather,
that I shouldn't be setting it the way I was).

Perhaps some documentation could prevent further folk from
making this mistake and filing spurious bug reports?
[And conversely, is there documentation telling Debian developers
 that they can assume a standard shell environment?]

salaam,
  -nils



Reply to: