summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-05-02 17:02:43 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2015-05-31 11:54:07 +0100
commit08350aa0ad7092bd26e7fff5a563dec7a4e682e7 (patch)
treeb9492e3ae419a230cdaab59c519df50514453187
parent9ff6957e842708e9641ad00510f336b347bff302 (diff)
dgit-repos-policy-debian: Break out statpackage (nfc)
-rwxr-xr-xinfra/dgit-repos-policy-debian16
1 files changed, 10 insertions, 6 deletions
diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian
index 83ce793..cdfa80e 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);