diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-12 00:02:27 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-12 00:31:20 +0000 |
commit | 39988196301013320ba7c93cbd9146c27bd51453 (patch) | |
tree | e1d536ab1deb4eb0b874324ddf8f7d4e2635b2e7 /infra/dgit-repos-policy-debian | |
parent | 8463d12b7a99e449198b06341a96fb3504074040 (diff) |
dgit-repos-policy-debian: Remirror a package when it becomes public
Ie, make the repo available much more promptly when the package passes
NEW.
Closes:#849789.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'infra/dgit-repos-policy-debian')
-rwxr-xr-x | infra/dgit-repos-policy-debian | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian index cff5d06..990abd2 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; } |