rollback procedure, was: what determines cygwin path?

Qwer Zxcv partner4progress@yahoo.com
Sat Apr 26 02:04:00 GMT 2003


Qwer Zxcv wrote:
>>>> So what I'd like to know is, how is cygwin's path determined?
>>>> (Apparently not entirely by the windows path, at least not by
>>>> default.) And how do I fix it?

Max Bowsher wrote:
>>> Windows + /etc/profile + any user customisation.

Max Bowsher wrote (later):
>> Anything you yourself have deliberately changed - e.g. ~/.profile,
>> ~/.bash_profile, etc.

OK, so to enable successful rollback, I should be sure to keep these
in a home directory out of the cygwin tree, correct? I'm presuming
setup.exe is not going to try to read or write them.

Also:

Igor Pechtchanski wrote:
> The "mount.exe" program will run even if the mounts are all gone (as
> long as it's invoked via an absolute path or from the current
> directory and cygwin1.dll is in the same directory).

> It's been stated time and time again on this list that going to the
> registry is an unsafe and nonportable way of manipulating the mount
> table.

OK, but please keep in mind that (I suspect) lots of folks only read
this list when they're having problems :-)

> Especially when mount.exe does a very adequate job. There already
> are plans (and code, AFAIK, though not in the production system) to
> store the mount table in a file instead of in the registry. Please
> manipulate the mount table only by using mount.exe (or setup.exe).

Will do. I even learned what Max meant by 'mount -m' :-)

So, to ensure roll-back-ability, one should:

*** As part of good cygwin hygeine:

* Create/use a home directory outside the cygwin install tree.

* Ensure cygwin references precede windows references in one's windows
  path (Control Panel>System>Advanced>Environment Variables>System
  Variables>Path).

* Ensure customizations occur only in dotfiles in one's home
  directory.

*** Immediately before installing any new version:

* Note any customizations that affect $PATH. This could be done by,
  e.g., running

find . -type f | grep -ni 'path'

  from one's homedir.

* Know where cygwin1.dll is installed, and ensure that 'mount' runs
  from that directory.

* Record the output of "mount -m", i.e. the mount commands needed to
  restore one's currently-working mount points.

*** To rollback:

0 Change windows path to point (only) to the old version. Cygwin
  references should precede windows references.

1 Run 'mount' using the previously recorded commands.

2 Find or recreate a shortcut to one's old bash-running batchfile.

3 Run bash, check for weirdness.

4 'cygcheck -svr', check for weirdness.

Correct? Am I missing anything major? Did I get anything else wrong?


__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list