On Wed, Apr 23, 2008 at 9:19 PM, Greg Holtz <[EMAIL PROTECTED]> wrote: > I know this is really wrong, but I changed all instances of > getSymbolicLinkStatus to getFileStatus, and things seem to > work now. I did double check the whole tree to make sure > there were no symbolic links.
It shouldn't actually cause trouble. In fact, some folks argue that we should use getFileStatus instead of getSymbolicLinkStatus, so that we'd automatically follow symlinks. (I think there's a bug on the tracker for this.) So there's no danger that I'm aware of, of using getFileStatus as a workaround for a bug in getSymbolicLinkStatus. It does sound like it's the library bug you referenced, although I don't know why in that case getFileStatus would work. One option here would be to institute a workaround in darcs for this bug. That'd require some autoconf hackery, and you'd have to do most of the testing for that (and as much of the coding as you're comfortable with). This would have the advantage of fixing darcs on OpenSolaris for any other users, and would also fix darcs on any unidentified platform with a similarly buggy getSymbolicLinkStatus. On the other hand, you've got a perfectly good workaround for yourself, and perhaps it's a rare enough platform that we can afford to wait for a new ghc release. Which we choose really depends on how much work you are willing to put into this (or someone else with a similarly failing system). David > I'll toy with getting the latest ghc to compile to see if that > fixes things. That sounds like a good plan. > I put a bunch of putStrLn's everywhere, and I find that genslurp_helper is > called only once before error. The call uses /darcs/_darcs/pristine. > The if statement's predicate fails, and so do all the else's except for > the last one that says "return Nothing" > > The only thing I can think of being an issue would be getSymbolicLinkStatus > not returning the right thing. > > What about this? > > http://hackage.haskell.org/trac/ghc/ticket/2093 > > > > Date: Wed, 23 Apr 2008 14:51:24 -0700 > > From: [EMAIL PROTECTED] > > To: [EMAIL PROTECTED] > > Subject: Re: [darcs-users] fromJust error in darcs-2.0.0 > > CC: [email protected] > > > > This has me pretty well stumped. All I can think to do is to look at > > the source code for genslurp_helper (the old error message gave you a > > good hint where to start looking) and instrument it with extra output. > > I'd first remove the unsafeInterleaveIOs. I don't think they're > > buggy, but they complicate the instrumentation by making the order of > > evaluation less clear. Then I'd add notes like > > > > putStrLn "I'm here" > > > > into the code. If you know Haskell, this is easy. If you don't, you > > should just need to know that the code here is divided into blocks by > > indentation, with each block being defined by a "do", and you should > > be able to guess the rest. In particular, you'll want to replace the > > "return Nothing" with something like > > > > do putStrLn "It looks like I've failed miserably" > > return Nothing > > > > You might also benefit from looking up what the functions lxstat etc > > do. I would only expect darcs to call lstat64, but maybe Solaris has > > some other functions that are used instead? > > > > David > > > > On Wed, Apr 23, 2008 at 9:39 AM, Greg Holtz <[EMAIL PROTECTED]> wrote: > > > > > > Sorry about the copies of my original post that just came in. > > > I sent those days ago before finding out you had to subscribe to > > > be able to post. I guess the internet kept them in a holding pattern. > > > > > > Thanks for the partial fix. I can run "darcs changes" now and it > > > doesn't give up. "whatsnew" says > > > > > > darcs failed: Unable to read directory /darcs/_darcs/pristine (it > appears > > > to be neither file nor directory) > > > > > > but > > > > > > -rw-r--r-- 1 gh other 10 Apr 23 09:30 format > > > drwxr-xr-x 2 gh other 2 Apr 23 09:30 inventories > > > -rw-r--r-- 1 gh other 0 Apr 23 09:30 inventory > > > drwxr-xr-x 2 gh other 2 Apr 23 09:30 patches > > > drwxr-xr-x 2 gh other 5 Apr 23 09:30 prefs > > > drwxr-xr-x 2 gh other 2 Apr 23 09:30 pristine > > > > > > and the truss output around that command is > > > chdir("/darcs") = 0 > > > > > > rmdir("darcs_testing_for_nfs") Err#2 ENOENT > > > stat64("/darcs/_darcs/pristine", 0xD0879A68) = 0 > > > getcwd("/darcs", 4096) = 0 > > > chdir("/darcs/_darcs/pristine") = 0 > > > getcwd("/darcs/_darcs/pristine", 4096) = 0 > > > chdir("/darcs") = 0 > > > lxstat(2, "/darcs/_darcs/pristine", 0xD0879B80) = 0 > > > chdir("/darcs") = 0 > > > chdir("/darcs") = 0 > > > pollsys(0x08044C80, 1, 0x08044D08, 0x00000000) = 1 > > > > > > then the commands for printing the error. > > > > > > > > > > > > > > > > > > > > > > > I'm pushing a (partial) fix that will give a proper error message in > > > > this case, that could give us a hint as to what's going wrong. Darcs > > > > is failing to read a directory, it seems, but we can't really tell > > > > which directory. If you can get a copy (using another machine > > > > perhaps?) of the latest darcs and see how this works, that'd be great. > > > > > > > > David > > > > > > ________________________________ > > > Express yourself wherever you are. Mobilize! > > > _______________________________________________ > > > darcs-users mailing list > > > [email protected] > > > http://lists.osuosl.org/mailman/listinfo/darcs-users > > > > > > > > ________________________________ > In a rush? Get real-time answers with Windows Live Messenger. > ________________________________ > Spell a grand slam in this game where word skill meets World Series. Get in > the game. _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
