[m-rev.] Fix test_mercury to use mv rather than cp for backups

Ian MacLarty maclarty at cs.mu.OZ.AU
Tue Aug 16 18:14:14 AEST 2005


On 16 Aug 2005, at 18:03, Julien Fischer wrote:

>
> On Tue, 16 Aug 2005, Ian MacLarty wrote:
>
>> On 16 Aug 2005, at 17:08, Ralph Becket wrote:
>>
>>> Estimated hours taken: 0.3
>>> Branches: main
>>>
>>> tools/test_mercury:
>>> 	Use mv rather than cp to handle the backup directory.
>>> 	The cp approach fails when disk space is at a premium.
>>>
>>> Index: test_mercury
>>> ===================================================================
>>> RCS file: /home/mercury1/repository/mercury/tools/test_mercury,v
>>> retrieving revision 1.252
>>> diff -u -r1.252 test_mercury
>>> --- test_mercury	21 Jun 2005 15:18:04 -0000	1.252
>>> +++ test_mercury	16 Aug 2005 07:04:42 -0000
>>> @@ -732,8 +732,9 @@
>>>      # Make a backup copy of the current installation which we will
>>> restore
>>>      # if the new installation fails.
>>>
>>> -    mkdir -p $INSTALL_DIR/../mercury_install_backup
>>> -    cp -rf $INSTALL_DIR/* $INSTALL_DIR/../mercury_install_backup
>>> +    BACKUP_DIR=`basename $INSTALL_DIR`/mercury_install_backup
>>> +    mv $INSTALL_DIR $BACKUP_DIR
>>> +    mkdir -p $INSTALL_DIR
>>>
>>
>> Isn't the current installation used to compile the new installation?
>> If you move it don't you need to tell whatever script builds the new
>> installation to use the version in the backup directory to do so?
>
> We don't compile using the backup version.  If the build fails, the
> mercury_install_backup directory just gets copied back to its
> original location.
>

Yes, but what compiler will be used to do the install if the installed 
compiler is moved to the backup directory beforehand?

Ian.

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list