chiark / gitweb /
dgit-repos-server: Deal with FRESHREPO from push hook
[dgit.git] / Debian / Dgit.pm
index 2be936b87c6a6d3dd23e4acc7664ef2e7dfd2bca..b93477402c72dc3a3662c7a99cab81d6735b66b2 100644 (file)
@@ -11,13 +11,28 @@ BEGIN {
 
     $VERSION     = 1.00;
     @ISA         = qw(Exporter);
-    @EXPORT      = qw(debiantag);
-    %EXPORT_TAGS = ( );     # eg: TAG => [ qw!name1 name2! ],
+    @EXPORT      = qw(debiantag
+                      $package_re);
+    %EXPORT_TAGS = ( policyflags => qw() );
     @EXPORT_OK   = qw();
 }
 
 our @EXPORT_OK;
 
+our $package_re = '[0-9a-z][-+.0-9a-z]*';
+
+
+# policy hook exit status bits
+# any unexpected bits mean failure, and then known set bits are ignored
+
+sub NOFFCHECK () { return 2; }
+# suppress dgit-repos-server's ff check ("push" only)
+
+sub FRESHREPO () { return 4; }
+# blow away repo right away (ie, as if before push or fetch)
+# ("check-package" and "push" only)
+
+
 sub debiantag ($) { 
     my ($v) = @_;
     $v =~ y/~:/_%/;