develooper Front page | perl.perl5.porters | Postings from November 2003

Re: [PATCH 5.8.2 @21574] make install not installing fully

Thread Previous | Thread Next
Michael G Schwern
November 5, 2003 02:44
Re: [PATCH 5.8.2 @21574] make install not installing fully
Message ID:
On Wed, Nov 05, 2003 at 01:46:24AM -0800, Ilya Zakharevich wrote:
> On Tue, Nov 04, 2003 at 08:52:17PM -0800, Michael G Schwern wrote:
> > > What is there to fix?  Sometimes one behaviour is what is desired,
> > > sometimes another.  Given that it is not documented what behaviour is
> > > the default, I see nothing to fix.
> > 
> > Ok, we can change it and document it. :)
> Unless some scripts rely on the current behaviour.  [The current
> behaviour is not documented in README.os2 too.]

When you copy a file on OS/2 in the shell, does it overwrite by default?  
I'd think the answer to that would shape user expectations.

Also, what's the failure mode when the destination file exists?  Does
File::Copy die?  Do nothing?  Warn?  If it dies or warns I can't see 
anyone relying on it.

I don't relish the idea of having to write:

	unlink($dest) and copy($src, $dest);

to be guarantee compatibility.

> > Whether or not File::Copy overwrites by default doesn't strike me as being 
> > very platform specific.  Smells more like a bug or an unconsidered 
> > consequence of using an OS/2 library call to copy files.
> > 
> > Can you pass some flag to DosCopy to make it overwrite or unlink the
> > destination file beforehand?
> This is what bit 0x1 of the third argument `flag' of
> File::Copy::syscopy() is for; when set to 1, it means overwrite the
> target.  (Other two bits: 0x2 regulates append/replace, and 0x4 what
> to do if the file has "Extended Attributes" (one can assign a hash of
> arbitrary attributes to a file), and the target file system does not
> allow extended attributes.)

Could you alter copy() so that bit is set by default when it calls

Michael G Schwern

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About