change in system call in 1.8.1?
Ryan Schmidt
ryandesign at macports.org
Wed Oct 7 21:02:23 PDT 2009
On Oct 7, 2009, at 22:41, Jack Howarth wrote:
> I noticed tonight that my proposed packaging for
> pymol was broken under MacPorts 1.8.1.
>
> http://trac.macports.org/ticket/21376
>
> In particular, the instances of...
>
> system "cd setup; cp Rules.osx-fink ../Rules.delsci"
> system "make -f Makefile.delsci"
>
> can no longer find the files Rules.osx-fink and Makefile.delsci.
> I now have to reformulate this as...
>
> system "cd ${worksrcpath}/setup; cp Rules.osx-fink ../Rules.delsci"
> system "cd ${worksrcpath}; make -f Makefile.delsci"
>
> Is this expected behavior in MacPorts 1.8.1?
I'm not aware of changes relating to that in 1.8.1, but yes, it is
true that you should not rely on the working directory being anything
in particular when you call system, and should cd to whatever
directory you need every time. Most ports use " && " instead of "; "
as a separator but it doesn't matter much.
More information about the macports-dev
mailing list