This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rm fails with bad mount information


On Jan 17 10:39, Duncan Murdoch wrote:
> I'm a Windows maintainer for the R project.  We include the Cygwin rm.exe 
> program in the toolset we've put together for developers, and have 
> occasionally heard that it fails.
>
> A few days ago I tracked down the cause of failure to the following:
>
> Users who install Cygwin then uninstall it (perhaps improperly, I'm not 
> sure) can be left with the registry key
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/]
>
> set with a non-existent path as the "native" string value (which is 
> normally be something like "c:\\cygwin").  When that happens, "rm -rf 
> subdir" fails with this message:
>
> C:\temp  rm -rf test
> rm: failed to get attributes of `/': No such file or directory
>
> I suspect this is user error in uninstalling Cygwin improperly, but it's 
> still somewhat perplexing to users.  Perhaps rm (and other utilities doing 
> whatever it is doing) should be more robust against bad mounts?

This is not a problem of rm.  It doesn't actually look for mount points.
It just uses the POSIX paths it gets from the Cygwin DLL and the Cygwin
DLL translates that into native paths using the mount points in the
registry.

However, if the Cygwin installation has been uninstalled, how is rm
supposed to find the Cygwin DLL?  It can't work.  You should really tell
your users not to deinstall Cygwin when using your product.  It also
doesn't make sense also to ship rm with your toolset.   Better rely on a
functional Cygwin installation instead.  rm is part of coreutils which
is installed by default anyway.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]