X-Spam-Check-By: sourceware.org Message-ID: <20060213134740.30205.qmail@web51509.mail.yahoo.com> Date: Mon, 13 Feb 2006 05:47:39 -0800 (PST) From: "James R. Phillips" Reply-To: antiskid56-cygwin AT yahoo DOT com Subject: Fwd: octave does not recurse LOADPATH directories located on the network in cygwin To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 --- Larrie Carr wrote: > Subject: octave does not recurse LOADPATH directories located on the network > in cygwin > From: "Larrie Carr" > To: > Date: Sun, 12 Feb 2006 17:38:40 -0600 > > In a cygwin environment, octave does not recursively search through LOADPATH > directories if the directories are located on network drives. > > The problem is due to the use of stat() to calculate link_num in dir_link() > in kpse.cc. In a cygwin environment, stat() always reports 1 for a > directory located on a network drive. A test case using stat on the command > line where the root of cygwin is stored on a network drive (x: in this > case). > > $stat -c "%h %f" /cygdrive/c/test > 2 41c0 > > $stat -c "%h %f" /usr/share/octave > 1 41ed > > $stat -c "%h %f" /cygdrive/x/cygwin/usr/share/octave > 1 41ed > > $ls -l /usr/share/octave > total 0 > drwxr-xr-x 1 larrie mkpasswd 0 Feb 8 23.31 2.1.72 > drwxr-xr-x 1 larrie mkpasswd 0 Feb 8 23.31 site > > Looking at 2.1.72, The code within do_subdir() does not handle 1 as a > subdirectory as it > expects a non-empty subdirectory is >2. > > I don't know why cygwin only reports 1 for a network drive, except other > people have seen this. For instance, perl on cygwin, > > http://www.scit.wlv.ac.uk/~jphb/perl/pod/perlcygwin.html > Hard Links > FAT partitions do not support hard links (whereas NTFS does), in which case > Cygwin implements link() by copying the file. On remote (network) drives > Cygwin's stat() always sets st_nlink to 1, so the link count for remote > directories and files is not available. In either case, these tests will > fail: > > Failed Test List of failed > ------------------------------------ > io/fs.t 4 > op/stat.t 3 > > However, stat() always correctly identifies the path as a directory. I > guess a fix would be to remove the optimization so that every subdirectory > is recursed into and then handle the "." cases as before to allow empty > directories to work as before. > > Larrie. > Thanks very much for your investigation. I will await upstream action on this issue. Forwarding to the cygwin mailing list for comment. jrp -- 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/