X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=infra%2Fdgit-repos-policy-debian;h=3c7c006bc6c8b0edd271b5b0fb6c512cc8be9b33;hp=83ce793929469f837c277ad68d6fa30a51622e7f;hb=ab3be575e6a64ca698684995a02563b3cb82f68a;hpb=9ff6957e842708e9641ad00510f336b347bff302 diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian index 83ce7939..3c7c006b 100755 --- a/infra/dgit-repos-policy-debian +++ b/infra/dgit-repos-policy-debian @@ -120,12 +120,8 @@ sub good_suite_has_vsn_in_our_history () { return 0; } -sub getpackage () { - die unless @ARGV >= 1; - $pkg = shift @ARGV; - die unless $pkg =~ m/^$package_re$/; - - $pkgdir = "$repos/$pkg"; +sub statpackage () { + $pkgdir = "$repos/$pkg.git"; if (!stat_exists $pkgdir) { $pkg_exists = 0; } else { @@ -134,6 +130,14 @@ sub getpackage () { } } +sub getpackage () { + die unless @ARGV >= 1; + $pkg = shift @ARGV; + die unless $pkg =~ m/^$package_re$/; + + statpackage(); +} + sub add_taint ($$) { my ($refobj, $reason); @@ -243,6 +247,10 @@ sub action_push () { } sub action_push_confirm () { + getpackage(); + die unless @ARGV; + my $freshrepo = shift @ARGV; + my $initq = $poldbh->prepare(< 1); + chmod $newmode, $freshrepo or die $!; + } + } + + return 0; +} + +sub action_check_list () { + opendir L, "$repos" or die "$repos $!"; + while (defined (my $dent = readdir L)) { + next unless $dent =~ m/^($package_re)\.git$/; + $pkg = $1; + statpackage(); + next unless $pkg_exists; + next unless $pkg_secret; + print "$pkg\n" or die $!; + } + closedir L or die $!; + close STDOUT or die $!; return 0; }