From 08350aa0ad7092bd26e7fff5a563dec7a4e682e7 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 2 May 2015 17:02:43 +0100 Subject: [PATCH] dgit-repos-policy-debian: Break out statpackage (nfc) --- infra/dgit-repos-policy-debian | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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); -- 2.30.2