Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Tue, 23 Mar 2004 12:07:24 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Karl M cc: cygwin AT cygwin DOT com Subject: RE: setup changes my mounts In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.39 Karl, If the mode of /usr/lib and /usr/bin is not the same as that of /, bad things will happen (i.e., the invariant that /usr/bin==/bin and /usr/lib==/lib will be broken). There should be no good reason to change that mode, even for power users. I'd be content with setup leaving them alone *only* after a conspiciously placed warning (in fact, "cygcheck -svr" should probably also check for this and ring all sorts of bells if that's the case). OTOH, the mode of "/cygdrive" is the user's business, and setup should not override her decision. Igor On Tue, 23 Mar 2004, Karl M wrote: > Hi All... > > I think that because setup can work correctly no matter what mode the > mounts are set to, it should leave them alone. On all but the first > install, it probably should not ask about the mount information nor > change it. This would be consistent with not re-asking about the > shortcuts and such. > > Thanks, > > ...Karl > > >From: Igor Pechtchanski > >To: Dave Korn > >CC: cygwincygwincom > >Subject: RE: setup changes my mounts > >Date: Tue, 23 Mar 2004 09:22:51 -0500 (EST) > > > >On Tue, 23 Mar 2004, Dave Korn wrote: > > > > > > -----Original Message----- > > > > From: cygwin-owner On Behalf Of Larry Hall > > > > Sent: 23 March 2004 04:51 > > > > > > > this isn't "fixable". PTC ;-) FWIW, I found the code for this in > > > > do_install_thread() in install.cc. The code reads: > > > > > > > > > > > > create_mount ("/", get_root_dir (), istext, issystem); > > > > create_mount ("/usr/bin", cygpath ("/bin"), istext, issystem); > > > > create_mount ("/usr/lib", cygpath ("/lib"), istext, issystem); > > > > set_cygdrive_flags (istext, issystem); > > > > > > > > The parameters for setting the mount type and the scope come > > > > from settings in setup itself, not from any previous registry entries. > > > > > > I disagree. The setting for istext comes just a few lines above the part > > > you quoted: > > > > > > int istext = (root_text == IDC_ROOT_TEXT) ? 1 : 0; > > > > > > Now root_text is used in root.cc to set/get the state of the radio button on > > > the "Select Root Install Directory" page. grep suggests that root_text is > > > initialised in mount.cc/read_mounts(): > > > > > > void > > > read_mounts () > > > { > > > [...snip...] > > > /* Loop through subkeys */ > > > [...snip...] > > > for (int issystem = 0; issystem <= 1; issystem++) > > > { > > > snprintf (buf, sizeof(buf), "Software\\%s\\%s\\%s", > > > CYGWIN_INFO_CYGNUS_REGISTRY_NAME, > > > CYGWIN_INFO_CYGWIN_REGISTRY_NAME, > > > CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME); > > > > > > HKEY key = issystem ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; > > > if (RegCreateKeyEx (key, buf, 0, (char *)"Cygwin", 0, KEY_ALL_ACCESS, > > > 0, &key, &disposition) != ERROR_SUCCESS) > > > break; > > > [...snip...] > > > res = RegEnumKeyEx (key, i, aBuffer, &posix_path_size, NULL, > > > NULL, NULL, NULL); > > > [...snip...] > > > if (m->posix == "/") > > > { > > > root_here = m; > > > if (m->istext) > > > root_text = IDC_ROOT_TEXT; > > > else > > > root_text = IDC_ROOT_BINARY; > > > [...snip...] > > > > > > and the code above quite clearly appears to be looking through the registry > > > for the current mount state. > > > > > > So it is actually the case that the settings DO come from the registry; > > > the problem is that the setting for the root directory is indiscriminately > > > applied to the root directory, the /usr/bin and /usr/lib mountpoints, and > > > the cygdrive path. > > > > > > I'm sure it makes sense to keep /usr/bin and /usr/lib in the same mode as > > > the root dir, but I can't see any intrinsic reason why cygdrive should be > > > forced to the same mode. I dunno whether it would make more sense to offer > > > separate radio buttons for the root dir mode and the cygdrive mode, or > > > whether it should just preserve the existing cygdrive mode and only > > > set/reset the /, /usr/bin and /usr/lib modes. > > > cheers, > > > DaveK > > > >The latter, IMO. I'll see if I can whip up a patch... Won't be right > >away, though... > > Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton -- 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/