From: Ian Jackson Date: Sat, 2 May 2015 16:02:43 +0000 (+0100) Subject: dgit-repos-policy-debian: Break out statpackage (nfc) X-Git-Tag: debian/0.30~208 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=08350aa0ad7092bd26e7fff5a563dec7a4e682e7 dgit-repos-policy-debian: Break out statpackage (nfc) --- diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian index 83ce7939..cdfa80e7 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);