Ticket #104 (closed task: fixed)

Opened 16 years ago

Last modified 16 years ago

Make "setup" command work for bash

Reported by: wdc Owned by:
Priority: low Milestone: Summer 2009 Deployment
Component: dotfiles Keywords:
Cc: Fixed in version:
Upstream bug:

Description

Need to make setup command work for bash as part of migration to bash from tcsh. (Originally flagged by ghudson)

Change History

comment:1 Changed 16 years ago by wdc

  • Status changed from new to closed
  • Resolution set to wontfix

We worked through this topic at a recent Athena Release Team meeting.
Even if we taught setup how to operate with the default shell being bash,
it would involve fiddling with all lockers that use setup to use bash.

So we have to touch every locker that uses setup anyway.

We've agreed that, instead of making setup work with bash, to de-support setup.

comment:2 Changed 16 years ago by jdreed

  • Priority changed from major to minor
  • Component set to dotfiles
  • Status changed from closed to reopened
  • Resolution wontfix deleted
  • Milestone set to Fall Release

At a more recent release-team, we agreed to implement setup for bash, because Alex suggested that it's still useful for some 3partysw packages, and the work seems minimal.

We agreed that setup should run .attachrc.bash if it exists, otherwise it should inform the user that the locker is not configured to use setup under bash.

env_setup.bash and env_remove.bash are in /mit/jdreed/debathena/setup, along with a file called "bashrc" which contains the relevant snippets to add to /usr/athena/lib/init/bashrc.

Note that the "remove" function currently unsets SUBJECT afterwards, which it doesn't do under cshrc. This is a bug under cshrc, and the cshrc version should also "unsetenv SUBJECT" at the end of the alias, after sourcing env_remove.

Someone who is not me should test these and commit them.

comment:3 Changed 16 years ago by quentin

You could trivially make this gracefully fallback to tcsh instead of breaking completely if there's no .attachrc.bash. If there's just an .attachrc, you could spawn a tcsh to run it in, probably with a warning to the user "WARNING: This locker does not support the bash shell. This shell has temporarily been switch to tcsh."

comment:4 Changed 16 years ago by jdreed

I believe we decided that spawning a new xterm with a shell is confusing, and even more confusing when from the command line.

The onus is on locker maintainers to create .attachrc.bash as part of their locker maintenance. .attachrc scripts tend to bitrot very quickly and probably have a lot of hacks in them that pertain to things like Athena 8 and are useless.

comment:5 Changed 16 years ago by quentin

It may be confusing, but it's already the behavior that setup has when run under X. I'm not sure what it does under not-X, but I suspect that it also spawns a new shell there.

comment:6 Changed 16 years ago by jdreed

  • Keywords wdc-blocker removed
  • Milestone changed from Fall Release to Summer Deployment

I will compile a list of course and sw lockers which use .attachrc and will send mail to locker maintainers once this is deployed. I'm actually going to bump this to Summer milestone, so that we can send mail before term starts.

comment:7 Changed 16 years ago by broder

  • Status changed from reopened to proposed

Uploaded to -proposed. Testing would be appreciated.

comment:8 Changed 16 years ago by broder

Whoops - forgot to update the debian/debathena-dotfiles.install file. Let's give this a few more days in proposed - I'll plan to move it on Wednesday.

comment:9 Changed 16 years ago by broder

The new setup does seem to work in bash.

comment:10 Changed 16 years ago by broder

  • Status changed from proposed to closed
  • Resolution set to fixed

Fixed

Note: See TracTickets for help on using tickets.