chiark / gitweb /
dgit-repos-server: Set internal $suitesfile and $keyrings as well as just env vars.
[dgit.git] / infra / dgit-repos-server
index 9d6edb8f7191facb9d221a9968b1057794ec934c..d3d711f178ab99fda55dbe849fd77114f98b6e01 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;
@@ -811,8 +818,8 @@ sub parseargsdispatch () {
     }
 
     $ENV{'DGIT_DRS_DISTRO'} = $distro = argval();
-    $ENV{'DGIT_DRS_SUITES'} = argval();
-    $ENV{'DGIT_DRS_KEYRINGS'} = argval();
+    $ENV{'DGIT_DRS_SUITES'} = $suitesfile = argval();
+    $ENV{'DGIT_DRS_KEYRINGS'} = $keyrings = argval();
     $ENV{'DGIT_DRS_REPOS'} = $dgitrepos = argval();
     $ENV{'DGIT_DRS_POLICYHOOK'} = $policyhook = argval();