Chapter 6. Default file copying rules

When a file is copied, its details will be stored in .config.new, and .config.new is renamed to .config.all at the end of successful completion. This use of 2 files is so installed files can still be tracked even if installation fails.

The status information for each file contains two sets of the following fields, separated by '=':

The first set contains information about the source the last time the file was installed. This is used to determine if the destination file has changed. The second set contains information about the source file the last time the installation was run. This is used to determine if the source file has changed. If the first set is a '*' then this file was never formally installed. If the second set is a '*', then it is taken to be the same as the first set.

The reason two sets of data are required (and not just one like for dpkg conf files) is that the time and date of the files is taken into consideration, and it is important that the reference date for the destination remains the same unless it is updated.

Consider this worse case example: The source file and destination file are modified to have the same date and time (ie coincidence). The user runs the installation program but chooses not to update the file. The installation can:

As from autoinstall.pm::doit:


         | <---------------- SOURCE FILE -----------------------> |
DST FILE | deleted | created | same | newer(1)| older(1)| changed |
---------+---------+---------+------+---------+---------+---------+
deleted  | ASK     | REPLACE | NOP  | ASK     | ASK     | ASK     | 
created  | ------- | ASK     | ---  | -----   | ------  | ------- |
same     | REPLACE | ------- | NOP  | REPLACE | REPLACE | REPLACE |
newer(1) | ASK     | ------- | NOP  | ASK     | ASK     | ASK     |
older(1) | ASK     | ------- | NOP  | ASK     | ASK     | ASK     |
changed  | ASK     | ------- | NOP  | ASK     | ASK     | ASK     |
-------------------------------------------------------------------
    

Note: As of version 0.1.8 the date/time comparison has been disabled, since it was no longer required and broke when the source is controlled by CVS.

Table 6-1. Source File

deletedmeans the file is listed in .config.all but not there.
createdmeans the source file exists but not listed in .config.all (as it is not listed, there is nothing to compare it with).
samesource file not modified since last copied.
newersource file is newer then reference.
oldersource file is older then reference.
changedsource file has been determined different then reference by some other check (eg file size).

Table 6-2. Destination File

deletedmeans the file is not there.
createdmeans the destination file exists but not listed in .config.all (as it is not listed, there is nothing to compare it with).
samedestination file not modified since last copied.
newerdestination file is newer then reference.
olderdestination file is older then reference.
changeddestination file has been determined different then reference by some other check (eg file size).

Table 6-3. Options

ASK ask user what to do. If the old file is required, the new one will be renamed to end with .ai-new; if the new file is required, the old file will be renamed to end in .ai-old; in any case the user will only be asked ONCE for each file.
REPLACEReplace destination file, if exists.
NOPdon't do anything.