X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=infra%2Fdgit-repos-policy-debian;h=e85e92c5ebf4531ccc20229c2f4004ba6a49b598;hp=8f1164b1f7a5705bda45bc5cc9f4417b42271f18;hb=397f40c5e2d471582a688474df4aa1c9ed0f7a54;hpb=02bc0d2ca13bda7484c72b30cd20a7e36097da34 diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian index 8f1164b1..e85e92c5 100755 --- a/infra/dgit-repos-policy-debian +++ b/infra/dgit-repos-policy-debian @@ -133,7 +133,7 @@ sub vsn_in_our_history ($) { my @tagrefs = map { "refs/tags/".$_ } debiantags $vsn, $distro; printdebug " checking history vsn=$vsn tagrefs=@tagrefs\n"; - open F, "-|", qw(git-for-each-ref), @tagrefs; + open F, "-|", qw(git for-each-ref), @tagrefs; $_ = ; close F; return 1 if defined && m/\S/; @@ -262,6 +262,21 @@ sub check_package () { if (good_suite_has_suitable_vsn(\&vsn_in_our_history)) { chmod $publicmode, "." or die $!; $pkg_secret = 0; + eval { + my $mirror_hook = "$distrodir/mirror-hook"; + if (stat_exists $mirror_hook) { + my @mirror_cmd = + ($mirror_hook, $distrodir, "updated-hook", $pkg); + debugcmd " (mirror)",@mirror_cmd; + system @mirror_cmd and failedcmd @mirror_cmd; + } + }; + if (length $@) { + chomp $@; + print STDERR "policy hook: warning:". + " failed to mirror publication of \`$pkg':". + " $@\n"; + } return 0; } @@ -319,10 +334,19 @@ sub action_push () { if (deliberately('include-questionable-history')) { return 0; } - die "\nPackage is in NEW and has not been accepted or rejected yet;". - " use a --deliberately option to specify whether you are". - " keeping or discarding the previously pushed history. ". - " Please RTFM dgit(1).\n\n"; + die <