summaryrefslogtreecommitdiff
path: root/infra/dgit-repos-policy-debian
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-03-22 10:30:23 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2015-03-22 15:24:29 +0000
commitd395baaa070686dce79a9ad7cd02777a4caa4778 (patch)
tree05cd6c0e7a5314a4d44f9a75f91835403371d8d7 /infra/dgit-repos-policy-debian
parent6fff08035c6fb48fab8f804d965541f7486b8249 (diff)
Repos policy machinery: better docs, etc.
Diffstat (limited to 'infra/dgit-repos-policy-debian')
-rwxr-xr-xinfra/dgit-repos-policy-debian24
1 files changed, 4 insertions, 20 deletions
diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian
index 5724c93..c84fd7d 100755
--- a/infra/dgit-repos-policy-debian
+++ b/infra/dgit-repos-policy-debian
@@ -1,23 +1,5 @@
#!/usr/bin/perl -w
# dgit repos policy hook script for Debian
-#
-# usages:
-# dgit-repos-policy-debian DISTRO DGIT-REPOS-DIR ACTION...
-# ie.
-# dgit-repos-policy-debian ... check-list [...]
-# dgit-repos-policy-debian ... check-package PACKAGE [...]
-# dgit-repos-policy-debian ... push PACKAGE \
-# VERSION SUITE TAGNAME DELIBERATELIES [...]
-# dgit-repos-policy-debian ... push-confirm PACKAGE \
-# VERSION SUITE TAGNAME DELIBERATELIES [...]
-#
-# cwd for push is a temporary repo where the to-be-pushed objects have
-# been received; TAGNAME is the version-based tag
-#
-# if push requested FRESHREPO, push-confirm happens in said fresh repo
-#
-# policy hook for a particular package will be invoked only once at
-# a time
use strict;
use POSIX;
@@ -31,7 +13,7 @@ our $repos = shift @ARGV // die "need DGIT-REPOS-DIR";
our $action = shift @ARGV // die "need ACTION";
our $publicmode = 02775;
-our $policydb = "dbi:SQLite:$repos/policy";
+our $policydb = "dbi:SQLite:$repos/policy.sqlite3";
our $new_upload_propagation_slop = 3600*4 + 100;
our $poldbh;
@@ -398,7 +380,9 @@ if (defined $pkg) {
$cmd =~ y/-/_/;
my $fn = ${*::}{"action__$cmd"};
-$fn or die "unknown ACTION";
+if (!$fn) {
+ exit 0;
+}
poldb_setup();