From: Ian Jackson Date: Thu, 12 Jan 2017 00:02:27 +0000 (+0000) Subject: dgit-repos-policy-debian: Remirror a package when it becomes public X-Git-Tag: archive/debian/3.2~11 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=39988196301013320ba7c93cbd9146c27bd51453;p=dgit.git 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 --- diff --git a/debian/changelog b/debian/changelog index 05ab9d03..a7a4b99f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ dgit (3.2~) unstable; urgency=medium * dgit: Do not execute END blocks in children. So far symptoms of this bug seem to be limited to duplicated error messages but I have not done a thorough analysis. Closes:#850052. + * dgit-infrastructure: 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. Test suite: * infra: mirroring and policy hooks: Improve some debugging output. diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian index cff5d06c..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; }