public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* How does 'alternatives' find a file?
@ 2013-07-16 20:58 Henry Baker
  2013-07-16 21:02 ` Larry Hall (Cygwin)
  0 siblings, 1 reply; 3+ messages in thread
From: Henry Baker @ 2013-07-16 20:58 UTC (permalink / raw)
  To: cygwin

I've had to create a cygwin tree from a circa 2011 tar dump, and I've had a devil of a time trying to make it work.

The biggest problem I have right now is that 'alternatives'-style symlinks don't work.

(The "!<symlink>"-style symlinks _do_ seem to work.)

After doing a lot of Google searching, I tried various combinations of

attrib +s gcc.exe

attrib +r gcc.exe

etc., to no avail.

I can make gcc.exe work by forcibly copying gcc-4.exe to gcc.exe, but there are probably thousands of such links that
would have to be set manually.

The best thing would be to understand how 'alternatives' finds its files, and fix that to correctly find all of the files.

I'm running from both NTFS and FAT32 file systems; neither one works.

I'm running Windows 7 on a 64-bit machine, if that matters.

Thanks for any help; I've now spent many hours trying to solve this problem.


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How does 'alternatives' find a file?
  2013-07-16 20:58 How does 'alternatives' find a file? Henry Baker
@ 2013-07-16 21:02 ` Larry Hall (Cygwin)
  2013-07-17  6:32   ` Charles Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Larry Hall (Cygwin) @ 2013-07-16 21:02 UTC (permalink / raw)
  To: cygwin

On 7/16/2013 2:46 PM, Henry Baker wrote:
> I've had to create a cygwin tree from a circa 2011 tar dump, and I've
> had  a devil of a time trying to make it work.
>
> The biggest problem I have right now is that 'alternatives'-style
> symlinks  don't work.
>
> (The "!<symlink>"-style symlinks _do_ seem to work.)

Here's the page from the Users Guide with the information about the
different kind of symlinks:

<http://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks>

Looking at the ones I have in /etc/alternatives, they are the first kind
listed (or the ones that you say work for you).  Make sure the DOS SYSTEM
attribute (and only that attribute) is set.  Also, if the tree doesn't
come from Cygwin 1.7 days and you're not using the same character set as
you were then, you'll need to recreate the symlinks to get them working
again.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How does 'alternatives' find a file?
  2013-07-16 21:02 ` Larry Hall (Cygwin)
@ 2013-07-17  6:32   ` Charles Wilson
  0 siblings, 0 replies; 3+ messages in thread
From: Charles Wilson @ 2013-07-17  6:32 UTC (permalink / raw)
  To: The Cygwin Mailing List

On 7/16/2013 4:11 PM, Larry Hall (Cygwin) wrote:
> On 7/16/2013 2:46 PM, Henry Baker wrote:
>> I've had to create a cygwin tree from a circa 2011 tar dump, and I've
>> had  a devil of a time trying to make it work.
> Looking at the ones I have in /etc/alternatives, they are the first kind
> listed (or the ones that you say work for you).  Make sure the DOS SYSTEM
> attribute (and only that attribute) is set.  Also, if the tree doesn't
> come from Cygwin 1.7 days and you're not using the same character set as
> you were then, you'll need to recreate the symlinks to get them working
> again.

Just use the alternatives tool itself to forcefully recreate the 
symlinks -- in fact, there's a script that will do that for you. Look in 
/etc/postinstall/ for the files that have "gcc" somewhere in their name. 
Find the ones that invoke /usr/sbin/alternatives and run the appropriate 
ones (whichever ones set the default to gcc4 rather than gcc3).

--
Chuck


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-16 21:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-16 20:58 How does 'alternatives' find a file? Henry Baker
2013-07-16 21:02 ` Larry Hall (Cygwin)
2013-07-17  6:32   ` Charles Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).