summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/control2
-rwxr-xr-xdgit16
-rw-r--r--dgit.13
3 files changed, 18 insertions, 3 deletions
diff --git a/debian/control b/debian/control
index 347caf7..8a2ad1a 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,7 @@ Depends: perl, libwww-perl, libdpkg-perl, git-core, devscripts, dpkg-dev,
coreutils (>= 8.23-1~) | realpath,
libdigest-sha-perl, dput, curl,
libjson-perl, ca-certificates,
- libtext-iconv-perl
+ libtext-iconv-perl, libtext-glob-perl
Recommends: ssh-client, libtext-iconv-perl
Suggests: sbuild
Architecture: all
diff --git a/dgit b/dgit
index e6ab29c..41b7ac8 100755
--- a/dgit
+++ b/dgit
@@ -36,6 +36,7 @@ use Digest::SHA;
use Digest::MD5;
use List::Util qw(any);
use List::MoreUtils qw(pairwise);
+use Text::Glob qw(match_glob);
use Carp;
use Debian::Dgit;
@@ -694,8 +695,19 @@ sub access_basedistro () {
if (defined $idistro) {
return $idistro;
} else {
- return cfg("dgit-suite.$isuite.distro",
- "dgit.default.distro");
+ my $def = cfg("dgit-suite.$isuite.distro", 'RETURN-UNDEF');
+ return $def if defined $def;
+ foreach my $src (@gitcfgsources, 'internal') {
+ my $kl = $src eq 'internal' ? \%defcfg : $gitcfgs{$src};
+ next unless $kl;
+ foreach my $k (keys %$kl) {
+ next unless $k =~ m#^dgit-suite\.(.*)\.distro$#;
+ my $dpat = $1;
+ next unless match_glob $dpat, $isuite;
+ return $kl->{$k};
+ }
+ }
+ return cfg("dgit.default.distro");
}
}
diff --git a/dgit.1 b/dgit.1
index 9878c20..07eb89c 100644
--- a/dgit.1
+++ b/dgit.1
@@ -879,6 +879,9 @@ Settings likely to be useful for an end user include:
Specifies the distro for a suite. dgit keys off the suite name (which
appears in changelogs etc.), and uses that to determine the distro
which is involved. The config used is thereafter that for the distro.
+
+.I suite
+may be a glob pattern.
.TP
.BI dgit.default.distro " distro"
The default distro for an unknown suite.