use strict;
+use Debian::Dgit::Infra; # must precede Debian::Dgit; - can change @INC!
use Debian::Dgit qw(:DEFAULT :policyflags);
setup_sigwarn();
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;
$_ = <F>;
close F;
return 1 if defined && m/\S/;
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;
}
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 $!;
}