X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=infra%2Fdgit-repos-policy-debian;h=67975bd7ab0fffb4dcc51aa735accbd962a71bda;hb=f82da50bcda81c6b3751e172dc943d4c348f4f72;hp=3353d42dd1998324442fc6f5a1ac26e4ca15b106;hpb=41d1bd6a6c194f11f906e1140861e976fac3f4e0;p=dgit.git diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian index 3353d42d..67975bd7 100755 --- a/infra/dgit-repos-policy-debian +++ b/infra/dgit-repos-policy-debian @@ -23,7 +23,7 @@ our $dgitlive = shift @ARGV // die "need DGIT-LIVE-DIR"; our $action = shift @ARGV // die "need ACTION"; our $publicmode = 02775; -our $new_upload_propagation_slop = 3600*4 + 100; +our $new_upload_propagation_slop = 3600*4 + 100;# fixme config; our $poldbh; our $pkg; @@ -83,7 +83,7 @@ our %deliberately; sub apiquery ($) { my ($subpath) = @_; local $/=undef; - my $cmd = "$dgitlive/dgit -d $distro \$DGIT_TEST_OPTS"; + my $cmd = "$dgitlive/dgit -d$distro \$DGIT_TEST_OPTS"; $cmd .= " -".("D" x $debuglevel) if $debuglevel; $cmd .= " archive-api-query $subpath"; printdebug "apiquery $cmd\n"; @@ -91,7 +91,7 @@ sub apiquery ($) { defined $json or die "$subpath $! $?"; my $r = decode_json $json; my $d = new Data::Dumper([$r], [qw(r)]); - printdebug "apiquery $subpath | ", $d->Dump(), "\n" if $debuglevel>=2; + printdebug "apiquery $subpath | ", $d->Dump() if $debuglevel>=2; return $r; } @@ -199,7 +199,7 @@ sub add_taint_by_tag ($$) { " removed from NEW (ie, rejected) (or never arrived)"); } -sub action__check_package () { +sub action_check_package () { getpackage(); return 0 unless $pkg_exists; return 0 unless $pkg_secret; @@ -259,8 +259,8 @@ sub action_push () { sub action_push_confirm () { getpackage(); - die unless @ARGV; - my $freshrepo = shift @ARGV; + die unless @ARGV >= 5; + my $freshrepo = $ARGV[4]; my $initq = $poldbh->prepare(< 1); + my $newmode = $oldmode & + (~0555 | ($oldwrites << 1) | ($oldwrites >> 1)); + printdebug sprintf "chmod %#o (was %#o) %s\n", + $newmode, $oldmode, $freshrepo; chmod $newmode, $freshrepo or die $!; } }