octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal patch for copyfile.m for octave for windows


From: Tatsuro MATSUOKA
Subject: Re: Proposal patch for copyfile.m for octave for windows
Date: Sun, 17 May 2009 11:17:30 +0900 (JST)

Hello

I have tried to use the glob library bundled with octave-3.0.2-mingw 
distributed by Benjamin.
The glob function accepts filesep='\'.

However, pkg install fails 
octave:3> pkg install odepkg-0.6.6.tar.gz
warning: implicit conversion from matrix to string
error: copyfile: no files to move
error: called from `copyfile' in file
C:\Programs\OctaveBuild\share\octave\3.0.5\m\miscellaneous\copyfile.m near line 
80
, column 7

I have tried,
> 78:    f1 = glob (cellfun(@(x) strrep(x,"\\","/"), f1,'UniformOutput', 0));
to copyfile.m for binaries built with Benjamin's glob.

However, 
warning: implicit conversion from matrix to string
error: copyfile: no files to move
error: called from `copyfile' in file
C:\Programs\OctaveBuild\share\octave\3.0.5\m\miscellaneous\copyfile.m near line 
80
, column 7
was not be solved. ????

I have come back to my glob function and modification of copyfile.m gave me 
successful result for pkg
install.  Mmmmm????

It is mysterious and perhaps I should miss something important :-(.

Anyway this issue is not general so that the modifications of copyfile.m and 
movefile.m is limited to
my use and to my toolkit distribution with enough explanation this tentative 
modification.

Regards

Tatsuro
 
--- Tatsuro MATSUOKA wrote:

> Hello
> 
> If the glob function accepts '\', the problem will be solved soon.
> I have used the glob+fnmatch library downloaded from David's site and built 
> libraries under the
> MinGW+Msys system.
> 
> Anyway I look around the source of glob.
> 
> Thanks!!
> 
> Temporally I avoid this problem,  modifying the copyfile.m as,
> 
> 77:    ## Protect the file name(s).
> 78:    f1 = glob (f1);
>  |
>  V
> 77:    ## Protect the file name(s).
> 78:    f1 = glob (cellfun(@(x) strrep(x,"\\","/"), f1,'UniformOutput', 0));
> 
> but it is obviously mere a tentative solution only for pkg install.
> 
> Regards
> 
> Tatsuro
> 
> --- Michael Goffioul wrote:
> 
> > 2009/5/16 Tatsuro MATSUOKA <address@hidden>:
> > > Hello
> > >
> > > subject:Proposal patch for copyfile.m for octave for windows
> > >
> > > I am trying to install Octave-forge Packages by pkg install command.
> > > The codes concerning pkg.m seems to be revised comprehevely.
> > > However I found a problem pkg install on octave for windows.
> > >
> > > See the following
> > >
> > > ***********
> > > octave:9> glob('C:\Programs\OctaveBuild\bin\octave*.*')
> > > ans = {}(0x0)
> > > octave:10> glob('C:/Programs/OctaveBuild/bin\octave*.*')
> > > ans = {}(0x0)
> > > octave:11> glob('C:/Programs/OctaveBuild/bin/octave*.*')
> > > ans =
> > >
> > > {
> > > [1,1] = C:/Programs/OctaveBuild/bin/octave-3.0.5.exe
> > > [2,1] = C:/Programs/OctaveBuild/bin/octave-bug-3.0.5
> > > [3,1] = C:/Programs/OctaveBuild/bin/octave-config-3.0.5
> > > [4,1] = C:/Programs/OctaveBuild/bin/octave.bat
> > > [5,1] = C:/Programs/OctaveBuild/bin/octave.exe
> > > [6,1] = C:/Programs/OctaveBuild/bin/octave.ico
> > > }
> > >
> > > octave:12> glob(strrep ('C:\Programs\OctaveBuild\bin\octave*.*', "\\", 
> > > "/"))
> > > ans =
> > >
> > > {
> > > [1,1] = C:/Programs/OctaveBuild/bin/octave-3.0.5.exe
> > > [2,1] = C:/Programs/OctaveBuild/bin/octave-bug-3.0.5
> > > [3,1] = C:/Programs/OctaveBuild/bin/octave-config-3.0.5
> > > [4,1] = C:/Programs/OctaveBuild/bin/octave.bat
> > > [5,1] = C:/Programs/OctaveBuild/bin/octave.exe
> > > [6,1] = C:/Programs/OctaveBuild/bin/octave.ico
> > > **************
> > >
> > > The funtion glob() requires filesep() == '/' like the above.
> > 
> > I don't have that problem with octave compiled with MSVC. I think
> > the problem is in the glob library you're using.
> > 
> > Michael.
> > 
> 
> 
> --------------------------------------
> Power up the Internet with Yahoo! Toolbar.
> http://pr.mail.yahoo.co.jp/toolbar/
> 


--------------------------------------
Power up the Internet with Yahoo! Toolbar.
http://pr.mail.yahoo.co.jp/toolbar/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]