chiark / gitweb /
Export policy hook exist status flags from Dgit.pm
[dgit.git] / Debian / Dgit.pm
1 #
2
3 package Debian::Dgit;
4
5 use strict;
6 use warnings;
7
8 BEGIN {
9     use Exporter   ();
10     our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
11
12     $VERSION     = 1.00;
13     @ISA         = qw(Exporter);
14     @EXPORT      = qw(debiantag
15                       $package_re);
16     %EXPORT_TAGS = ( policyflags => qw() );
17     @EXPORT_OK   = qw();
18 }
19
20 our @EXPORT_OK;
21
22 our $package_re = '[0-9a-z][-+.0-9a-z]*';
23
24
25 # policy hook exit status bits
26 # any unexpected bits mean failure, and then known set bits are ignored
27
28 sub NOFFCHECK () { return 2; }
29 # suppress dgit-repos-server's ff check ("push" only)
30
31 sub FRESHREPO () { return 4; }
32 # blow away repo right away (ie, as if before push or fetch)
33 # ("check-package" only)
34
35
36 sub debiantag ($) { 
37     my ($v) = @_;
38     $v =~ y/~:/_%/;
39     return "debian/$v";
40 }
41
42 1;