Re: Problem with MSVC install script

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Chuck McDevitt <cmcdevitt(at)greenplum(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Problem with MSVC install script
Date: 2007-09-24 12:59:50
Message-ID: 46F7B4C6.4080509@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I confess I have never used cvs edit.

Maybe it comes into the realm of "don't do that".

To answer Magnus' question elsewhere, you can't make File::Copy::copy()
do it automatically, nor Win32::CopyFile(). We would need a wrapper
that explicitly unlinked the target before copying. That's certainly
doable, but seems like large surgery for a small problem. I agree that
we don't want to be doing a blank call to attrib as suggested - for one
thing, there might very easily be a datadir inside the target (I do this
habitually, and the buildfarm also puts its datadir right alongside bin,
lib and friends, although it wouldn't be bitten by this), and we surely
don't want to be monkeying with datadir permissions.

cheers

andrew

Chuck McDevitt wrote:
> Well, I was checking out from a different cvs server, and had things set
> to use CVS EDIT, where everything is read-only by default, until you
> issue a cvs edit command.
> So many files that aren't built by the build system, but just get copied
> as-is, end up read-only.
>
> But it would be true for any files set read-only.
>
>
>> -----Original Message-----
>> From: Andrew Dunstan [mailto:andrew(at)dunslane(dot)net]
>> Sent: Sunday, September 23, 2007 7:45 PM
>> To: Chuck McDevitt
>> Cc: pgsql-hackers(at)postgresql(dot)org
>> Subject: Re: [HACKERS] Problem with MSVC install script
>>
>>
>>
>> Chuck McDevitt wrote:
>>
>>> I was trying out the msvc support, and ran into a minor problem in
>>>
>> the
>>
>>> install.bat/install.pl
>>>
>>> If any files that are going to be installed are marked read-only,
>>>
>> they
>>
>>> carry the read-only attribute with them when they get copied to the
>>> install dir.
>>>
>>> Then, if you try to run install again, the new attempt will fail
>>> because it can't overwrite the read-only file.
>>>
>>> I added this like to install.bat (just before the call to
>>>
> install.pl)
>
>>> to fix this for me:
>>>
>>> attrib /S -r %1\*
>>>
>>>
>> Which files are read-only?
>>
>> cheers
>>
>> andrew
>>
>
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Darcy Buskermolen 2007-09-24 13:00:03 Re: autovacuum launcher eating too much CPU
Previous Message Simon Riggs 2007-09-24 12:56:45 Re: GUC variable renaming, redux