Dependency perl code

Changes to perl code for DPC

There are couple of members of the perl code that require changing, which are described below.

update_files.pl

update_files.pl is the main program. The only line that should need editing in update_files.pl is the line

use lib 'updateDirectory'

which is near the top of the file (about line 12), where updateDirectory should be changed to the directory containing this file and all the other perl files in this suite. If this directory isn't set properly the perl code is unlikely to be able to find the other perl code.

set_environment.pl

The variables in set_environment.pl that generally want changing are

  • $ConfigDir, which should be set the configuration directory which contains the dependency file. This is likely to be the same as the updateDirectory above, with the addition of the string /config.
  • $dateInfo{'startYear'} and $dateInfo{'endYear'}, which sets a start and end year. This information is used when the YEAR variable is encountered and a parent file is not available to deduce a value or loop of values for YEAR. If in doubt, make this range very large (this information is not used much, and shouldn't slow the DPC significantly even if it's too large).
  • The $ParentMenu and $MainMenu are only required for the web interface and are largely cosmetic, so they require changing to be right, but won't matter much if they're wrong.

There are some variable that may want changing

  • $dependFile is the default name for the dependency file, and is expected to be dependencies.dat. This is overridden by the --depend argument.
  • $tmax is the default number of hours the DPC will run for before it stops itself. It's not healthy to have the DPC running twice on one file, so this is safety feature to reduce the risk of this. The default is usually 12 for 12 hours, and it is overridden by the --tmax argument.
  • $zipInfo{'command'} and $zipInfo{'extension'} contain the command for compressing files and the extension added to the filename once the compression has been made. The default option is the GNU gzip compression utility, with filename extension .gz, but this could be changed to bzip2 with filename extension .bz2, or another compression utility.
  • $defaultMaxChecks{'unset'} and $defaultMaxChecks{'set'} put an upper limit on how many parent files for a given parent type are checked to see if any of their children are older than them, where $defaultMaxChecks{'set'} is used if the --checks argument is specified without a specified number of files. Comparing the ages of the children with their parent files can take a long time if there's a lot of files, which is why an upper limit is sensible. If a limit is ever applied, it's the newest parent files which are used and a warning is displayed when running update_files.pl. An upper limit can be overridden by using --checks=all.

Things to do now

Contact

Page navigation