How can I get cygdrive with msys?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I get cygdrive with msys?

Hans Schmidts

I have projects using cygwin under WinXP. I now must change to msys under Win7-64. The projects access the windows drive letters via cygdrive, e.g. ls /cygdrive/C do get directory listing of C:. Same command with msys ls.exe gives:

 

/usr/bin/ls: /cygdrive/C: No such file or directory

 

In msys it works without cygdrive: ls /C

 

But the projects explicitly need cygdrive. So my question is: Can I get cygdrive back in msys? Or should it be there and someone did something wrong during installation?

 

Any information is much appreciated, regards

Hans


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: How can I get cygdrive with msys?

Keith Marshall-3
[Please adjust your mailer to wrap at no more than 72 cols]

On 1 July 2013 15:41, Hans Schmidts wrote:
> I have projects using cygwin under WinXP. I now must change to msys
> under Win7-64. The projects access the windows drive letters via
> cygdrive, e.g. ls /cygdrive/C do get directory listing of C:. Same
> command with msys ls.exe gives:
>
>    /usr/bin/ls: /cygdrive/C: No such file or directory
 
This is expected; MSYS doesn't need cygwin's cygdrive ugliness.    

> In msys it works without cygdrive: ls /C

Again, this is expected; not only does MSYS not need the ugliness of
cygdrive, it explicitly *removes* it.    

> But the projects explicitly need cygdrive.

Okay.

> So my question is: Can I get cygdrive back in msys?

Yes, you can create any mount alias you like:

   $ mkdir /cygdrive
   $ mount c:/ /cygdrive/c
   $ ls /cygdrive/c
   ...shows directory listing...

> Or should it be there and someone did something wrong during
> installation?

No.  MSYS is behaving as expected.

--
Regards,
Keith.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: How can I get cygdrive with msys?

Earnie Boyd
On Mon, Jul 1, 2013 at 11:05 AM, Keith Marshall wrote:
> On 1 July 2013 15:41, Hans Schmidts wrote:
>> In msys it works without cygdrive: ls /C
>
> Again, this is expected; not only does MSYS not need the ugliness of
> cygdrive, it explicitly *removes* it.

For archive clarity, it wasn't really removed, the default for the
string changed to "" instead of "cygdrive".  Cygwin actually provides
a method to change /cygdrive to anything you want including nothing at
all.  Therefore a project depending on /cygdrive hardcoded is broken.

--
Earnie
-- https://sites.google.com/site/earnieboyd

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

FW: How can I get cygdrive with msys?

Hans Schmidts
In reply to this post by Keith Marshall-3
Hi Keith.

Thanks, that was what I'm looking for (if it works also outside of the
msys-shell simply for all the msys\bin\*.exe, and if it's no problem
that C would be mounted twice then) - unfortunately the mount
does not work :(.

"mount" is a shell script, and it needs other tools which are not
available:

$ mount C:/ /cygdrive/C
/bin/mount: line 189: awk: command not found
/bin/mount: mount point '/cygdrive/C' is already in use

So I need at least awk, but could not find awk in the list of available
 tools (only gawk was listed in
"binutils-2.19.51-3-msys-1.0.13.RELEASE_NOTES.txt")

PS.: Sorry for the formatting, I use Outlook 2010 and it allows sending
pure text to some addresses automatically, but other settings are not
good for mailing lists - hope this is a bit better now. But I'm quite
sure
that I may forget to change some setting by hand in the future...

Regards
Hans

> -----Original Message-----
> From: Keith Marshall [mailto:[hidden email]]
> Sent: Monday, July 01, 2013 5:05 PM
> To: MinGW Users List
> Subject: Re: [Mingw-users] How can I get cygdrive with msys?
>
> [Please adjust your mailer to wrap at no more than 72 cols]
> On 1 July 2013 15:41, Hans Schmidts wrote:
> > I have projects using cygwin under WinXP. I now must change to msys
> > under Win7-64. The projects access the windows drive letters via
> > cygdrive, e.g. ls /cygdrive/C do get directory listing of C:. Same
> > command with msys ls.exe gives:
> >
> >    /usr/bin/ls: /cygdrive/C: No such file or directory
>
> This is expected; MSYS doesn't need cygwin's cygdrive ugliness.
>
> > In msys it works without cygdrive: ls /C
>
> Again, this is expected; not only does MSYS not need the ugliness of
> cygdrive, it explicitly *removes* it.
>
> > But the projects explicitly need cygdrive.
>
> Okay.
>
> > So my question is: Can I get cygdrive back in msys?
>
> Yes, you can create any mount alias you like:
>
>    $ mkdir /cygdrive
>    $ mount c:/ /cygdrive/c
>    $ ls /cygdrive/c
>    ...shows directory listing...
>
> > Or should it be there and someone did something wrong during
> > installation?
>
> No.  MSYS is behaving as expected.
>
> --
> Regards,
> Keith.


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: FW: How can I get cygdrive with msys?

Keith Marshall-3
On 02/07/13 15:13, Hans Schmidts wrote:
> Thanks, that was what I'm looking for (if it works also outside of the
> msys-shell simply for all the msys\bin\*.exe, and if it's no problem
> that C would be mounted twice then)

Are you suggesting that you use MSYS programs, other than within the
MSYS hosted environment.  I know that some users do this, but it is not
a "modus operandum" which we either endorse, or support.  If it works
for you, then well and good; if it doesn't, then you are on your own.

> - unfortunately the mount does not work:(.

WJFFM; (I checked, before I suggested it).

> "mount" is a shell script, ...

Sure.

> and it needs other tools which are not available:

Huh?

> $ mount C:/ /cygdrive/C
> /bin/mount: line 189: awk: command not found

It *should* be, if you've installed msys-base correctly.

> /bin/mount: mount point '/cygdrive/C' is already in use

Which tells me that you already have a mount assigned to it, in
/etc/fstab; `C:/  /cygdrive/C' perhaps?  (This would mean that it's
already mounted, as you want).

> So I need at least awk, but could not find awk in the list of available
>   tools (only gawk was listed

In MSYS, gawk and awk are one and the same; *both* names are supported
if you have installed msys-gawk, (which is *required* by msys-base).

> in "binutils-2.19.51-3-msys-1.0.13.RELEASE_NOTES.txt")

Why is this relevant?  Why are you even looking at the release notes for
a package which is of use *only* to those developing the MSYS product
itself?  I hope you are not trying to use this to support any MinGW (as
opposed to MSYS) compiler.  Those release notes are quite explicit in
telling you that this probably is not the binutils that you want; you
need the mingw32-binutils.

--
Regards,
Keith.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: FW: How can I get cygdrive with msys?

Earnie Boyd
In reply to this post by Hans Schmidts
On Tue, Jul 2, 2013 at 10:13 AM, Hans Schmidts wrote:

> Hi Keith.
>
> Thanks, that was what I'm looking for (if it works also outside of the
> msys-shell simply for all the msys\bin\*.exe, and if it's no problem
> that C would be mounted twice then) - unfortunately the mount
> does not work :(.
>
> "mount" is a shell script, and it needs other tools which are not
> available:
>
> $ mount C:/ /cygdrive/C
> /bin/mount: line 189: awk: command not found
> /bin/mount: mount point '/cygdrive/C' is already in use
>

You should have the awk command when you installed the base msys
system assuming you installed it with ``mingw-get install msys'' or
``mingw-get install msys-base'' or used the mingw-get-inst installer.

> So I need at least awk, but could not find awk in the list of available
>  tools (only gawk was listed in
> "binutils-2.19.51-3-msys-1.0.13.RELEASE_NOTES.txt")
>

To install
mingw-get install msys-gawk

If it says it is already installed then you need to

mingw-get install --reinstall msys-gawk

> PS.: Sorry for the formatting, I use Outlook 2010 and it allows sending
> pure text to some addresses automatically, but other settings are not
> good for mailing lists - hope this is a bit better now. But I'm quite
> sure
> that I may forget to change some setting by hand in the future...

Yes, it is better.  But you need to read the Etiquette section of
http://mingw.org/lists.shtml.

--
Earnie
-- https://sites.google.com/site/earnieboyd

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

FW: How can I get cygdrive with msys?

Hans Schmidts
In reply to this post by Keith Marshall-3
I found the awk in the gawk package
(gawk-3.1.7-2-msys-1.0.13-bin.tar.lzma) :).

With that awk the mounting works as expected. I made a script:

#!/bin/sh
#
------------------------------------------------------------------------
----
# mount_cygdrive_C_D.sh: mount C: and D: in /cygdrive
#
# Usage: Open a windows command shell in MSYS root directory, then:
#        set PATH=%CD%\bin;%PATH%
#        bin\sh.exe mount_cygdrive_C_D.sh
#
# Note: Use for projects which used to use Cygwin and /cygdrive if you
want
#       to switch from Cygwin to MSYS
#
# History:
# 2013-07-03  HaSchm
# - Initial revision
#
------------------------------------------------------------------------
----

# check that awk exists
if [ ! -e "/bin/awk.exe" ]
then
   echo Error: "/bin/awk.exe does not exist (needed in mount script)."
   exit 1 #exit shell script
fi

# make dir /cygdrive if needed
if [ -d "/cygdrive" ]
then
   echo "Directory /cygdrive already exists."
else
   mkdir /cygdrive
fi

# mount C: if needed
if [ -d "/cygdrive/C" ]
then
   echo "Directory /cygdrive/C already exists."
else
   mount C:/ /cygdrive/C
fi

# mount D: if needed
if [ ! -d "D:/" ]
then
   echo "Directory D:/ does not exist (can not be mounted)."
else
   #echo "Directory D:/ exists."
   if [ -d "/cygdrive/D" ]
   then
      echo "Directory /cygdrive/D already exists."
   else
      mount D:/ /cygdrive/D
   fi
fi

# eof

> -----Original Message-----
> From: Hans Schmidts [mailto:[hidden email]]
> Sent: Tuesday, July 02, 2013 4:13 PM
> To: '[hidden email]'
> Subject: FW: [Mingw-users] How can I get cygdrive with msys?
>
> Hi Keith.
>
> Thanks, that was what I'm looking for (if it works also outside of the
> msys-shell simply for all the msys\bin\*.exe, and if it's no problem
> that C would be mounted twice then) - unfortunately the mount
> does not work :(.
>
> "mount" is a shell script, and it needs other tools which are not
> available:
>
> $ mount C:/ /cygdrive/C
> /bin/mount: line 189: awk: command not found
> /bin/mount: mount point '/cygdrive/C' is already in use
>
> So I need at least awk, but could not find awk in the list of
available
>  tools (only gawk was listed in
> "binutils-2.19.51-3-msys-1.0.13.RELEASE_NOTES.txt")
>
> PS.: Sorry for the formatting, I use Outlook 2010 and it allows
sending
> pure text to some addresses automatically, but other settings are not
> good for mailing lists - hope this is a bit better now. But I'm quite
sure

> that I may forget to change some setting by hand in the future...
>
> Regards
> Hans
> > -----Original Message-----
> > From: Keith Marshall [mailto:[hidden email]]
> > Sent: Monday, July 01, 2013 5:05 PM
> > To: MinGW Users List
> > Subject: Re: [Mingw-users] How can I get cygdrive with msys?
> >
> > [Please adjust your mailer to wrap at no more than 72 cols]
> > On 1 July 2013 15:41, Hans Schmidts wrote:
> > > I have projects using cygwin under WinXP. I now must change to
> msys
> > > under Win7-64. The projects access the windows drive letters via
> > > cygdrive, e.g. ls /cygdrive/C do get directory listing of C:. Same
> > > command with msys ls.exe gives:
> > >
> > >    /usr/bin/ls: /cygdrive/C: No such file or directory
> >
> > This is expected; MSYS doesn't need cygwin's cygdrive ugliness.
> >
> > > In msys it works without cygdrive: ls /C
> >
> > Again, this is expected; not only does MSYS not need the ugliness of
> > cygdrive, it explicitly *removes* it.
> >
> > > But the projects explicitly need cygdrive.
> >
> > Okay.
> >
> > > So my question is: Can I get cygdrive back in msys?
> >
> > Yes, you can create any mount alias you like:
> >
> >    $ mkdir /cygdrive
> >    $ mount c:/ /cygdrive/c
> >    $ ls /cygdrive/c
> >    ...shows directory listing...
> >
> > > Or should it be there and someone did something wrong during
> > > installation?
> >
> > No.  MSYS is behaving as expected.
> >
> > --
> > Regards,
> > Keith.


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe