chiark / gitweb /
dgit-repos-server: Document forthcoming --cron option
[dgit.git] / infra / dgit-repos-server
index f391b08776ada836a2720a7c6b429141178bdd85..baaf99197198a603b3ecddd101d16bd1f8eb5e56 100755 (executable)
@@ -4,6 +4,8 @@
 # usages:
 #  .../dgit-repos-server DISTRO SUITES KEYRING-AUTH-SPEC \
 #      DGIT-REPOS-DIR POLICY-HOOK-SCRIPT --ssh
+#  .../dgit-repos-server DISTRO SUITES KEYRING-AUTH-SPEC \
+#      DGIT-REPOS-DIR POLICY-HOOK-SCRIPT --cron
 # internal usage:
 #  .../dgit-repos-server --pre-receive-hook PACKAGE
 #
@@ -135,6 +137,11 @@ use strict;
 #
 # policy hook for a particular package will be invoked only once at
 # a time - (see comments about DGIT-REPOS-DIR, above)
+#
+# check-list and check-package are invoked via the --cron option.
+# First, without any locking, check-list is called.  It should produce
+# a list of package names.  Then check-package will be invoked for
+# each named package, in each case after taking an appropriate lock.
 
 
 use POSIX;
@@ -793,6 +800,7 @@ sub parseargsdispatch () {
        @ARGV == 1 or die;
        $package = shift @ARGV;
        defined($distro = $ENV{'DGIT_DRS_DISTRO'}) or die;
+       defined($dgitrepos = $ENV{'DGIT_DRS_REPOS'}) or die;
        defined($suitesfile = $ENV{'DGIT_DRS_SUITES'}) or die;
        defined($workrepo = $ENV{'DGIT_DRS_WORK'}) or die;
        defined($destrepo = $ENV{'DGIT_DRS_DEST'}) or die;
@@ -812,7 +820,7 @@ sub parseargsdispatch () {
     $ENV{'DGIT_DRS_DISTRO'} = $distro = argval();
     $ENV{'DGIT_DRS_SUITES'} = argval();
     $ENV{'DGIT_DRS_KEYRINGS'} = argval();
-    $dgitrepos = argval();
+    $ENV{'DGIT_DRS_REPOS'} = $dgitrepos = argval();
     $ENV{'DGIT_DRS_POLICYHOOK'} = $policyhook = argval();
 
     die unless @ARGV==1 && $ARGV[0] eq '--ssh';