Subject: Re: Multiple Cygwins/ Distributing Cygwin apps
From: Brian Dessent <[email-masked]>
To: [email-masked]
Date: Mon, 03 Nov 2003 00:24:20 -0800

John Moore wrote:

> I installed Cygwin #1 on C: and Cygwin #2 on H:. I'll have to try the
> mount trick as the easy way to switch them. However, I don't think it
> will work when you first install Cygwin #2, as it will detect the keys
> and complain that a Cygwin is already present!

If you unmount everything then there should be no registry keys to
detect.

> It may also be necessary to change the Windows path (again, I don't know
> if the Cygwin installer did this or the vendor did it).

'Pure' cygwin doesn't mess with your Windows path at all.  Instead,
/etc/profile prepends the Cygwin paths to your Windows path.  If both
Cygwins do it this way there should be no conflict, as this method only
sets the path for that bash session, it's not a global change.  However,
if this vendor's package adds the Cygwin paths to your Windows path then
that could be a problem, but there's nothing that says you can't just
undo that and set it in one of the bash startup files instead.

> Ran the tool manufacturer's install, telling it to put cygwin stuff on
> H. Somehow it decided that my cygwin home directory should be
> c:/documents and settings/username.

You're not tied to what the installer makes it, you know.  There are two
places where the home directory is set: in one of the startup scripts
(probably /etc/profile) where the HOME variable is set and exported, and
the appropriate field in /etc/passwd, which is only really used by a few
things.  If you change both of these you can put your home directory
whereever you please.

> Renamed the Cygwin paths in the registry to something else (put an X on
> the end).
> 
> rebooted.
> 
> Installed cygwin using the installer. It failed with a windows abort
> message about find.exe!

You probably need to unmount, not just rename the paths.  Otherwise
setup.exe will be confused.

> tried a few utilities from cygwin. Got a complaint about having 2
> cygwin1.dll's.

As always, you must ensure that there's only one cygwin1.dll in the path
at any given time, and that it's the correct one.  If you remove all
cygwin related things from the Windows path and then add the Cygwin
paths in the bash startup scripts then this should be manageable.

> Everything worked except cvs, which failed in ssh client mode (against a 
> server at the office) with a garbled message. This cvs.exe had worked 
> before. This cygwin was from a cygwin grabbed by the nifty little 
> unresizeable (grrr) utility within the last few days.

The latest setup snapshots are resizeable, BTW.

> I will check and see if the vendor included the source to the tool (I
> doubt it, btw). But good grief, I shouldn't have to recompile the damn
> thing just to use it.

> What I would love to see is a complete procedure for doing this sort
of 
> thing posted in a cygwin FAQ.

I don't think you will ever see this added to an official Cygwin FAQ
because what you're doing is unsupported as heck.  Your complaint should
be with the vendor, really.  Cygwin can hardly be responsible for a
third party making some customized environment that locks you into some
old version of the DLL.  None of the Cygwin developers are going to want
to touch this issue with a 10-foot pole.  They support the
setup.exe-blessed environment with the current packages from a
sources.redhat.com mirror... Anything else and you're either on your own
or you need to get support from the vendor.  To expect the Cygwin
developers to have any interest in debugging a 3rd party environment
over which they have no control is asking a lot -- especially since
they're such a mean bunch <g>.

But seriously, you have to realize that this is a volunteer affair and
that the people involved could care less how some 3rd party perverts the
software, it's not their job.  So, it's not surprising that there are
not instructions anywhere on how to jerryrig two Cygwins, and that doing
so is not exactly easy.  It's not meant to be.  It's not meant to be
anything, really, it's just unsupported.  Not that it's not possible,
just that it's not a configuration that the official Cygwin folks care
to deal with.

Brian

(If I've misrepresented any of the 'official' Cygwin feelings on this
matter then please correct me.)

--
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/