This is going to be useful for *-security.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
coreutils (>= 8.23-1~) | realpath,
libdigest-sha-perl, dput, curl,
libjson-perl, ca-certificates,
coreutils (>= 8.23-1~) | realpath,
libdigest-sha-perl, dput, curl,
libjson-perl, ca-certificates,
+ libtext-iconv-perl, libtext-glob-perl
Recommends: ssh-client, libtext-iconv-perl
Suggests: sbuild
Architecture: all
Recommends: ssh-client, libtext-iconv-perl
Suggests: sbuild
Architecture: all
use Digest::MD5;
use List::Util qw(any);
use List::MoreUtils qw(pairwise);
use Digest::MD5;
use List::Util qw(any);
use List::MoreUtils qw(pairwise);
+use Text::Glob qw(match_glob);
use Carp;
use Debian::Dgit;
use Carp;
use Debian::Dgit;
if (defined $idistro) {
return $idistro;
} else {
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");
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.
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.
.TP
.BI dgit.default.distro " distro"
The default distro for an unknown suite.