Daniel Macks wrote:

Just had the N+1th user on #fink remove Fink and now have his shell
startup abort when it tries to load /sw/bin/init.*. There is an error
message about "no such file or directory" and then the remainder of
the dotfile is skipped.

Instead of just (for csh):
  source _file_
should we do:
  [ -x _file_ ] && source _file_ || echo "_some_warning_"

That way they get a message about what is wrong (conceptually, not a
Unix-ish) but dotfile processing continues so the environment they
eventually get is as usual (modulo fink) instead of some mutant. OTOH,
they do lose the useful-to-Unix-folks (including us, when they come
for help) actual error message about what is wrong.

Thoughts?

I don't yet see a workable realization of this idea. When making the pathsetup script, I thought about this, too. There are two problems:


1. The users that complain about the error message now will complain about the warning as well. You would have to include into the warning an explanation of how to purge the startup script so that the warning goes away. A reasonably-sized understandable warning is probably more difficult to write than a "remove-fink" script that does this purging automatically.

2. Worse than a ~/.cshrc that breaks is a ~/.cshrc that produces text output. It will break configure scripts in hard-to-debug ways, for example. There would have to be some non-trivial logic to make sure the warning is only written when the output goes to a terminal.

The Fink FAQ#5.6: "How can I uninstall all of Fink?" already contains the instruction to purge the shell startup script. It should perhaps make clear that this "source ..." line was not necessarily added by the user himself, but automatically by the installation script. Also, .bashrc is not the right place for bash users, it is (at least as installed by the pathsetup script) rather ~/.profile, ~/.bash_login, or ~/.bash_profile. For tcsh users, the line can be in ~/.cshrc or in ~/.tcshrc.

--
Martin



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to