X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=infra%2Fdgit-repos-policy-debian;h=990abd2b9b82f90f958bf44f91cca99b8c288772;hb=63911b5d576e7250c132d117c53e66aaf34b7f47;hp=48a42d93ea132e96d41353da10240286d2443d54;hpb=024e4dc85eabea7f3a8fabd28648b81e9078deb2;p=dgit.git diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian index 48a42d93..990abd2b 100755 --- a/infra/dgit-repos-policy-debian +++ b/infra/dgit-repos-policy-debian @@ -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; } @@ -355,6 +370,10 @@ END my $checkpid = open CHKOUT, "-|" // die $!; if (!$checkpid) { open STDIN, "<&", $chkinput or die $!; + delete $ENV{GIT_ALTERNATE_OBJECT_DIRECTORIES}; + # ^ recent versions of git set this in the environment of + # receive hooks. This can cause us to see things which + # the user is trying to abolish. exec @objscatcmd or die $!; }