Re: [Module-build-general] Fwd: Module::Build Win32 patches
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-02-16 19:03:12
|
> From: "James Freeman" <jfr...@ta...> > Date: Sun Feb 16, 2003 11:59:39 AM US/Central > To: <ke...@ma...> > Subject: Module::Build Win32 patches > Reply-To: <jfr...@ta...> > > Hi Ken > > Module::Build is not very Win32 friendly. Actually Module::Build itself is very Win32 friendly, it takes pains to do things in a cross-platform way everywhere. Module::Build::Compat, a compatibility layer that builds a pass-through Makefile is clearly *not* very cross-platform yet, so your patches should help get the ball rolling in that area. However, your patch creates new problems: by using the full path name to the Makefile and Build scripts in the Makefile, the shell-quoting can-of-worms is now open. Consider what will happen if the full path is: '/home/ken/ foo/Makefile' or '/System Folder/foo/Makefile' or any number of more malicious variations. The second path above will render an OS X system quite useless when "rm -rf $makefile" is run. I'm not sure whether the right way to do this is to figure out shell quoting in a cross-platform way (*not* looking forward to this job), or to get relative paths working in a cross-platform way (would be much safer). What's your feeling on the matter? > I have patched the sources of all > the Modules to use more portable code. Mainly this is not using > ./Build as > the shell command but rather perl /path/to/Build as set by file spec. > Fixed > bareword error Cwd::cwd as well which was causing errors. Why would that cause errors? Is there some version of Cwd.pm that doesn't have cwd()? > Now a little less broken but failure to write a .packlist makes > uninstallation difficult. Right, a .packlist isn't written. Uninstallation is broken anyway, there should be a better mechanism designed rather than perpetuating the broken one. It's a goal of the project. > Another bug is that even though I incremented the $VERSION nmake > install > fails to recognise this and do a reinstall. Here are the highlights of > where > it is currently. I have attached a tar.gz of the patched distribution > for > you to run diff over. It would be helpful to submit patches against the current CVS tree, if you have access to a CVS client and a version of diff. Some of the Win32 errors in your output are fixed there already, actually. At least the "Can't unlink file lib/XSTest.c" one. Thanks again for the patches. -Ken |